mirror of
https://github.com/holos-run/holos.git
synced 2026-03-19 08:44:58 +00:00
Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
954dbd1ec8 | ||
|
|
30b70e76aa | ||
|
|
ec6d112711 | ||
|
|
e796c6a763 | ||
|
|
be32201294 | ||
|
|
5ebc54b5b7 | ||
|
|
2954a57872 | ||
|
|
df705bd79f | ||
|
|
4e8ce3585d | ||
|
|
ab5f17c3d2 | ||
|
|
a8918c74d4 | ||
|
|
ae5738d82d | ||
|
|
bb99aedffa | ||
|
|
d6ee1864c8 | ||
|
|
8a4be66277 |
11
.github/workflows/lint.yaml
vendored
11
.github/workflows/lint.yaml
vendored
@@ -30,14 +30,15 @@ jobs:
|
||||
with:
|
||||
go-version: stable
|
||||
|
||||
- name: Install tools
|
||||
run: sudo apt update && sudo apt -qq -y install curl zip unzip tar bzip2 make
|
||||
- name: Install Packages
|
||||
run: sudo apt update && sudo apt -qq -y install git curl zip unzip tar bzip2 make
|
||||
|
||||
- name: Install Deps
|
||||
- name: Install Tools
|
||||
run: |
|
||||
make go-deps
|
||||
set -x
|
||||
make tools
|
||||
make buf
|
||||
go generate ./...
|
||||
make frontend-deps
|
||||
make frontend
|
||||
go mod tidy
|
||||
|
||||
|
||||
9
.github/workflows/release.yaml
vendored
9
.github/workflows/release.yaml
vendored
@@ -35,12 +35,13 @@ jobs:
|
||||
go-version: stable
|
||||
|
||||
# Necessary to run these outside of goreleaser, otherwise
|
||||
# /home/runner/_work/holos/holos/internal/server/frontend/node_modules/.bin/protoc-gen-connect-query is not in PATH
|
||||
- name: Install Deps
|
||||
# /home/runner/_work/holos/holos/internal/frontend/node_modules/.bin/protoc-gen-connect-query is not in PATH
|
||||
- name: Install Tools
|
||||
run: |
|
||||
make go-deps
|
||||
set -x
|
||||
make tools
|
||||
make buf
|
||||
go generate ./...
|
||||
make frontend-deps
|
||||
make frontend
|
||||
go mod tidy
|
||||
|
||||
|
||||
11
.github/workflows/test.yaml
vendored
11
.github/workflows/test.yaml
vendored
@@ -28,8 +28,8 @@ jobs:
|
||||
with:
|
||||
go-version: stable
|
||||
|
||||
- name: Install tools
|
||||
run: sudo apt update && sudo apt -qq -y install curl zip unzip tar bzip2 make
|
||||
- name: Install Packages
|
||||
run: sudo apt update && sudo apt -qq -y install git curl zip unzip tar bzip2 make
|
||||
|
||||
- name: Set up Helm
|
||||
uses: azure/setup-helm@v4
|
||||
@@ -37,11 +37,12 @@ jobs:
|
||||
- name: Set up Kubectl
|
||||
uses: azure/setup-kubectl@v3
|
||||
|
||||
- name: Install Deps
|
||||
- name: Install Tools
|
||||
run: |
|
||||
make go-deps
|
||||
set -x
|
||||
make tools
|
||||
make buf
|
||||
go generate ./...
|
||||
make frontend-deps
|
||||
make frontend
|
||||
go mod tidy
|
||||
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,4 +1,4 @@
|
||||
bin/
|
||||
/bin/
|
||||
vendor/
|
||||
.idea/
|
||||
coverage.out
|
||||
|
||||
@@ -10,8 +10,8 @@ version: 1
|
||||
|
||||
before:
|
||||
hooks:
|
||||
- go mod tidy
|
||||
- go generate ./...
|
||||
- go mod tidy
|
||||
|
||||
builds:
|
||||
- main: ./cmd/holos
|
||||
|
||||
36
Makefile
36
Makefile
@@ -13,7 +13,7 @@ IMAGE_NAME=$(DOCKER_REPO)
|
||||
$( shell mkdir -p bin)
|
||||
|
||||
# For buf plugin protoc-gen-connect-es
|
||||
export PATH := $(PWD)/internal/server/frontend/node_modules/.bin:$(PATH)
|
||||
export PATH := $(PWD)/internal/frontend/holos/node_modules/.bin:$(PATH)
|
||||
|
||||
GIT_COMMIT=$(shell git rev-parse HEAD)
|
||||
GIT_TREE_STATE=$(shell test -n "`git status --porcelain`" && echo "dirty" || echo "clean")
|
||||
@@ -102,34 +102,34 @@ buf: ## buf generate
|
||||
cd service && buf mod update
|
||||
buf generate
|
||||
|
||||
.PHONY: tools
|
||||
tools: go-deps frontend-deps ## install tool dependencies
|
||||
|
||||
.PHONY: go-deps
|
||||
go-deps: ## install go executables
|
||||
go install github.com/bufbuild/buf/cmd/buf@v1
|
||||
go install github.com/fullstorydev/grpcurl/cmd/grpcurl@v1
|
||||
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1
|
||||
go install connectrpc.com/connect/cmd/protoc-gen-connect-go@v1
|
||||
go-deps: ## tool versions pinned in tools.go
|
||||
go install github.com/bufbuild/buf/cmd/buf
|
||||
go install github.com/fullstorydev/grpcurl/cmd/grpcurl
|
||||
go install google.golang.org/protobuf/cmd/protoc-gen-go
|
||||
go install connectrpc.com/connect/cmd/protoc-gen-connect-go
|
||||
go install honnef.co/go/tools/cmd/staticcheck@latest
|
||||
# curl https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | bash
|
||||
|
||||
.PHONY: frontend-deps
|
||||
frontend-deps: ## Setup npm and vite
|
||||
cd internal/server/frontend && npm install
|
||||
cd internal/server/frontend && npm install --save-dev @bufbuild/buf @connectrpc/protoc-gen-connect-es
|
||||
cd internal/server/frontend && npm install @connectrpc/connect @connectrpc/connect-web @bufbuild/protobuf
|
||||
cd internal/frontend/holos && npm install
|
||||
cd internal/frontend/holos && npm install --save-dev @bufbuild/buf @connectrpc/protoc-gen-connect-es
|
||||
cd internal/frontend/holos && npm install @connectrpc/connect @connectrpc/connect-web @bufbuild/protobuf
|
||||
# https://github.com/connectrpc/connect-query-es/blob/1350b6f07b6aead81793917954bdb1cc3ce09df9/packages/protoc-gen-connect-query/README.md?plain=1#L23
|
||||
cd internal/server/frontend && npm install --save-dev @connectrpc/protoc-gen-connect-query @bufbuild/protoc-gen-es
|
||||
cd internal/server/frontend && npm install @connectrpc/connect-query @bufbuild/protobuf
|
||||
# https://github.com/aleclarson/vite-tsconfig-paths
|
||||
cd internal/server/frontend && npm install --save-dev vite-tsconfig-paths
|
||||
cd internal/frontend/holos && npm install --save-dev @connectrpc/protoc-gen-connect-query @bufbuild/protoc-gen-es
|
||||
cd internal/frontend/holos && npm install @connectrpc/connect-query @bufbuild/protobuf
|
||||
|
||||
|
||||
.PHONY: frontend
|
||||
frontend: buf
|
||||
mkdir -p internal/server/frontend/dist
|
||||
cd internal/server/frontend/dist && rm -rf app
|
||||
cd internal/server/frontend && ./node_modules/.bin/vite build
|
||||
# Necessary to force go build cache miss
|
||||
touch internal/server/frontend/frontend.go
|
||||
mkdir -p internal/frontend/holos/dist
|
||||
cd internal/frontend/holos/dist && rm -rf app
|
||||
cd internal/frontend/holos && ng build
|
||||
touch internal/frontend/frontend.go
|
||||
|
||||
.PHONY: help
|
||||
help: ## Display this help menu.
|
||||
|
||||
315
Tiltfile
Normal file
315
Tiltfile
Normal file
@@ -0,0 +1,315 @@
|
||||
# -*- mode: Python -*-
|
||||
# This Tiltfile manages a Go project with live leload in Kubernetes
|
||||
|
||||
listen_port = 3000
|
||||
metrics_port = 9090
|
||||
|
||||
# Use our wrapper to set the kube namespace
|
||||
if os.getenv('TILT_WRAPPER') != '1':
|
||||
fail("could not run, ./hack/tilt/bin/tilt was not used to start tilt")
|
||||
|
||||
# AWS Account to work in
|
||||
aws_account = '271053619184'
|
||||
aws_region = 'us-east-2'
|
||||
|
||||
# Resource ids
|
||||
holos_backend = 'Holos Backend'
|
||||
pg_admin = 'pgAdmin'
|
||||
pg_cluster = 'PostgresCluster'
|
||||
pg_svc = 'Database Pod'
|
||||
compile_id = 'Go Build'
|
||||
auth_id = 'Auth Policy'
|
||||
lint_id = 'Run Linters'
|
||||
tests_id = 'Run Tests'
|
||||
|
||||
# PostgresCluster resource name in k8s
|
||||
pg_cluster_name = 'holos'
|
||||
# Database name inside the PostgresCluster
|
||||
pg_database_name = 'holos'
|
||||
# PGAdmin name
|
||||
pg_admin_name = 'pgadmin'
|
||||
|
||||
# Default Registry.
|
||||
# See: https://github.com/tilt-dev/tilt.build/blob/master/docs/choosing_clusters.md#manual-configuration
|
||||
# Note, Tilt will append the image name to the registry uri path
|
||||
default_registry('{account}.dkr.ecr.{region}.amazonaws.com/holos-run/holos-server'.format(account=aws_account, region=aws_region))
|
||||
|
||||
# Set a name prefix specific to the user. Multiple developers share the tilt-holos namespace.
|
||||
developer = os.getenv('USER')
|
||||
holos_server = 'holos'
|
||||
# See ./hack/tilt/bin/tilt
|
||||
namespace = os.getenv('NAMESPACE')
|
||||
# We always develop against the k1 cluster.
|
||||
os.putenv('KUBECONFIG', os.path.abspath('./hack/tilt/kubeconfig'))
|
||||
# The context defined in ./hack/tilt/kubeconfig
|
||||
allow_k8s_contexts('sso@k1')
|
||||
allow_k8s_contexts('sso@k2')
|
||||
allow_k8s_contexts('sso@k3')
|
||||
allow_k8s_contexts('sso@k4')
|
||||
allow_k8s_contexts('sso@k5')
|
||||
# PG db connection for localhost -> k8s port-forward
|
||||
os.putenv('PGHOST', 'localhost')
|
||||
os.putenv('PGPORT', '15432')
|
||||
# We always develop in the dev aws account.
|
||||
os.putenv('AWS_CONFIG_FILE', os.path.abspath('./hack/tilt/aws.config'))
|
||||
os.putenv('AWS_ACCOUNT', aws_account)
|
||||
os.putenv('AWS_DEFAULT_REGION', aws_region)
|
||||
os.putenv('AWS_PROFILE', 'dev-holos')
|
||||
os.putenv('AWS_SDK_LOAD_CONFIG', '1')
|
||||
# Authenticate to AWS ECR when tilt up is run by the developer
|
||||
local_resource('AWS Credentials', './hack/tilt/aws-login.sh', auto_init=True)
|
||||
|
||||
# Extensions are open-source, pre-packaged functions that extend Tilt
|
||||
#
|
||||
# More info: https://github.com/tilt-dev/tilt-extensions
|
||||
# More info: https://docs.tilt.dev/extensions.html
|
||||
load('ext://restart_process', 'docker_build_with_restart')
|
||||
load('ext://k8s_attach', 'k8s_attach')
|
||||
load('ext://git_resource', 'git_checkout')
|
||||
load('ext://uibutton', 'cmd_button')
|
||||
|
||||
# Paths edited by the developer Tilt watches to trigger compilation.
|
||||
# Generated files should be excluded to avoid an infinite build loop.
|
||||
developer_paths = [
|
||||
'./cmd',
|
||||
'./internal/server',
|
||||
'./internal/ent/schema',
|
||||
'./frontend/package-lock.json',
|
||||
'./frontend/src',
|
||||
'./go.mod',
|
||||
'./pkg',
|
||||
'./service/holos',
|
||||
]
|
||||
|
||||
# Builds the holos-server executable
|
||||
local_resource(compile_id, 'make build', deps=developer_paths)
|
||||
|
||||
# Build Docker image
|
||||
# Tilt will automatically associate image builds with the resource(s)
|
||||
# that reference them (e.g. via Kubernetes or Docker Compose YAML).
|
||||
#
|
||||
# More info: https://docs.tilt.dev/api.html#api.docker_build
|
||||
#
|
||||
docker_build_with_restart(
|
||||
'holos',
|
||||
context='.',
|
||||
entrypoint=[
|
||||
'/app/bin/holos',
|
||||
'server',
|
||||
'--listen-port={}'.format(listen_port),
|
||||
'--oidc-issuer=https://login.ois.run',
|
||||
'--oidc-audience=262096764402729854@holos_platform',
|
||||
'--metrics-port={}'.format(metrics_port),
|
||||
],
|
||||
dockerfile='./hack/tilt/Dockerfile',
|
||||
only=['./bin'],
|
||||
# (Recommended) Updating a running container in-place
|
||||
# https://docs.tilt.dev/live_update_reference.html
|
||||
live_update=[
|
||||
# Sync files from host to container
|
||||
sync('./bin', '/app/bin'),
|
||||
# Wait for aws-login https://github.com/tilt-dev/tilt/issues/3048
|
||||
sync('./tilt/aws-login.last', '/dev/null'),
|
||||
# Execute commands in the container when paths change
|
||||
# run('/app/hack/codegen.sh', trigger=['./app/api'])
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
# Run local commands
|
||||
# Local commands can be helpful for one-time tasks like installing
|
||||
# project prerequisites. They can also manage long-lived processes
|
||||
# for non-containerized services or dependencies.
|
||||
#
|
||||
# More info: https://docs.tilt.dev/local_resource.html
|
||||
#
|
||||
# local_resource('install-helm',
|
||||
# cmd='which helm > /dev/null || brew install helm',
|
||||
# # `cmd_bat`, when present, is used instead of `cmd` on Windows.
|
||||
# cmd_bat=[
|
||||
# 'powershell.exe',
|
||||
# '-Noninteractive',
|
||||
# '-Command',
|
||||
# '& {if (!(Get-Command helm -ErrorAction SilentlyContinue)) {scoop install helm}}'
|
||||
# ]
|
||||
# )
|
||||
|
||||
# Teach tilt about our custom resources (Note, this may be intended for workloads)
|
||||
# k8s_kind('authorizationpolicy')
|
||||
# k8s_kind('requestauthentication')
|
||||
# k8s_kind('virtualservice')
|
||||
k8s_kind('pgadmin')
|
||||
|
||||
|
||||
# Troubleshooting
|
||||
def resource_name(id):
|
||||
print('resource: {}'.format(id))
|
||||
return id.name
|
||||
|
||||
|
||||
workload_to_resource_function(resource_name)
|
||||
|
||||
# Apply Kubernetes manifests
|
||||
# Tilt will build & push any necessary images, re-deploying your
|
||||
# resources as they change.
|
||||
#
|
||||
# More info: https://docs.tilt.dev/api.html#api.k8s_yaml
|
||||
#
|
||||
|
||||
def holos_yaml():
|
||||
"""Return a k8s Deployment personalized for the developer."""
|
||||
k8s_yaml_template = str(read_file('./hack/tilt/k8s.yaml'))
|
||||
return k8s_yaml_template.format(
|
||||
name=holos_server,
|
||||
developer=developer,
|
||||
namespace=namespace,
|
||||
listen_port=listen_port,
|
||||
metrics_port=metrics_port,
|
||||
tz=os.getenv('TZ'),
|
||||
)
|
||||
|
||||
# Customize a Kubernetes resource
|
||||
# By default, Kubernetes resource names are automatically assigned
|
||||
# based on objects in the YAML manifests, e.g. Deployment name.
|
||||
#
|
||||
# Tilt strives for sane defaults, so calling k8s_resource is
|
||||
# optional, and you only need to pass the arguments you want to
|
||||
# override.
|
||||
#
|
||||
# More info: https://docs.tilt.dev/api.html#api.k8s_resource
|
||||
#
|
||||
k8s_yaml(blob(holos_yaml()))
|
||||
|
||||
# Backend server process
|
||||
k8s_resource(
|
||||
workload=holos_server,
|
||||
new_name=holos_backend,
|
||||
objects=[
|
||||
'{}:serviceaccount'.format(holos_server),
|
||||
'{}:servicemonitor'.format(holos_server),
|
||||
],
|
||||
resource_deps=[compile_id],
|
||||
links=[
|
||||
link('https://{}.holos.dev.k2.ois.run/app/'.format(developer), "Holos Web UI")
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
# AuthorizationPolicy - Beyond Corp functionality
|
||||
k8s_resource(
|
||||
new_name=auth_id,
|
||||
objects=[
|
||||
'{}:virtualservice'.format(holos_server),
|
||||
'{}-allow-groups:authorizationpolicy'.format(holos_server),
|
||||
'{}-allow-nothing:authorizationpolicy'.format(holos_server),
|
||||
'{}-allow-well-known-paths:authorizationpolicy'.format(holos_server),
|
||||
'{}-auth:authorizationpolicy'.format(holos_server),
|
||||
'{}:requestauthentication'.format(holos_server),
|
||||
],
|
||||
)
|
||||
|
||||
# Database
|
||||
# Note: Tilt confuses the backup pods with the database server pods, so this code is careful to tease the pods
|
||||
# apart so logs are streamed correctly.
|
||||
# See: https://github.com/tilt-dev/tilt.specs/blob/master/resource_assembly.md
|
||||
|
||||
# pgAdmin Web UI
|
||||
k8s_resource(
|
||||
workload=pg_admin_name,
|
||||
new_name=pg_admin,
|
||||
port_forwards=[
|
||||
port_forward(15050, 5050, pg_admin),
|
||||
],
|
||||
)
|
||||
|
||||
# Disabled because these don't group resources nicely
|
||||
# k8s_kind('postgrescluster')
|
||||
|
||||
# Postgres database in-cluster
|
||||
k8s_resource(
|
||||
new_name=pg_cluster,
|
||||
objects=['holos:postgrescluster'],
|
||||
)
|
||||
|
||||
# Needed to select the database by label
|
||||
# https://docs.tilt.dev/api.html#api.k8s_custom_deploy
|
||||
k8s_custom_deploy(
|
||||
pg_svc,
|
||||
apply_cmd=['./hack/tilt/k8s-get-db-sts', pg_cluster_name],
|
||||
delete_cmd=['echo', 'Skipping delete. Object managed by custom resource.'],
|
||||
deps=[],
|
||||
)
|
||||
k8s_resource(
|
||||
pg_svc,
|
||||
port_forwards=[
|
||||
port_forward(15432, 5432, 'psql'),
|
||||
],
|
||||
resource_deps=[pg_cluster]
|
||||
)
|
||||
|
||||
|
||||
# Run tests
|
||||
local_resource(
|
||||
tests_id,
|
||||
'make test',
|
||||
allow_parallel=True,
|
||||
auto_init=False,
|
||||
deps=developer_paths,
|
||||
)
|
||||
|
||||
# Run linter
|
||||
local_resource(
|
||||
lint_id,
|
||||
'make lint',
|
||||
allow_parallel=True,
|
||||
auto_init=False,
|
||||
deps=developer_paths,
|
||||
)
|
||||
|
||||
# UI Buttons for helpful things.
|
||||
# Icons: https://fonts.google.com/icons
|
||||
os.putenv("GH_FORCE_TTY", "80%")
|
||||
cmd_button(
|
||||
'{}:go-test-failfast'.format(tests_id),
|
||||
argv=['./hack/tilt/go-test-failfast'],
|
||||
resource=tests_id,
|
||||
icon_name='quiz',
|
||||
text='Fail Fast',
|
||||
)
|
||||
cmd_button(
|
||||
'{}:issues'.format(holos_server),
|
||||
argv=['./hack/tilt/gh-issues'],
|
||||
resource=holos_backend,
|
||||
icon_name='folder_data',
|
||||
text='Issues',
|
||||
)
|
||||
cmd_button(
|
||||
'{}:gh-issue-view'.format(holos_server),
|
||||
argv=['./hack/tilt/gh-issue-view'],
|
||||
resource=holos_backend,
|
||||
icon_name='task',
|
||||
text='View Issue',
|
||||
)
|
||||
cmd_button(
|
||||
'{}:get-pgdb-creds'.format(holos_server),
|
||||
argv=['./hack/tilt/get-pgdb-creds', pg_cluster_name, pg_database_name],
|
||||
resource=pg_svc,
|
||||
icon_name='lock_open_right',
|
||||
text='DB Creds',
|
||||
)
|
||||
cmd_button(
|
||||
'{}:get-pgdb-creds'.format(pg_admin_name),
|
||||
argv=['./hack/tilt/get-pgdb-creds', pg_cluster_name, pg_database_name],
|
||||
resource=pg_admin,
|
||||
icon_name='lock_open_right',
|
||||
text='DB Creds',
|
||||
)
|
||||
cmd_button(
|
||||
'{}:get-pgadmin-creds'.format(pg_admin_name),
|
||||
argv=['./hack/tilt/get-pgadmin-creds', pg_admin_name],
|
||||
resource=pg_admin,
|
||||
icon_name='lock_open_right',
|
||||
text='pgAdmin Login',
|
||||
)
|
||||
|
||||
print("✨ Tiltfile evaluated")
|
||||
@@ -141,9 +141,25 @@ func cacheChart(ctx context.Context, path holos.InstancePath, chartDir string, c
|
||||
log.Debug("helm pull", "stdout", helmOut.Stdout, "stderr", helmOut.Stderr)
|
||||
|
||||
cachePath := filepath.Join(string(path), chartDir)
|
||||
if err := os.Rename(cacheTemp, cachePath); err != nil {
|
||||
return errors.Wrap(fmt.Errorf("could not rename: %w", err))
|
||||
|
||||
if err := os.MkdirAll(cachePath, 0777); err != nil {
|
||||
return errors.Wrap(fmt.Errorf("could not mkdir: %w", err))
|
||||
}
|
||||
|
||||
items, err := os.ReadDir(cacheTemp)
|
||||
if err != nil {
|
||||
return errors.Wrap(fmt.Errorf("could not read directory: %w", err))
|
||||
}
|
||||
|
||||
for _, item := range items {
|
||||
src := filepath.Join(cacheTemp, item.Name())
|
||||
dst := filepath.Join(cachePath, item.Name())
|
||||
log.DebugContext(ctx, "rename", "src", src, "dst", dst)
|
||||
if err := os.Rename(src, dst); err != nil {
|
||||
return errors.Wrap(fmt.Errorf("could not rename: %w", err))
|
||||
}
|
||||
}
|
||||
|
||||
log.InfoContext(ctx, "cached", "chart", chart.Name, "version", chart.Version, "path", cachePath)
|
||||
|
||||
return nil
|
||||
|
||||
@@ -11,14 +11,14 @@ plugins:
|
||||
out: service/gen
|
||||
opt: paths=source_relative
|
||||
- plugin: es
|
||||
out: internal/server/frontend/gen
|
||||
out: internal/frontend/holos/gen
|
||||
opt:
|
||||
- target=ts
|
||||
- plugin: connect-es
|
||||
out: internal/server/frontend/gen
|
||||
out: internal/frontend/holos/gen
|
||||
opt:
|
||||
- target=ts
|
||||
- plugin: connect-query
|
||||
out: internal/server/frontend/gen
|
||||
out: internal/frontend/holos/gen
|
||||
opt:
|
||||
- target=ts
|
||||
|
||||
26
docs/examples/managednamespaces.cue
Normal file
26
docs/examples/managednamespaces.cue
Normal file
@@ -0,0 +1,26 @@
|
||||
package holos
|
||||
|
||||
// NOTE: Beyond the base reference platform, services should typically be added to #OptionalServices instead of directly to a managed namespace.
|
||||
|
||||
// ManagedNamespace is a namespace to manage across all clusters in the holos platform.
|
||||
#ManagedNamespace: {
|
||||
namespace: {
|
||||
metadata: {
|
||||
name: string
|
||||
labels: [string]: string
|
||||
}
|
||||
}
|
||||
// clusterNames represents the set of clusters the namespace is managed on. Usually all clusters.
|
||||
clusterNames: [...string]
|
||||
for cluster in clusterNames {
|
||||
clusters: (cluster): name: cluster
|
||||
}
|
||||
}
|
||||
|
||||
// #ManagedNamepsaces is the union of all namespaces across all cluster types and optional services.
|
||||
// Holos adopts the namespace sameness position of SIG Multicluster, refer to https://github.com/kubernetes/community/blob/dd4c8b704ef1c9c3bfd928c6fa9234276d61ad18/sig-multicluster/namespace-sameness-position-statement.md
|
||||
#ManagedNamespaces: {
|
||||
[Name=_]: #ManagedNamespace & {
|
||||
namespace: metadata: name: Name
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
// Controls optional feature flags for services distributed across multiple holos components.
|
||||
// For example, enable issuing certificates in the provisioner cluster when an optional service is
|
||||
// enabled for a workload cluster.
|
||||
// enabled for a workload cluster. Another example is NATS, which isn't necessary on all clusters,
|
||||
// but is necessary on clusters with a project like holos which depends on NATS.
|
||||
|
||||
package holos
|
||||
|
||||
import "list"
|
||||
|
||||
1011
docs/examples/platforms/reference/clusters/holos/nats/crds/crds.yml
Normal file
1011
docs/examples/platforms/reference/clusters/holos/nats/crds/crds.yml
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,6 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
# curl -LO https://github.com/nats-io/nack/releases/latest/download/crds.yml
|
||||
resources:
|
||||
- crds.yml
|
||||
@@ -0,0 +1,8 @@
|
||||
package holos
|
||||
|
||||
// NATS NetStream Controller (NACK)
|
||||
spec: components: KustomizeBuildList: [
|
||||
#KustomizeBuild & {
|
||||
metadata: name: "prod-nack-crds"
|
||||
},
|
||||
]
|
||||
@@ -0,0 +1,37 @@
|
||||
package holos
|
||||
|
||||
// for Project in _Projects {
|
||||
// spec: components: resources: (#ProjectTemplate & {project: Project}).workload.resources
|
||||
// }
|
||||
|
||||
let Namespace = "jeff-holos"
|
||||
|
||||
#Kustomization: spec: targetNamespace: Namespace
|
||||
|
||||
spec: components: HelmChartList: [
|
||||
#HelmChart & {
|
||||
metadata: name: "jeff-holos-nats"
|
||||
namespace: Namespace
|
||||
_dependsOn: "prod-secrets-stores": _
|
||||
chart: {
|
||||
name: "nats"
|
||||
version: "1.1.10"
|
||||
repository: NatsRepository
|
||||
}
|
||||
},
|
||||
#HelmChart & {
|
||||
metadata: name: "jeff-holos-nack"
|
||||
namespace: Namespace
|
||||
_dependsOn: "jeff-holos-nats": _
|
||||
chart: {
|
||||
name: "nack"
|
||||
version: "0.25.2"
|
||||
repository: NatsRepository
|
||||
}
|
||||
},
|
||||
]
|
||||
|
||||
let NatsRepository = {
|
||||
name: "nats"
|
||||
url: "https://nats-io.github.io/k8s/helm/charts/"
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
# Holos
|
||||
|
||||
This subtree contains holos components for holos itself. We strive for minimal dependencies, so this is likely going to contain NATS and/or Postgres resources.
|
||||
|
||||
Components depend on the holos project and may iterate over the defined environments in the project stages.
|
||||
@@ -182,7 +182,7 @@ _apiVersion: "holos.run/v1alpha1"
|
||||
pool?: string
|
||||
// region is the geographic region of the cluster.
|
||||
region?: string
|
||||
// primary is true if name matches the primaryCluster name
|
||||
// primary is true if the cluster is the primary cluster among a group of related clusters.
|
||||
primary: bool
|
||||
}
|
||||
|
||||
@@ -219,6 +219,7 @@ _apiVersion: "holos.run/v1alpha1"
|
||||
primary: false
|
||||
}
|
||||
}
|
||||
// TODO: Remove stages, they're in the subdomain of projects.
|
||||
stages: [ID=_]: {
|
||||
name: string & ID
|
||||
environments: [...{name: string}]
|
||||
@@ -226,9 +227,11 @@ _apiVersion: "holos.run/v1alpha1"
|
||||
projects: [ID=_]: {
|
||||
name: string & ID
|
||||
}
|
||||
// TODO: Remove services, they're in the subdomain of projects.
|
||||
services: [ID=_]: {
|
||||
name: string & ID
|
||||
}
|
||||
|
||||
// authproxy configures the auth proxy attached to the default ingress gateway in the istio-ingress namespace.
|
||||
authproxy: #AuthProxySpec & {
|
||||
namespace: "istio-ingress"
|
||||
@@ -277,29 +280,6 @@ _apiVersion: "holos.run/v1alpha1"
|
||||
idTokenHeader: string | *"x-oidc-id-token"
|
||||
}
|
||||
|
||||
// ManagedNamespace is a namespace to manage across all clusters in the holos platform.
|
||||
#ManagedNamespace: {
|
||||
namespace: {
|
||||
metadata: {
|
||||
name: string
|
||||
labels: [string]: string
|
||||
}
|
||||
}
|
||||
// clusterNames represents the set of clusters the namespace is managed on. Usually all clusters.
|
||||
clusterNames: [...string]
|
||||
for cluster in clusterNames {
|
||||
clusters: (cluster): name: cluster
|
||||
}
|
||||
}
|
||||
|
||||
// #ManagedNamepsaces is the union of all namespaces across all cluster types and optional services.
|
||||
// Holos adopts the namespace sameness position of SIG Multicluster, refer to https://github.com/kubernetes/community/blob/dd4c8b704ef1c9c3bfd928c6fa9234276d61ad18/sig-multicluster/namespace-sameness-position-statement.md
|
||||
#ManagedNamespaces: {
|
||||
[Name=_]: #ManagedNamespace & {
|
||||
namespace: metadata: name: Name
|
||||
}
|
||||
}
|
||||
|
||||
// #Backups defines backup configuration.
|
||||
// TODO: Consider the best place for this, possibly as part of the site platform config. This represents the primary location for backups.
|
||||
#Backups: {
|
||||
|
||||
89
go.mod
89
go.mod
@@ -8,22 +8,27 @@ require (
|
||||
connectrpc.com/validate v0.1.0
|
||||
cuelang.org/go v0.8.0
|
||||
entgo.io/ent v0.13.1
|
||||
github.com/bufbuild/buf v1.30.1
|
||||
github.com/coreos/go-oidc/v3 v3.10.0
|
||||
github.com/fullstorydev/grpcurl v1.9.1
|
||||
github.com/go-jose/go-jose/v3 v3.0.3
|
||||
github.com/gofrs/uuid v4.4.0+incompatible
|
||||
github.com/google/uuid v1.5.0
|
||||
github.com/int128/kubelogin v1.28.0
|
||||
github.com/jackc/pgx/v5 v5.5.5
|
||||
github.com/lmittmann/tint v1.0.4
|
||||
github.com/mattn/go-isatty v0.0.20
|
||||
github.com/mattn/go-runewidth v0.0.9
|
||||
github.com/olekukonko/tablewriter v0.0.5
|
||||
github.com/prometheus/client_golang v1.19.0
|
||||
github.com/rogpeppe/go-internal v1.12.0
|
||||
github.com/sethvargo/go-retry v0.2.4
|
||||
github.com/spf13/cobra v1.8.0
|
||||
github.com/spf13/pflag v1.0.5
|
||||
github.com/stretchr/testify v1.8.4
|
||||
github.com/stretchr/testify v1.9.0
|
||||
golang.org/x/net v0.22.0
|
||||
golang.org/x/tools v0.19.0
|
||||
google.golang.org/protobuf v1.33.0
|
||||
google.golang.org/protobuf v1.33.1-0.20240408130810-98873a205002
|
||||
honnef.co/go/tools v0.4.7
|
||||
k8s.io/api v0.29.2
|
||||
k8s.io/apimachinery v0.29.2
|
||||
k8s.io/client-go v0.29.2
|
||||
@@ -34,62 +39,123 @@ require (
|
||||
|
||||
require (
|
||||
ariga.io/atlas v0.19.1-0.20240203083654-5948b60a8e43 // indirect
|
||||
cloud.google.com/go/compute v1.23.3 // indirect
|
||||
cloud.google.com/go/compute/metadata v0.2.3 // indirect
|
||||
connectrpc.com/otelconnect v0.7.0 // indirect
|
||||
cuelabs.dev/go/oci/ociregistry v0.0.0-20240314152124-224736b49f2e // indirect
|
||||
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect
|
||||
github.com/BurntSushi/toml v1.2.1 // indirect
|
||||
github.com/Microsoft/go-winio v0.6.1 // indirect
|
||||
github.com/agext/levenshtein v1.2.1 // indirect
|
||||
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230512164433-5d1fd1a340c9 // indirect
|
||||
github.com/antlr4-go/antlr/v4 v4.13.0 // indirect
|
||||
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/bufbuild/protovalidate-go v0.3.0 // indirect
|
||||
github.com/bufbuild/protocompile v0.10.0 // indirect
|
||||
github.com/bufbuild/protovalidate-go v0.6.0 // indirect
|
||||
github.com/bufbuild/protoyaml-go v0.1.8 // indirect
|
||||
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
|
||||
github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.2.0 // indirect
|
||||
github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe // indirect
|
||||
github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa // indirect
|
||||
github.com/cockroachdb/apd/v3 v3.2.1 // indirect
|
||||
github.com/containerd/stargz-snapshotter/estargz v0.15.1 // indirect
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/distribution/reference v0.6.0 // indirect
|
||||
github.com/docker/cli v26.0.0+incompatible // indirect
|
||||
github.com/docker/distribution v2.8.3+incompatible // indirect
|
||||
github.com/docker/docker v26.0.0+incompatible // indirect
|
||||
github.com/docker/docker-credential-helpers v0.8.1 // indirect
|
||||
github.com/docker/go-connections v0.5.0 // indirect
|
||||
github.com/docker/go-units v0.5.0 // indirect
|
||||
github.com/dustin/go-humanize v1.0.1 // indirect
|
||||
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
|
||||
github.com/emicklei/proto v1.10.0 // indirect
|
||||
github.com/envoyproxy/go-control-plane v0.12.0 // indirect
|
||||
github.com/envoyproxy/protoc-gen-validate v1.0.4 // indirect
|
||||
github.com/evanphx/json-patch v5.7.0+incompatible // indirect
|
||||
github.com/felixge/fgprof v0.9.4 // indirect
|
||||
github.com/felixge/httpsnoop v1.0.4 // indirect
|
||||
github.com/go-chi/chi/v5 v5.0.12 // indirect
|
||||
github.com/go-jose/go-jose/v4 v4.0.1 // indirect
|
||||
github.com/go-logr/logr v1.3.0 // indirect
|
||||
github.com/go-logr/logr v1.4.1 // indirect
|
||||
github.com/go-logr/stdr v1.2.2 // indirect
|
||||
github.com/go-openapi/inflect v0.19.0 // indirect
|
||||
github.com/go-openapi/jsonpointer v0.20.0 // indirect
|
||||
github.com/go-openapi/jsonreference v0.20.2 // indirect
|
||||
github.com/go-openapi/swag v0.22.4 // indirect
|
||||
github.com/gofrs/uuid/v5 v5.0.0 // indirect
|
||||
github.com/gogo/protobuf v1.3.2 // indirect
|
||||
github.com/golang/protobuf v1.5.3 // indirect
|
||||
github.com/google/cel-go v0.17.4 // indirect
|
||||
github.com/golang/protobuf v1.5.4 // indirect
|
||||
github.com/google/cel-go v0.20.1 // indirect
|
||||
github.com/google/gnostic-models v0.6.8 // indirect
|
||||
github.com/google/go-cmp v0.6.0 // indirect
|
||||
github.com/google/go-containerregistry v0.19.1 // indirect
|
||||
github.com/google/gofuzz v1.2.0 // indirect
|
||||
github.com/google/pprof v0.0.0-20240327155427-868f304927ed // indirect
|
||||
github.com/google/uuid v1.6.0 // indirect
|
||||
github.com/google/wire v0.5.0 // indirect
|
||||
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
|
||||
github.com/hashicorp/hcl/v2 v2.13.0 // indirect
|
||||
github.com/imdario/mergo v0.3.16 // indirect
|
||||
github.com/inconshreveable/mousetrap v1.1.0 // indirect
|
||||
github.com/int128/listener v1.1.0 // indirect
|
||||
github.com/int128/oauth2cli v1.14.0 // indirect
|
||||
github.com/int128/oauth2dev v1.0.0 // indirect
|
||||
github.com/jackc/pgpassfile v1.0.0 // indirect
|
||||
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
|
||||
github.com/jackc/puddle/v2 v2.2.1 // indirect
|
||||
github.com/jdx/go-netrc v1.0.0 // indirect
|
||||
github.com/jhump/protoreflect v1.16.0 // indirect
|
||||
github.com/josharian/intern v1.0.0 // indirect
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
github.com/klauspost/compress v1.17.7 // indirect
|
||||
github.com/klauspost/pgzip v1.2.6 // indirect
|
||||
github.com/lib/pq v1.10.9 // indirect
|
||||
github.com/mailru/easyjson v0.7.7 // indirect
|
||||
github.com/mitchellh/go-homedir v1.1.0 // indirect
|
||||
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
|
||||
github.com/moby/docker-image-spec v1.3.1 // indirect
|
||||
github.com/moby/term v0.5.0 // indirect
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||
github.com/morikuni/aec v1.0.0 // indirect
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
|
||||
github.com/ncruces/go-strftime v0.1.9 // indirect
|
||||
github.com/onsi/ginkgo/v2 v2.15.0 // indirect
|
||||
github.com/onsi/gomega v1.31.1 // indirect
|
||||
github.com/opencontainers/go-digest v1.0.0 // indirect
|
||||
github.com/opencontainers/image-spec v1.1.0 // indirect
|
||||
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
|
||||
github.com/pkg/errors v0.9.1 // indirect
|
||||
github.com/pkg/profile v1.7.0 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/prometheus/client_model v0.5.0 // indirect
|
||||
github.com/prometheus/common v0.48.0 // indirect
|
||||
github.com/prometheus/procfs v0.12.0 // indirect
|
||||
github.com/protocolbuffers/txtpbfmt v0.0.0-20230328191034-3462fbc510c0 // indirect
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
|
||||
github.com/rs/cors v1.10.1 // indirect
|
||||
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
||||
github.com/sirupsen/logrus v1.9.3 // indirect
|
||||
github.com/stoewer/go-strcase v1.3.0 // indirect
|
||||
github.com/stretchr/objx v0.5.2 // indirect
|
||||
github.com/vbatts/tar-split v0.11.5 // indirect
|
||||
github.com/zclconf/go-cty v1.8.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect
|
||||
go.opentelemetry.io/otel v1.25.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.25.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.25.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.25.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.25.0 // indirect
|
||||
go.opentelemetry.io/proto/otlp v1.1.0 // indirect
|
||||
go.uber.org/atomic v1.11.0 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
go.uber.org/zap v1.27.0 // indirect
|
||||
golang.org/x/crypto v0.21.0 // indirect
|
||||
golang.org/x/exp v0.0.0-20231108232855-2478ac86f678 // indirect
|
||||
golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8 // indirect
|
||||
golang.org/x/exp/typeparams v0.0.0-20221208152030-732eee02a75a // indirect
|
||||
golang.org/x/mod v0.16.0 // indirect
|
||||
golang.org/x/oauth2 v0.18.0 // indirect
|
||||
golang.org/x/sync v0.6.0 // indirect
|
||||
@@ -98,8 +164,9 @@ require (
|
||||
golang.org/x/text v0.14.0 // indirect
|
||||
golang.org/x/time v0.5.0 // indirect
|
||||
google.golang.org/appengine v1.6.8 // indirect
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc // indirect
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20240325203815-454cdb8f5daa // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240325203815-454cdb8f5daa // indirect
|
||||
google.golang.org/grpc v1.62.1 // indirect
|
||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
|
||||
540
go.sum
540
go.sum
@@ -2,55 +2,173 @@ ariga.io/atlas v0.19.1-0.20240203083654-5948b60a8e43 h1:GwdJbXydHCYPedeeLt4x/lrl
|
||||
ariga.io/atlas v0.19.1-0.20240203083654-5948b60a8e43/go.mod h1:uj3pm+hUTVN/X5yfdBexHlZv+1Xu5u5ZbZx7+CDavNU=
|
||||
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.33.0-20240401165935-b983156c5e99.1 h1:2IGhRovxlsOIQgx2ekZWo4wTPAYpck41+18ICxs37is=
|
||||
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.33.0-20240401165935-b983156c5e99.1/go.mod h1:Tgn5bgL220vkFOI0KPStlcClPeOJzAv4uT+V8JXGUnw=
|
||||
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
|
||||
cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU=
|
||||
cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY=
|
||||
cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc=
|
||||
cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0=
|
||||
cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To=
|
||||
cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4=
|
||||
cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M=
|
||||
cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc=
|
||||
cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk=
|
||||
cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs=
|
||||
cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc=
|
||||
cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY=
|
||||
cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
|
||||
cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE=
|
||||
cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc=
|
||||
cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg=
|
||||
cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc=
|
||||
cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ=
|
||||
cloud.google.com/go/compute v1.23.3 h1:6sVlXXBmbd7jNX0Ipq0trII3e4n1/MsADLK6a+aiVlk=
|
||||
cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI=
|
||||
cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY=
|
||||
cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA=
|
||||
cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
|
||||
cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk=
|
||||
cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=
|
||||
cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw=
|
||||
cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA=
|
||||
cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU=
|
||||
cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw=
|
||||
cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos=
|
||||
cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk=
|
||||
cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=
|
||||
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
|
||||
connectrpc.com/connect v1.16.0 h1:rdtfQjZ0OyFkWPTegBNcH7cwquGAN1WzyJy80oFNibg=
|
||||
connectrpc.com/connect v1.16.0/go.mod h1:XpZAduBQUySsb4/KO5JffORVkDI4B6/EYPi7N8xpNZw=
|
||||
connectrpc.com/otelconnect v0.7.0 h1:ZH55ZZtcJOTKWWLy3qmL4Pam4RzRWBJFOqTPyAqCXkY=
|
||||
connectrpc.com/otelconnect v0.7.0/go.mod h1:Bt2ivBymHZHqxvo4HkJ0EwHuUzQN6k2l0oH+mp/8nwc=
|
||||
connectrpc.com/validate v0.1.0 h1:r55jirxMK7HO/xZwVHj3w2XkVFarsUM77ZDy367NtH4=
|
||||
connectrpc.com/validate v0.1.0/go.mod h1:GU47c9/x/gd+u9wRSPkrQOP46gx2rMN+Wo37EHgI3Ow=
|
||||
cuelabs.dev/go/oci/ociregistry v0.0.0-20240314152124-224736b49f2e h1:GwCVItFUPxwdsEYnlUcJ6PJxOjTeFFCKOh6QWg4oAzQ=
|
||||
cuelabs.dev/go/oci/ociregistry v0.0.0-20240314152124-224736b49f2e/go.mod h1:ApHceQLLwcOkCEXM1+DyCXTHEJhNGDpJ2kmV6axsx24=
|
||||
cuelang.org/go v0.8.0 h1:fO1XPe/SUGtc7dhnGnTPbpIDoQm/XxhDtoSF7jzO01c=
|
||||
cuelang.org/go v0.8.0/go.mod h1:CoDbYolfMms4BhWUlhD+t5ORnihR7wvjcfgyO9lL5FI=
|
||||
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
||||
entgo.io/ent v0.13.1 h1:uD8QwN1h6SNphdCCzmkMN3feSUzNnVvV/WIkHKMbzOE=
|
||||
entgo.io/ent v0.13.1/go.mod h1:qCEmo+biw3ccBn9OyL4ZK5dfpwg++l1Gxwac5B1206A=
|
||||
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0=
|
||||
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak=
|
||||
github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
|
||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
||||
github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60=
|
||||
github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
|
||||
github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow=
|
||||
github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM=
|
||||
github.com/agext/levenshtein v1.2.1 h1:QmvMAjj2aEICytGiWzmxoE0x2KZvE0fvmqMOfy2tjT8=
|
||||
github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558=
|
||||
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230512164433-5d1fd1a340c9 h1:goHVqTbFX3AIo0tzGr14pgfAW2ZfPChKO21Z9MGf/gk=
|
||||
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230512164433-5d1fd1a340c9/go.mod h1:pSwJ0fSY5KhvocuWSx4fz3BA8OrA1bQn+K1Eli3BRwM=
|
||||
github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI=
|
||||
github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g=
|
||||
github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw=
|
||||
github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo=
|
||||
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
|
||||
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
|
||||
github.com/bufbuild/protovalidate-go v0.3.0 h1:t9zKgM//9VtPnP0TvyFqWubLQtSbwLwEUVOxgtX9/os=
|
||||
github.com/bufbuild/protovalidate-go v0.3.0/go.mod h1:4mZkDYMGJlnHHQ9rPOhVEZ4bA13iOJBRLzywxy8f/lo=
|
||||
github.com/bufbuild/buf v1.30.1 h1:QFtanwsXodoGFAwzXFXGXpzBkb7N2u8ZDyA3jWB4Pbs=
|
||||
github.com/bufbuild/buf v1.30.1/go.mod h1:7W8DJnj76wQa55EA3z2CmDxS0/nsHh8FqtE00dyDAdA=
|
||||
github.com/bufbuild/protocompile v0.10.0 h1:+jW/wnLMLxaCEG8AX9lD0bQ5v9h1RUiMKOBOT5ll9dM=
|
||||
github.com/bufbuild/protocompile v0.10.0/go.mod h1:G9qQIQo0xZ6Uyj6CMNz0saGmx2so+KONo8/KrELABiY=
|
||||
github.com/bufbuild/protovalidate-go v0.6.0 h1:Jgs1kFuZ2LHvvdj8SpCLA1W/+pXS8QSM3F/E2l3InPY=
|
||||
github.com/bufbuild/protovalidate-go v0.6.0/go.mod h1:1LamgoYHZ2NdIQH0XGczGTc6Z8YrTHjcJVmiBaar4t4=
|
||||
github.com/bufbuild/protoyaml-go v0.1.8 h1:X9QDLfl9uEllh4gsXUGqPanZYCOKzd92uniRtW2OnAQ=
|
||||
github.com/bufbuild/protoyaml-go v0.1.8/go.mod h1:R8vE2+l49bSiIExP4VJpxOXleHE+FDzZ6HVxr3cYunw=
|
||||
github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8=
|
||||
github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
github.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMrBo8f1j86j5WHzznCCQxV/b8g=
|
||||
github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw=
|
||||
github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
|
||||
github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/chromedp/cdproto v0.0.0-20230802225258-3cf4e6d46a89/go.mod h1:GKljq0VrfU4D5yc+2qA6OVr8pmO/MBbPEWqWQ/oqGEs=
|
||||
github.com/chromedp/chromedp v0.9.2/go.mod h1:LkSXJKONWTCHAfQasKFUZI+mxqS4tZqhmtGzzhLsnLs=
|
||||
github.com/chromedp/sysutil v1.0.0/go.mod h1:kgWmDdq8fTzXYcKIBqIYvRRTnYb9aNS9moAV0xufSww=
|
||||
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
|
||||
github.com/chzyer/logex v1.2.1/go.mod h1:JLbx6lG2kDbNRFnfkgvh4eRJRPX1QCoOIWomwysCBrQ=
|
||||
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
|
||||
github.com/chzyer/readline v1.5.1/go.mod h1:Eh+b79XXUwfKfcPLepksvw2tcLE/Ct21YObkaSkeBlk=
|
||||
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
|
||||
github.com/chzyer/test v1.0.0/go.mod h1:2JlltgoNkt4TW/z9V/IzDdFaMTM2JPIi26O1pF38GC8=
|
||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
|
||||
github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe h1:QQ3GSy+MqSHxm/d8nCtnAiZdYFd45cYZPs8vOOIYKfk=
|
||||
github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI=
|
||||
github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
||||
github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/PB79y4KOPYVyFYdROxgaCwdTQ=
|
||||
github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM=
|
||||
github.com/cockroachdb/apd/v3 v3.2.1 h1:U+8j7t0axsIgvQUqthuNm82HIrYXodOV2iWLWtEaIwg=
|
||||
github.com/cockroachdb/apd/v3 v3.2.1/go.mod h1:klXJcjp+FffLTHlhIG69tezTDvdP065naDsHzKhYSqc=
|
||||
github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I=
|
||||
github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo=
|
||||
github.com/containerd/stargz-snapshotter/estargz v0.15.1 h1:eXJjw9RbkLFgioVaTG+G/ZW/0kEe2oEKCdS/ZxIyoCU=
|
||||
github.com/containerd/stargz-snapshotter/estargz v0.15.1/go.mod h1:gr2RNwukQ/S9Nv33Lt6UC7xEx58C+LHRdoqbEKjz1Kk=
|
||||
github.com/coreos/go-oidc/v3 v3.10.0 h1:tDnXHnLyiTVyT/2zLDGj09pFPkhND8Gl8lnTRhoEaJU=
|
||||
github.com/coreos/go-oidc/v3 v3.10.0/go.mod h1:5j11xcw0D3+SGxn6Z/WFADsgcWVMyNAlSQupk0KK3ac=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||
github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY=
|
||||
github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk=
|
||||
github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
|
||||
github.com/docker/cli v26.0.0+incompatible h1:90BKrx1a1HKYpSnnBFR6AgDq/FqkHxwlUyzJVPxD30I=
|
||||
github.com/docker/cli v26.0.0+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
|
||||
github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk=
|
||||
github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
|
||||
github.com/docker/docker v26.0.0+incompatible h1:Ng2qi+gdKADUa/VM+6b6YaY2nlZhk/lVJiKR/2bMudU=
|
||||
github.com/docker/docker v26.0.0+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
|
||||
github.com/docker/docker-credential-helpers v0.8.1 h1:j/eKUktUltBtMzKqmfLB0PAgqYyMHOp5vfsD1807oKo=
|
||||
github.com/docker/docker-credential-helpers v0.8.1/go.mod h1:P3ci7E3lwkZg6XiHdRKft1KckHiO9a2rNtyFbZ/ry9M=
|
||||
github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c=
|
||||
github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc=
|
||||
github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4=
|
||||
github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
|
||||
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
|
||||
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
|
||||
github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g=
|
||||
github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
|
||||
github.com/emicklei/proto v1.10.0 h1:pDGyFRVV5RvV+nkBK9iy3q67FBy9Xa7vwrOTE+g5aGw=
|
||||
github.com/emicklei/proto v1.10.0/go.mod h1:rn1FgRS/FANiZdD2djyH7TMA9jdRDcYQ9IEN9yvjX0A=
|
||||
github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA=
|
||||
github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE=
|
||||
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
|
||||
github.com/envoyproxy/go-control-plane v0.12.0 h1:4X+VP1GHd1Mhj6IB5mMeGbLCleqxjletLK6K0rbxyZI=
|
||||
github.com/envoyproxy/go-control-plane v0.12.0/go.mod h1:ZBTaoJ23lqITozF0M6G4/IragXCQKCnYbmlmtHvwRG0=
|
||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||
github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A=
|
||||
github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew=
|
||||
github.com/evanphx/json-patch v5.7.0+incompatible h1:vgGkfT/9f8zE6tvSCe74nfpAVDQ2tG6yudJd8LBksgI=
|
||||
github.com/evanphx/json-patch v5.7.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
|
||||
github.com/felixge/fgprof v0.9.3/go.mod h1:RdbpDgzqYVh/T9fPELJyV7EYJuHB55UTEULNun8eiPw=
|
||||
github.com/felixge/fgprof v0.9.4 h1:ocDNwMFlnA0NU0zSB3I52xkO4sFXk80VK9lXjLClu88=
|
||||
github.com/felixge/fgprof v0.9.4/go.mod h1:yKl+ERSa++RYOs32d8K6WEXCB4uXdLls4ZaZPpayhMM=
|
||||
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
|
||||
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
|
||||
github.com/fullstorydev/grpcurl v1.9.1 h1:YxX1aCcCc4SDBQfj9uoWcTLe8t4NWrZe1y+mk83BQgo=
|
||||
github.com/fullstorydev/grpcurl v1.9.1/go.mod h1:i8gKLIC6s93WdU3LSmkE5vtsCxyRmihUj5FK1cNW5EM=
|
||||
github.com/go-chi/chi/v5 v5.0.12 h1:9euLV5sTrTNTRUU9POmDUvfxyj6LAABLUcEWO+JJb4s=
|
||||
github.com/go-chi/chi/v5 v5.0.12/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
|
||||
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
|
||||
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
||||
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
||||
github.com/go-jose/go-jose/v3 v3.0.3 h1:fFKWeig/irsp7XD2zBxvnmA/XaRWp5V3CBsZXJF7G7k=
|
||||
github.com/go-jose/go-jose/v3 v3.0.3/go.mod h1:5b+7YgP7ZICgJDBdfjZaIt+H/9L9T/YQrVfLAMboGkQ=
|
||||
github.com/go-jose/go-jose/v4 v4.0.1 h1:QVEPDE3OluqXBQZDcnNvQrInro2h0e4eqNbnZSWqS6U=
|
||||
github.com/go-jose/go-jose/v4 v4.0.1/go.mod h1:WVf9LFMHh/QVrmqrOfqun0C45tMe3RoiKJMPvgWwLfY=
|
||||
github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY=
|
||||
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||
github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
||||
github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
|
||||
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
||||
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
|
||||
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
|
||||
github.com/go-openapi/inflect v0.19.0 h1:9jCH9scKIbHeV9m12SmPilScz6krDxKRasNNSNPXu/4=
|
||||
github.com/go-openapi/inflect v0.19.0/go.mod h1:lHpZVlpIQqLyKwJ4N+YSc9hchQy/i12fJykb83CRBH4=
|
||||
github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs=
|
||||
@@ -67,40 +185,114 @@ github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEe
|
||||
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls=
|
||||
github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68=
|
||||
github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA=
|
||||
github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM=
|
||||
github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
|
||||
github.com/gobwas/ws v1.2.1/go.mod h1:hRKAFb8wOxFROYNsT1bqfWnhX+b5MFeJM9r2ZSwg/KY=
|
||||
github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw=
|
||||
github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU=
|
||||
github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA=
|
||||
github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
|
||||
github.com/gofrs/uuid/v5 v5.0.0 h1:p544++a97kEL+svbcFbCQVM9KFu0Yo25UoISXGNNH9M=
|
||||
github.com/gofrs/uuid/v5 v5.0.0/go.mod h1:CDOjlDMVAtN56jqyRUZh58JT31Tiw7/oQyEXZV+9bD8=
|
||||
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
|
||||
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
|
||||
github.com/golang-jwt/jwt/v5 v5.0.0 h1:1n1XNM9hk7O9mnQoNBGolZvzebBQ7p93ULHRc28XJUE=
|
||||
github.com/golang-jwt/jwt/v5 v5.0.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk=
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||
github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||
github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y=
|
||||
github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
|
||||
github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
|
||||
github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
|
||||
github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
|
||||
github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
|
||||
github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk=
|
||||
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
|
||||
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
|
||||
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
|
||||
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
|
||||
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
|
||||
github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
|
||||
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
|
||||
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||
github.com/google/cel-go v0.17.4 h1:9556LOjSyIZlgnT0oaCYGq2uk9BM6fzuTXhzYHskonk=
|
||||
github.com/google/cel-go v0.17.4/go.mod h1:HXZKzB0LXqer5lHHgfWAnlYwJaQBDKMjxjulNQzhwhY=
|
||||
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
|
||||
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
|
||||
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/cel-go v0.20.1 h1:nDx9r8S3L4pE61eDdt8igGj8rf5kjYR3ILxWIpWNi84=
|
||||
github.com/google/cel-go v0.20.1/go.mod h1:kWcIzTsPX0zmQ+H3TirHstLLf9ep5QTsZBN9u4dOYLg=
|
||||
github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I=
|
||||
github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U=
|
||||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
||||
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
||||
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/go-containerregistry v0.19.1 h1:yMQ62Al6/V0Z7CqIrrS1iYoA5/oQCm88DeNujc7C1KY=
|
||||
github.com/google/go-containerregistry v0.19.1/go.mod h1:YCMFNQeeXeLF+dnhhWkqDItx/JSkH01j1Kis4PsjzFI=
|
||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
|
||||
github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26 h1:Xim43kblpZXfIBQsbuBVKCudVG457BR2GZFIz3uw3hQ=
|
||||
github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26/go.mod h1:dDKJzRmX4S37WGHujM7tX//fmj1uioxKzKxz3lo4HJo=
|
||||
github.com/google/uuid v1.5.0 h1:1p67kYwdtXjb0gL0BPiP1Av9wiZPo5A8z2cWkTZ+eyU=
|
||||
github.com/google/uuid v1.5.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
|
||||
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
|
||||
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
|
||||
github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
|
||||
github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||
github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||
github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||
github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||
github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||
github.com/google/pprof v0.0.0-20211214055906-6f57359322fd/go.mod h1:KgnwoLYCZ8IQu3XUZ8Nc/bM9CCZFOyjUNOSygVozoDg=
|
||||
github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik=
|
||||
github.com/google/pprof v0.0.0-20240327155427-868f304927ed h1:n8QtJTrwsv3P7dNxPaMeNkMcxvUpqocsHLr8iDLGlQI=
|
||||
github.com/google/pprof v0.0.0-20240327155427-868f304927ed/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw=
|
||||
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
|
||||
github.com/google/subcommands v1.0.1/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk=
|
||||
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/wire v0.5.0 h1:I7ELFeVBr3yfPIcc8+MWvrjk+3VjbcSzoXm3JVa+jD8=
|
||||
github.com/google/wire v0.5.0/go.mod h1:ngWDr9Qvq3yZA10YrxfyGELY/AFWGVpy9c1LTRi1EoU=
|
||||
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
|
||||
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 h1:Wqo399gCIufwto+VfwCSvsnfGpF/w5E9CNxSwbpD6No=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0/go.mod h1:qmOFXW2epJhM0qSnUUYpldc7gVz2KMQwJ/QYCDIa7XU=
|
||||
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k=
|
||||
github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM=
|
||||
github.com/hashicorp/hcl/v2 v2.13.0 h1:0Apadu1w6M11dyGFxWnmhhcMjkbAiKCv7G1r/2QgCNc=
|
||||
github.com/hashicorp/hcl/v2 v2.13.0/go.mod h1:e4z5nxYlWNPdDSNYX+ph14EvWYMFm3eP0zIUqPc2jr0=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20230524184225-eabc099b10ab/go.mod h1:gx7rwoVhcfuVKG5uya9Hs3Sxj7EIvldVofAWIUtGouw=
|
||||
github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4=
|
||||
github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY=
|
||||
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
|
||||
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
|
||||
github.com/int128/kubelogin v1.28.0 h1:T1xQ/dw2aIX/Bvv3KtSk8m8u483acr/5lidVRLBgIQ4=
|
||||
github.com/int128/kubelogin v1.28.0/go.mod h1:UM4ShH939mXO1Cd0ns13mYQsUctyLbfHFHq8a6NXMG0=
|
||||
github.com/int128/listener v1.1.0 h1:2Jb41DWLpkQ3I9bIdBzO8H/tNwMvyl/OBZWtCV5Pjuw=
|
||||
github.com/int128/listener v1.1.0/go.mod h1:68WkmTN8PQtLzc9DucIaagAKeGVyMnyyKIkW4Xn47UA=
|
||||
github.com/int128/oauth2cli v1.14.0 h1:r63NoO10ybUXIXUQxih8WOmt5HQpJubdTmhWh22B9VE=
|
||||
github.com/int128/oauth2cli v1.14.0/go.mod h1:LIoVAzgAsS2tDDBc8yopkcgY5oZR0+MJAeECkCwtxhA=
|
||||
github.com/int128/oauth2dev v1.0.0 h1:emMhky6ssFEiyujCGcTpuUkeBg121IvcFey54CxW844=
|
||||
github.com/int128/oauth2dev v1.0.0/go.mod h1:lLIeCHF2MzH+sQ35/2IgA+Lbti/K2ONjrwO3n3FKSAM=
|
||||
github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM=
|
||||
github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg=
|
||||
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk=
|
||||
@@ -109,12 +301,22 @@ github.com/jackc/pgx/v5 v5.5.5 h1:amBjrZVmksIdNjxGW/IiIMzxMKZFelXbUoPNb+8sjQw=
|
||||
github.com/jackc/pgx/v5 v5.5.5/go.mod h1:ez9gk+OAat140fv9ErkZDYFWmXLfV+++K0uAOiwgm1A=
|
||||
github.com/jackc/puddle/v2 v2.2.1 h1:RhxXJtFG022u4ibrCSMSiu5aOq1i77R3OHKNJj77OAk=
|
||||
github.com/jackc/puddle/v2 v2.2.1/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4=
|
||||
github.com/jdx/go-netrc v1.0.0 h1:QbLMLyCZGj0NA8glAhxUpf1zDg6cxnWgMBbjq40W0gQ=
|
||||
github.com/jdx/go-netrc v1.0.0/go.mod h1:Gh9eFQJnoTNIRHXl2j5bJXA1u84hQWJWgGh569zF3v8=
|
||||
github.com/jhump/protoreflect v1.16.0 h1:54fZg+49widqXYQ0b+usAFHbMkBGR4PpXrsHc8+TBDg=
|
||||
github.com/jhump/protoreflect v1.16.0/go.mod h1:oYPd7nPvcBw/5wlDfm/AVmU9zH9BgqGCI469pGxfj/8=
|
||||
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
|
||||
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
|
||||
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
|
||||
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
||||
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
|
||||
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
|
||||
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
|
||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||
github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg=
|
||||
github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
|
||||
github.com/klauspost/pgzip v1.2.6 h1:8RXeL5crjEUFnR2/Sn6GJNWtSQ3Dk8pq4CL3jvdDyjU=
|
||||
github.com/klauspost/pgzip v1.2.6/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
|
||||
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
|
||||
@@ -125,6 +327,7 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
|
||||
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
|
||||
github.com/ledongthuc/pdf v0.0.0-20220302134840-0c2507a12d80/go.mod h1:imJHygn/1yfhB7XSJJKlFZKl/J+dCPAknuiaGOshXAs=
|
||||
github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw=
|
||||
github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
|
||||
github.com/lmittmann/tint v1.0.4 h1:LeYihpJ9hyGvE0w+K2okPTGUdVLfng1+nDNVR4vWISc=
|
||||
@@ -137,13 +340,21 @@ github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/Qd
|
||||
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
|
||||
github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU=
|
||||
github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
|
||||
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
|
||||
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||
github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0=
|
||||
github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0=
|
||||
github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0=
|
||||
github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo=
|
||||
github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0=
|
||||
github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y=
|
||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
|
||||
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
|
||||
github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A=
|
||||
github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
|
||||
github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4=
|
||||
@@ -158,12 +369,19 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8
|
||||
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
|
||||
github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug=
|
||||
github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM=
|
||||
github.com/orisano/pixelmatch v0.0.0-20220722002657-fb0b55479cde/go.mod h1:nZgzbfBr3hhjoZnS66nKrHmduYNpc34ny7RK4z5/HM0=
|
||||
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI=
|
||||
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ=
|
||||
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU=
|
||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/profile v1.7.0 h1:hnbDkaNWPCLMO9wGLdBFTIZvzDrDfBM2072E1S9gJkA=
|
||||
github.com/pkg/profile v1.7.0/go.mod h1:8Uer0jas47ZQMJ7VD+OHknK4YDY07LPUC6dEvqDjvNo=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU=
|
||||
github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k=
|
||||
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw=
|
||||
github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI=
|
||||
github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE=
|
||||
@@ -174,13 +392,19 @@ github.com/protocolbuffers/txtpbfmt v0.0.0-20230328191034-3462fbc510c0 h1:sadMIs
|
||||
github.com/protocolbuffers/txtpbfmt v0.0.0-20230328191034-3462fbc510c0/go.mod h1:jgxiZysxFPM+iWKwQwPR+y+Jvo54ARd4EisXxKYpB5c=
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE=
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
|
||||
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||
github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=
|
||||
github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4=
|
||||
github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo=
|
||||
github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU=
|
||||
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
|
||||
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||
github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ=
|
||||
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
|
||||
github.com/sethvargo/go-retry v0.2.4 h1:T+jHEQy/zKJf5s95UkguisicE0zuF9y7+/vgz08Ocec=
|
||||
github.com/sethvargo/go-retry v0.2.4/go.mod h1:1afjQuvh7s4gflMObvjLPaWgluLLyhA1wmVZ6KLpICw=
|
||||
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
|
||||
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
|
||||
github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0=
|
||||
github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho=
|
||||
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
|
||||
@@ -190,40 +414,131 @@ github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8w
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
||||
github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY=
|
||||
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
||||
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
|
||||
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
||||
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
|
||||
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
||||
github.com/vbatts/tar-split v0.11.5 h1:3bHCTIheBm1qFTcgh9oPu+nNBtX+XJIupG/vacinCts=
|
||||
github.com/vbatts/tar-split v0.11.5/go.mod h1:yZbwRsSeGjusneWgA781EKej9HF8vme8okylkAeNKLk=
|
||||
github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4=
|
||||
github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI=
|
||||
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||
github.com/zclconf/go-cty v1.8.0 h1:s4AvqaeQzJIu3ndv4gVIhplVD0krU+bgrcLSVUnaWuA=
|
||||
github.com/zclconf/go-cty v1.8.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk=
|
||||
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
|
||||
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
|
||||
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||
go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw=
|
||||
go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k=
|
||||
go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.25.0 h1:dT33yIHtmsqpixFsSQPwNeY5drM9wTcoL8h0FWF4oGM=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.25.0/go.mod h1:h95q0LBGh7hlAC08X2DhSeyIG02YQ0UyioTCVAqRPmc=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 h1:Xw8U6u2f8DK2XAkGRFV7BBLENgnTGX9i4rQRxJf+/vs=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0/go.mod h1:6KW1Fm6R/s6Z3PGXwSJN2K4eT6wQB3vXX6CVnYX9NmM=
|
||||
go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA=
|
||||
go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s=
|
||||
go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo=
|
||||
go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.19.0 h1:EJoTO5qysMsYCa+w4UghwFV/ptQgqSL/8Ni+hx+8i1k=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.19.0/go.mod h1:XjG0jQyFJrv2PbMvwND7LwCEhsJzCzV5210euduKcKY=
|
||||
go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM=
|
||||
go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I=
|
||||
go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI=
|
||||
go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY=
|
||||
go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE=
|
||||
go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0=
|
||||
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
|
||||
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
|
||||
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
|
||||
go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
|
||||
go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
|
||||
golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA=
|
||||
golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=
|
||||
golang.org/x/exp v0.0.0-20231108232855-2478ac86f678 h1:mchzmB1XO2pMaKFRqk/+MV3mgGG96aqaPXaMifQU47w=
|
||||
golang.org/x/exp v0.0.0-20231108232855-2478ac86f678/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
|
||||
golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek=
|
||||
golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY=
|
||||
golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
|
||||
golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
|
||||
golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
|
||||
golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=
|
||||
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
|
||||
golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8 h1:aAcj0Da7eBAtrTp03QXWvm88pSyOt+UgdZw2BFZ+lEw=
|
||||
golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8/go.mod h1:CQ1k9gNrJ50XIzaKCRR2hssIjF07kZFEiieALBM/ARQ=
|
||||
golang.org/x/exp/typeparams v0.0.0-20221208152030-732eee02a75a h1:Jw5wfR+h9mnIYH+OtGT2im5wV1YGGDora5vTv/aa5bE=
|
||||
golang.org/x/exp/typeparams v0.0.0-20221208152030-732eee02a75a/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk=
|
||||
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
|
||||
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
||||
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs=
|
||||
golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
|
||||
golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
|
||||
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
|
||||
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
|
||||
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
|
||||
golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=
|
||||
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
|
||||
golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
|
||||
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic=
|
||||
golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
@@ -231,22 +546,64 @@ golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
|
||||
golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc=
|
||||
golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/oauth2 v0.18.0 h1:09qnuIAgzdx1XplqJvW6CQqMCtGZykZWcXzPMPUusvI=
|
||||
golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
|
||||
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
@@ -260,7 +617,9 @@ golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
|
||||
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
|
||||
golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8=
|
||||
golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58=
|
||||
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
@@ -270,11 +629,53 @@ golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
|
||||
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk=
|
||||
golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
|
||||
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190422233926-fe54fb35175b/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||
golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||
golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||
golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||
golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
|
||||
golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
|
||||
golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8=
|
||||
golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||
golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
|
||||
@@ -284,29 +685,117 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
|
||||
google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
|
||||
google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
|
||||
google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
|
||||
google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
|
||||
google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
|
||||
google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
|
||||
google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
|
||||
google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
|
||||
google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
|
||||
google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
|
||||
google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
|
||||
google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
|
||||
google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
|
||||
google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM=
|
||||
google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc=
|
||||
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
||||
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=
|
||||
google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
|
||||
google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
|
||||
google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM=
|
||||
google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc h1:kVKPf/IiYSBWEWtkIn6wZXwWGCnLKcC8oWfZvXjsGnM=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc h1:XSJ8Vk1SWuNr8S18z1NZSziL0CPIXLCCMDOEFtHBOFc=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA=
|
||||
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
|
||||
google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
|
||||
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
|
||||
google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8=
|
||||
google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
|
||||
google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
|
||||
google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
|
||||
google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
|
||||
google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
|
||||
google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
|
||||
google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA=
|
||||
google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U=
|
||||
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
|
||||
google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA=
|
||||
google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20240325203815-454cdb8f5daa h1:Jt1XW5PaLXF1/ePZrznsh/aAUvI7Adfc3LY1dAKlzRs=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20240325203815-454cdb8f5daa/go.mod h1:K4kfzHtI0kqWA79gecJarFtDn/Mls+GxQcg3Zox91Ac=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240325203815-454cdb8f5daa h1:RBgMaUMP+6soRkik4VoN8ojR2nex2TqZwjSSogic+eo=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240325203815-454cdb8f5daa/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY=
|
||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
||||
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
|
||||
google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
|
||||
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
||||
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
|
||||
google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
|
||||
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
|
||||
google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
|
||||
google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60=
|
||||
google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
|
||||
google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
|
||||
google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
|
||||
google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk=
|
||||
google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE=
|
||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
||||
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
||||
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
|
||||
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
|
||||
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
|
||||
google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
|
||||
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
|
||||
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
|
||||
google.golang.org/protobuf v1.33.1-0.20240408130810-98873a205002 h1:V7Da7qt0MkY3noVANIMVBk28nOnijADeOR3i5Hcvpj4=
|
||||
google.golang.org/protobuf v1.33.1-0.20240408130810-98873a205002/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
||||
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
|
||||
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
|
||||
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0=
|
||||
gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8=
|
||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
|
||||
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
||||
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
||||
honnef.co/go/tools v0.4.7 h1:9MDAWxMoSnB6QoSqiVr7P5mtkT9pOc1kSxchzPCnqJs=
|
||||
honnef.co/go/tools v0.4.7/go.mod h1:+rnGS1THNh8zMwnd2oVOTL9QF6vmfyG6ZXBULae2uc0=
|
||||
k8s.io/api v0.29.2 h1:hBC7B9+MU+ptchxEqTNW2DkUosJpp1P+Wn6YncZ474A=
|
||||
k8s.io/api v0.29.2/go.mod h1:sdIaaKuU7P44aoyyLlikSLayT6Vb7bvJNCX105xZXY0=
|
||||
k8s.io/apimachinery v0.29.2 h1:EWGpfJ856oj11C52NRCHuU7rFDwxev48z+6DSlGNsV8=
|
||||
@@ -337,6 +826,9 @@ modernc.org/strutil v1.2.0 h1:agBi9dp1I+eOnxXeiZawM8F4LawKv4NzGWSaLfyeNZA=
|
||||
modernc.org/strutil v1.2.0/go.mod h1:/mdcBmfOibveCTBxUl5B5l6W+TTH1FXPLHZE6bTosX0=
|
||||
modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y=
|
||||
modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM=
|
||||
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
|
||||
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
|
||||
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
|
||||
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo=
|
||||
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0=
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4=
|
||||
|
||||
2
hack/tilt/.gitignore
vendored
Normal file
2
hack/tilt/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
aws-login.last
|
||||
kubeconfig
|
||||
7
hack/tilt/Dockerfile
Normal file
7
hack/tilt/Dockerfile
Normal file
@@ -0,0 +1,7 @@
|
||||
FROM 271053619184.dkr.ecr.us-east-2.amazonaws.com/holos-run/container-images/debian:bullseye AS final
|
||||
USER root
|
||||
WORKDIR /app
|
||||
ADD bin bin
|
||||
RUN chown -R app: /app
|
||||
USER app
|
||||
ENTRYPOINT bin/holos server
|
||||
21
hack/tilt/aws-login.sh
Executable file
21
hack/tilt/aws-login.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#! /bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
PARENT="$(cd $(dirname "$0") && pwd)"
|
||||
|
||||
# If necessary
|
||||
if [[ -s "${PARENT}/aws-login.last" ]]; then
|
||||
last="$(<"${PARENT}/aws-login.last")"
|
||||
now="$(date +%s)"
|
||||
if [[ $(( now - last )) -lt 28800 ]]; then
|
||||
echo "creds are still valid" >&2
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
aws sso logout
|
||||
aws sso login
|
||||
aws ecr get-login-password --region us-east-2 | docker login --username AWS --password-stdin "${AWS_ACCOUNT}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com"
|
||||
# Touch a file so tilt docker_build can watch it as a dep
|
||||
date +%s > "${PARENT}/aws-login.last"
|
||||
7
hack/tilt/aws.config
Normal file
7
hack/tilt/aws.config
Normal file
@@ -0,0 +1,7 @@
|
||||
[profile dev-holos]
|
||||
sso_account_id = 271053619184
|
||||
sso_role_name = AdministratorAccess
|
||||
sso_start_url = https://openinfrastructure.awsapps.com/start
|
||||
sso_region = us-east-2
|
||||
region = us-east-2
|
||||
output = json
|
||||
9
hack/tilt/bin/tilt
Executable file
9
hack/tilt/bin/tilt
Executable file
@@ -0,0 +1,9 @@
|
||||
#! /bin/bash
|
||||
# Override kubeconfig so we can create it with local()
|
||||
set -euo pipefail
|
||||
TOPLEVEL="$(cd $(dirname "$0")/.. && pwd)"
|
||||
export NAMESPACE="${USER}-holos"
|
||||
export KUBECONFIG="${TOPLEVEL}/kubeconfig"
|
||||
envsubst < "${KUBECONFIG}.template" > "${KUBECONFIG}"
|
||||
export TILT_WRAPPER=1
|
||||
exec tilt "$@"
|
||||
153
hack/tilt/ecr-creds.yaml
Normal file
153
hack/tilt/ecr-creds.yaml
Normal file
@@ -0,0 +1,153 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: container-registry
|
||||
app.kubernetes.io/instance: holos-system-ecr
|
||||
app.kubernetes.io/name: holos-system-ecr
|
||||
app.kubernetes.io/part-of: holos
|
||||
name: holos-system-ecr
|
||||
namespace: holos-system
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: container-registry
|
||||
app.kubernetes.io/instance: holos-system-ecr
|
||||
app.kubernetes.io/name: holos-system-ecr
|
||||
app.kubernetes.io/part-of: holos
|
||||
name: holos-system-ecr
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- secrets
|
||||
- namespaces
|
||||
verbs:
|
||||
- list
|
||||
- apiGroups:
|
||||
- ""
|
||||
resourceNames:
|
||||
- holos-system-ecr-image-pull-creds
|
||||
resources:
|
||||
- secrets
|
||||
verbs:
|
||||
- '*'
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: container-registry
|
||||
app.kubernetes.io/instance: holos-system-ecr
|
||||
app.kubernetes.io/name: holos-system-ecr
|
||||
app.kubernetes.io/part-of: holos
|
||||
name: holos-system-ecr
|
||||
namespace: holos-system
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: holos-system-ecr
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: holos-system-ecr
|
||||
namespace: holos-system
|
||||
---
|
||||
apiVersion: v1
|
||||
data:
|
||||
refresh.sh: |-
|
||||
#! /bin/bash
|
||||
tmpdir="$(mktemp -d)"
|
||||
finish() {
|
||||
rm -rf "${tmpdir}"
|
||||
}
|
||||
trap finish EXIT
|
||||
set -euo pipefail
|
||||
aws sts assume-role-with-web-identity \
|
||||
--role-arn ${AWS_ROLE_ARN} \
|
||||
--role-session-name CronJob \
|
||||
--web-identity-token file:///run/secrets/irsa/serviceaccount/token \
|
||||
> "${tmpdir}/creds.json"
|
||||
export AWS_ACCESS_KEY_ID=$(jq -r .Credentials.AccessKeyId "${tmpdir}/creds.json")
|
||||
export AWS_SECRET_ACCESS_KEY=$(jq -r .Credentials.SecretAccessKey "${tmpdir}/creds.json")
|
||||
export AWS_SESSION_TOKEN=$(jq -r .Credentials.SessionToken "${tmpdir}/creds.json")
|
||||
set -x
|
||||
aws ecr get-login-password --region ${AWS_REGION} \
|
||||
| docker login --username AWS --password-stdin ${AWS_ACCOUNT}.dkr.ecr.${AWS_REGION}.amazonaws.com
|
||||
kubectl create secret docker-registry 'holos-system-ecr-image-pull-creds' \
|
||||
--from-file=.dockerconfigjson=${HOME}/.docker/config.json \
|
||||
--dry-run=client -o yaml \
|
||||
> "${tmpdir}/secret.yaml"
|
||||
# Get namespaces one per line
|
||||
kubectl -o=jsonpath='{range .items[*]}{.metadata.name}{"\n"}{end}' get namespaces > ${tmpdir}/namespaces.txt
|
||||
# Copy the secret to all namespaces
|
||||
for ns in $(grep -vE '^gke-|^kube-|^gmp-' ${tmpdir}/namespaces.txt); do
|
||||
echo "---" >> "${tmpdir}/secretlist.yaml"
|
||||
kubectl --dry-run=client -o yaml -n $ns apply -f "${tmpdir}/secret.yaml" >> "${tmpdir}/secretlist.yaml"
|
||||
done
|
||||
kubectl apply --server-side=true -f "${tmpdir}/secretlist.yaml"
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: image-pull-secret
|
||||
app.kubernetes.io/instance: holos-system-ecr
|
||||
app.kubernetes.io/name: refresher
|
||||
app.kubernetes.io/part-of: holos
|
||||
name: holos-system-ecr
|
||||
namespace: holos-system
|
||||
---
|
||||
apiVersion: batch/v1
|
||||
kind: CronJob
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: container-registry
|
||||
app.kubernetes.io/instance: holos-system-ecr
|
||||
app.kubernetes.io/name: holos-system-ecr
|
||||
app.kubernetes.io/part-of: holos
|
||||
name: holos-system-ecr
|
||||
namespace: holos-system
|
||||
spec:
|
||||
schedule: 0 */4 * * *
|
||||
jobTemplate:
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- command:
|
||||
- bash
|
||||
- /app/scripts/refresh.sh
|
||||
env:
|
||||
- name: AWS_ACCOUNT
|
||||
value: "271053619184"
|
||||
- name: AWS_REGION
|
||||
value: us-east-2
|
||||
- name: AWS_ROLE_ARN
|
||||
value: arn:aws:iam::271053619184:role/ImagePull
|
||||
image: quay.io/holos/toolkit:latest
|
||||
imagePullPolicy: Always
|
||||
name: toolkit
|
||||
resources:
|
||||
limits:
|
||||
cpu: 50m
|
||||
memory: 64Mi
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 64Mi
|
||||
volumeMounts:
|
||||
- mountPath: /app/scripts
|
||||
name: scripts
|
||||
- mountPath: /run/secrets/irsa/serviceaccount
|
||||
name: irsa
|
||||
restartPolicy: OnFailure
|
||||
serviceAccountName: holos-system-ecr
|
||||
volumes:
|
||||
- configMap:
|
||||
name: holos-system-ecr
|
||||
name: scripts
|
||||
- name: irsa
|
||||
projected:
|
||||
sources:
|
||||
- serviceAccountToken:
|
||||
path: "token"
|
||||
audience: "irsa"
|
||||
expirationSeconds: 3600
|
||||
37
hack/tilt/get-pgadmin-creds
Executable file
37
hack/tilt/get-pgadmin-creds
Executable file
@@ -0,0 +1,37 @@
|
||||
#! /bin/bash
|
||||
#
|
||||
tmpdir="$(mktemp -d)"
|
||||
finish() {
|
||||
code=$?
|
||||
if [[ $code -gt 10 ]]; then
|
||||
jq . "${tmpdir}/creds.json"
|
||||
echo "could not update pg password: jq got null on line $code" >&2
|
||||
fi
|
||||
rm -rf "$tmpdir"
|
||||
exit $code
|
||||
}
|
||||
trap finish EXIT
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
umask 077
|
||||
|
||||
if [[ $(uname) != Darwin ]]; then
|
||||
pbcopy() {
|
||||
xsel --input --clipboard
|
||||
xsel --output --clipboard | xsel --input --primary
|
||||
}
|
||||
fi
|
||||
|
||||
sel="postgres-operator.crunchydata.com/pgadmin=${1}"
|
||||
|
||||
# secret="(kubectl -n "${NAMESPACE}" get secret --selector=$sel '--output=jsonpath={.items..metadata.name}')"
|
||||
|
||||
kubectl get secret "--selector=$sel" -o=json | jq '.items[].data | map_values(@base64d)' > "${tmpdir}/creds.json"
|
||||
|
||||
echo -n "username: "
|
||||
jq --exit-status -r ".username" "${tmpdir}/creds.json"
|
||||
password="$(jq --exit-status -r ".password" "${tmpdir}/creds.json")"
|
||||
# n.b. don't send the trailing newline.
|
||||
echo -n "$password" | pbcopy
|
||||
echo "password: copied to clipboard."
|
||||
53
hack/tilt/get-pgdb-creds
Executable file
53
hack/tilt/get-pgdb-creds
Executable file
@@ -0,0 +1,53 @@
|
||||
#! /bin/bash
|
||||
#
|
||||
tmpdir="$(mktemp -d)"
|
||||
finish() {
|
||||
code=$?
|
||||
if [[ $code -gt 10 ]]; then
|
||||
jq . "${tmpdir}/creds.json"
|
||||
echo "could not update pg password: jq got null on line $code" >&2
|
||||
fi
|
||||
rm -rf "$tmpdir"
|
||||
exit $code
|
||||
}
|
||||
trap finish EXIT
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
umask 077
|
||||
|
||||
if [[ $(uname) != Darwin ]]; then
|
||||
pbcopy() {
|
||||
xsel --input --clipboard
|
||||
xsel --output --clipboard | xsel --input --primary
|
||||
}
|
||||
fi
|
||||
|
||||
kubectl get secret "${1}-pguser-${2}" -o json > "${tmpdir}/creds.json"
|
||||
|
||||
export PGDATABASE="$(jq --exit-status -r '.data | map_values(@base64d) | .dbname' ${tmpdir}/creds.json || exit $LINENO)"
|
||||
export PGUSER="$(jq --exit-status -r '.data | map_values(@base64d) | .user' ${tmpdir}/creds.json || exit $LINENO)"
|
||||
export PGPASSWORD="$(jq --exit-status -r '.data | map_values(@base64d) | .password' ${tmpdir}/creds.json || exit $LINENO)"
|
||||
|
||||
prefix="${PGHOST}:${PGPORT}:${PGDATABASE}:${PGUSER}"
|
||||
if [[ -f ~/.pgpass ]]; then
|
||||
(grep -v "^${prefix}:" ~/.pgpass || true) > "${tmpdir}/pgpass"
|
||||
fi
|
||||
echo "${prefix}:${PGPASSWORD}" >> "${tmpdir}/pgpass"
|
||||
cp "${tmpdir}/pgpass" ~/.pgpass
|
||||
echo "updated: ${HOME}/.pgpass" >&2
|
||||
cat <<EOF >&2
|
||||
|
||||
## Connect from a localhost shell through the port forward to the cluster
|
||||
export PGHOST=${PGHOST}
|
||||
export PGPORT=${PGPORT}
|
||||
export PGDATABASE=${PGDATABASE}
|
||||
export PGUSER=${PGUSER}
|
||||
|
||||
psql -c '\conninfo'
|
||||
EOF
|
||||
psql --host=${PGHOST} --port=${PGPORT} ${PGDATABASE} -c '\conninfo'
|
||||
|
||||
# n.b. do not send a trailing newline to xsel
|
||||
echo -n "$PGPASSWORD" | pbcopy
|
||||
echo "password: copied to clipboard."
|
||||
9
hack/tilt/gh-issue-view
Executable file
9
hack/tilt/gh-issue-view
Executable file
@@ -0,0 +1,9 @@
|
||||
#! /bin/bash
|
||||
#
|
||||
set -euo pipefail
|
||||
issue="$(git rev-parse --abbrev-ref HEAD | tr -d -c 0-9)"
|
||||
if [[ -z $issue ]]; then
|
||||
echo "could not extract issue number from branch name" >&2
|
||||
exit 1
|
||||
fi
|
||||
exec gh issue view --comments $issue
|
||||
4
hack/tilt/gh-issues
Executable file
4
hack/tilt/gh-issues
Executable file
@@ -0,0 +1,4 @@
|
||||
#! /bin/bash
|
||||
set -euo pipefail
|
||||
export GH_FORCE_TTY='120%'
|
||||
exec gh issue list
|
||||
8
hack/tilt/go-test-failfast
Executable file
8
hack/tilt/go-test-failfast
Executable file
@@ -0,0 +1,8 @@
|
||||
#! /bin/bash
|
||||
#
|
||||
set -euo pipefail
|
||||
for s in $(go list ./...); do
|
||||
if ! go test -failfast -v -p 1 $s; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
20
hack/tilt/k8s-get-db-sts
Executable file
20
hack/tilt/k8s-get-db-sts
Executable file
@@ -0,0 +1,20 @@
|
||||
#! /bin/bash
|
||||
#
|
||||
# Output the stateful set yaml of the database using selectors
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
sel="postgres-operator.crunchydata.com/cluster=${1},postgres-operator.crunchydata.com/instance-set=db"
|
||||
|
||||
x=30
|
||||
while [[ $x -gt 0 ]]; do
|
||||
for pod in $(kubectl get statefulsets --selector=$sel '--output=jsonpath={.items..metadata.name}'); do
|
||||
echo "---"
|
||||
kubectl get -o yaml statefulsets/$pod
|
||||
x=0
|
||||
done
|
||||
if [[ $x -gt 0 ]]; then
|
||||
((x--))
|
||||
sleep 1
|
||||
fi
|
||||
done
|
||||
5
hack/tilt/k8s-namespace
Executable file
5
hack/tilt/k8s-namespace
Executable file
@@ -0,0 +1,5 @@
|
||||
#! /bin/bash
|
||||
#
|
||||
set -euo pipefail
|
||||
cp "${KUBECONFIG}.template" "${KUBECONFIG}"
|
||||
kubectl config set-context --current --namespace "${NAMESPACE}"
|
||||
308
hack/tilt/k8s.yaml
Normal file
308
hack/tilt/k8s.yaml
Normal file
@@ -0,0 +1,308 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: '{name}'
|
||||
namespace: '{namespace}'
|
||||
labels:
|
||||
app: '{name}'
|
||||
holos.run/developer: '{developer}'
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: '{name}'
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: '{name}'
|
||||
holos.run/developer: '{developer}'
|
||||
sidecar.istio.io/inject: 'true'
|
||||
spec:
|
||||
serviceAccountName: holos
|
||||
containers:
|
||||
- name: holos
|
||||
image: holos # Tilt appends a tilt-* tag for the built docker image
|
||||
# args are configured in the Tiltfile
|
||||
env:
|
||||
- name: GOMAXPROCS
|
||||
value: '1'
|
||||
- name: TZ
|
||||
value: '{tz}'
|
||||
- name: SHUTDOWN_DELAY
|
||||
value: '0'
|
||||
- name: DATABASE_URL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: holos-pguser-holos
|
||||
key: uri
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: {listen_port}
|
||||
protocol: TCP
|
||||
resources:
|
||||
requests:
|
||||
cpu: 250m
|
||||
memory: 100Mi
|
||||
limits:
|
||||
cpu: 1000m
|
||||
memory: 200Mi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: '{name}'
|
||||
namespace: '{namespace}'
|
||||
labels:
|
||||
app: '{name}'
|
||||
holos.run/developer: '{developer}'
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app: '{name}'
|
||||
ports:
|
||||
- name: http
|
||||
port: {listen_port}
|
||||
appProtocol: http2
|
||||
protocol: TCP
|
||||
targetPort: {listen_port}
|
||||
- name: metrics
|
||||
port: {metrics_port}
|
||||
appProtocol: http
|
||||
protocol: TCP
|
||||
targetPort: {metrics_port}
|
||||
---
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
name: '{name}'
|
||||
namespace: '{namespace}'
|
||||
labels:
|
||||
app: '{name}'
|
||||
holos.run/developer: '{developer}'
|
||||
spec:
|
||||
endpoints:
|
||||
- port: metrics
|
||||
path: /metrics
|
||||
interval: 15s
|
||||
selector:
|
||||
matchLabels:
|
||||
app: '{name}'
|
||||
holos.run/developer: '{developer}'
|
||||
---
|
||||
apiVersion: networking.istio.io/v1beta1
|
||||
kind: VirtualService
|
||||
metadata:
|
||||
name: '{name}'
|
||||
namespace: '{namespace}'
|
||||
labels:
|
||||
app: '{name}'
|
||||
holos.run/developer: '{developer}'
|
||||
spec:
|
||||
gateways:
|
||||
- istio-ingress/default
|
||||
hosts:
|
||||
- '{developer}.holos.dev.k2.ois.run'
|
||||
http:
|
||||
- route:
|
||||
- destination:
|
||||
host: '{name}'
|
||||
port:
|
||||
number: {listen_port}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: holos
|
||||
namespace: '{namespace}'
|
||||
labels:
|
||||
app: '{name}'
|
||||
holos.run/developer: '{developer}'
|
||||
imagePullSecrets:
|
||||
- name: kube-system-ecr-image-pull-creds
|
||||
---
|
||||
apiVersion: security.istio.io/v1beta1
|
||||
kind: AuthorizationPolicy
|
||||
metadata:
|
||||
labels:
|
||||
app: '{name}'
|
||||
holos.run/developer: '{developer}'
|
||||
name: '{name}-allow-groups'
|
||||
namespace: '{namespace}'
|
||||
spec:
|
||||
action: ALLOW
|
||||
rules:
|
||||
- when:
|
||||
- key: request.auth.claims[groups]
|
||||
values:
|
||||
- holos-developer
|
||||
- holos-developer@openinfrastructure.co
|
||||
selector:
|
||||
matchLabels:
|
||||
holos.run/authz: dev-holos-sso
|
||||
---
|
||||
apiVersion: security.istio.io/v1beta1
|
||||
kind: AuthorizationPolicy
|
||||
metadata:
|
||||
name: '{name}-allow-nothing'
|
||||
namespace: '{namespace}'
|
||||
labels:
|
||||
app: '{name}'
|
||||
holos.run/developer: '{developer}'
|
||||
spec:
|
||||
action: ALLOW
|
||||
selector:
|
||||
matchLabels:
|
||||
holos.run/authz: dev-holos-sso
|
||||
---
|
||||
apiVersion: security.istio.io/v1beta1
|
||||
kind: AuthorizationPolicy
|
||||
metadata:
|
||||
name: '{name}-allow-well-known-paths'
|
||||
namespace: '{namespace}'
|
||||
labels:
|
||||
app: '{name}'
|
||||
holos.run/developer: '{developer}'
|
||||
spec:
|
||||
action: ALLOW
|
||||
rules:
|
||||
- to:
|
||||
- operation:
|
||||
paths:
|
||||
- /healthz
|
||||
- /metrics
|
||||
- /callbacks/github
|
||||
selector:
|
||||
matchLabels:
|
||||
holos.run/authz: dev-holos-sso
|
||||
---
|
||||
apiVersion: security.istio.io/v1beta1
|
||||
kind: AuthorizationPolicy
|
||||
metadata:
|
||||
name: '{name}-auth'
|
||||
namespace: '{namespace}'
|
||||
labels:
|
||||
app: '{name}'
|
||||
holos.run/developer: '{developer}'
|
||||
spec:
|
||||
action: CUSTOM
|
||||
provider:
|
||||
name: dev-holos-sso
|
||||
rules:
|
||||
- to:
|
||||
- operation:
|
||||
notPaths:
|
||||
- /healthz
|
||||
- /metrics
|
||||
- /callbacks/github
|
||||
when:
|
||||
- key: request.headers[Authorization]
|
||||
notValues:
|
||||
- Bearer *
|
||||
selector:
|
||||
matchLabels:
|
||||
holos.run/authz: dev-holos-sso
|
||||
---
|
||||
apiVersion: security.istio.io/v1beta1
|
||||
kind: RequestAuthentication
|
||||
metadata:
|
||||
name: '{name}'
|
||||
namespace: '{namespace}'
|
||||
labels:
|
||||
app: '{name}'
|
||||
holos.run/developer: '{developer}'
|
||||
spec:
|
||||
jwtRules:
|
||||
- audiences:
|
||||
- https://sso.dev.holos.run
|
||||
forwardOriginalToken: true
|
||||
fromHeaders:
|
||||
- name: x-auth-request-access-token
|
||||
issuer: https://idex.core.ois.run
|
||||
jwksUri: https://idex.core.ois.run/keys
|
||||
- audiences:
|
||||
- holos-cli
|
||||
forwardOriginalToken: true
|
||||
fromHeaders:
|
||||
- name: authorization
|
||||
prefix: 'Bearer '
|
||||
issuer: https://idex.core.ois.run
|
||||
jwksUri: https://idex.core.ois.run/keys
|
||||
selector:
|
||||
matchLabels:
|
||||
holos.run/authz: dev-holos-sso
|
||||
---
|
||||
apiVersion: postgres-operator.crunchydata.com/v1beta1
|
||||
kind: PGAdmin
|
||||
metadata:
|
||||
name: 'pgadmin'
|
||||
namespace: '{namespace}'
|
||||
labels:
|
||||
holos.run/developer: '{developer}'
|
||||
spec:
|
||||
serverGroups:
|
||||
- name: holos
|
||||
postgresClusterSelector:
|
||||
matchLabels:
|
||||
holos.run/developer: '{developer}'
|
||||
dataVolumeClaimSpec:
|
||||
accessModes:
|
||||
- "ReadWriteOnce"
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
---
|
||||
apiVersion: postgres-operator.crunchydata.com/v1beta1
|
||||
kind: PostgresCluster
|
||||
metadata:
|
||||
name: 'holos'
|
||||
namespace: '{namespace}'
|
||||
labels:
|
||||
holos.run/developer: '{developer}'
|
||||
spec:
|
||||
image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi8-16.1-0
|
||||
postgresVersion: 16
|
||||
users:
|
||||
- name: holos
|
||||
databases:
|
||||
- holos
|
||||
options: 'SUPERUSER'
|
||||
- name: '{developer}'
|
||||
databases:
|
||||
- holos
|
||||
- '{developer}'
|
||||
options: 'SUPERUSER'
|
||||
# https://access.crunchydata.com/documentation/postgres-operator/latest/architecture/user-management
|
||||
instances:
|
||||
- name: db
|
||||
dataVolumeClaimSpec:
|
||||
accessModes:
|
||||
- "ReadWriteOnce"
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- weight: 1
|
||||
podAffinityTerm:
|
||||
topologyKey: kubernetes.io/hostname
|
||||
labelSelector:
|
||||
matchLabels:
|
||||
postgres-operator.crunchydata.com/cluster: '{name}'
|
||||
backups:
|
||||
pgbackrest:
|
||||
image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:ubi8-2.47-2
|
||||
# https://github.com/CrunchyData/postgres-operator/issues/2531#issuecomment-1713676019
|
||||
global:
|
||||
archive-async: "y"
|
||||
archive-push-queue-max: "100MiB"
|
||||
spool-path: "/pgdata/backups"
|
||||
repos:
|
||||
- name: repo1
|
||||
volume:
|
||||
volumeClaimSpec:
|
||||
accessModes:
|
||||
- "ReadWriteOnce"
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
45
hack/tilt/kubeconfig.template
Normal file
45
hack/tilt/kubeconfig.template
Normal file
@@ -0,0 +1,45 @@
|
||||
apiVersion: v1
|
||||
clusters:
|
||||
- cluster:
|
||||
certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJpVENDQVRDZ0F3SUJBZ0lSQU9TenlHd2VMK3N4NjVvckVCTXV1c293Q2dZSUtvWkl6ajBFQXdJd0ZURVQKTUJFR0ExVUVDaE1LYTNWaVpYSnVaWFJsY3pBZUZ3MHlOREF5TVRNd05UQTRNRFJhRncwek5EQXlNVEF3TlRBNApNRFJhTUJVeEV6QVJCZ05WQkFvVENtdDFZbVZ5Ym1WMFpYTXdXVEFUQmdjcWhrak9QUUlCQmdncWhrak9QUU1CCkJ3TkNBQVREWUluR09EN2ZpbFVIeXNpZG1ac2Vtd2liTk9hT1A5ZzVJT1VsTkllUHZ1Y01ZV01aNWNkZXpVQmIKMGh4Zm1WYXR0QWxpcnorMlFpVld5by9WZFNsOG8yRXdYekFPQmdOVkhROEJBZjhFQkFNQ0FvUXdIUVlEVlIwbApCQll3RkFZSUt3WUJCUVVIQXdFR0NDc0dBUVVGQndNQ01BOEdBMVVkRXdFQi93UUZNQU1CQWY4d0hRWURWUjBPCkJCWUVGTGVtcEhSM25lVXYvSUc1WWpwempDbWUydmIyTUFvR0NDcUdTTTQ5QkFNQ0EwY0FNRVFDSUNZajRsNUgKL043OG5UcnJxQzMxWjlsY0lpODEwcno5N3JIdUJnWFZZUkxBQWlBNHVEc0YyNEI5aGV3WklUbWEwaHpCMjNOdQpwZnprTWV5VzZHV2U2RWh4NGc9PQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==
|
||||
server: https://k2.core.ois.run:6443
|
||||
name: k2
|
||||
contexts:
|
||||
- context:
|
||||
cluster: k2
|
||||
namespace: default
|
||||
user: admin@k2
|
||||
name: admin@k2
|
||||
- context:
|
||||
cluster: k2
|
||||
namespace: ${NAMESPACE}
|
||||
user: oidc
|
||||
name: sso@k2
|
||||
current-context: sso@k2
|
||||
kind: Config
|
||||
preferences: {}
|
||||
users:
|
||||
- name: admin@k2
|
||||
user:
|
||||
client-certificate-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJoRENDQVNxZ0F3SUJBZ0lRVXZKTlEvV0Ewalg5RXF6ZElIMFA4ekFLQmdncWhrak9QUVFEQWpBVk1STXcKRVFZRFZRUUtFd3ByZFdKbGNtNWxkR1Z6TUI0WERUSTBNRE14TVRJek1UY3hPVm9YRFRJMU1ETXhNVEl6TVRjeQpPVm93S1RFWE1CVUdBMVVFQ2hNT2MzbHpkR1Z0T20xaGMzUmxjbk14RGpBTUJnTlZCQU1UQldGa2JXbHVNRmt3CkV3WUhLb1pJemowQ0FRWUlLb1pJemowREFRY0RRZ0FFNjZrMStQb1l5OHlPWTZkRFR5MHJYRTUvRlZJVU0rbkcKNEVzSXZxOHBuZ2lVRWRkeTdYM3hvZ2E5d2NSZy8xeVZ4Q2FNbzBUVEZveXkxaVZMMWxGWDNLTklNRVl3RGdZRApWUjBQQVFIL0JBUURBZ1dnTUJNR0ExVWRKUVFNTUFvR0NDc0dBUVVGQndNQ01COEdBMVVkSXdRWU1CYUFGTGVtCnBIUjNuZVV2L0lHNVlqcHpqQ21lMnZiMk1Bb0dDQ3FHU000OUJBTUNBMGdBTUVVQ0lDaDVGTWlXV3hxVHYyc0wKQVdvQ2lxaWJ0OUNUMnpsNzRlSTllMEZPTzRKTkFpRUF5T0wwR3RxVnlTSHUzbUsvVDBxZFhYQ3dmdHdWQVE4cgo2ejJWaVZrMzg2dz0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=
|
||||
client-key-data: LS0tLS1CRUdJTiBFQyBQUklWQVRFIEtFWS0tLS0tCk1IY0NBUUVFSURtdTh0UGVrRmhlNzRXWm5idXlwOFZ1VUIxTVYwcTN4QklOclVVbjBaRjVvQW9HQ0NxR1NNNDkKQXdFSG9VUURRZ0FFNjZrMStQb1l5OHlPWTZkRFR5MHJYRTUvRlZJVU0rbkc0RXNJdnE4cG5naVVFZGR5N1gzeApvZ2E5d2NSZy8xeVZ4Q2FNbzBUVEZveXkxaVZMMWxGWDNBPT0KLS0tLS1FTkQgRUMgUFJJVkFURSBLRVktLS0tLQo=
|
||||
- name: oidc
|
||||
user:
|
||||
exec:
|
||||
apiVersion: client.authentication.k8s.io/v1beta1
|
||||
args:
|
||||
- oidc-login
|
||||
- get-token
|
||||
- --oidc-issuer-url=https://login.ois.run
|
||||
- --oidc-client-id=261774567918339420@holos_platform
|
||||
- --oidc-extra-scope=openid
|
||||
- --oidc-extra-scope=email
|
||||
- --oidc-extra-scope=profile
|
||||
- --oidc-extra-scope=groups
|
||||
- --oidc-extra-scope=offline_access
|
||||
- --oidc-extra-scope=urn:zitadel:iam:org:domain:primary:openinfrastructure.co
|
||||
- --oidc-use-pkce
|
||||
command: kubectl
|
||||
env: null
|
||||
interactiveMode: IfAvailable
|
||||
provideClusterInfo: false
|
||||
33
hack/tilt/pgpass-zalando
Executable file
33
hack/tilt/pgpass-zalando
Executable file
@@ -0,0 +1,33 @@
|
||||
#! /bin/bash
|
||||
#
|
||||
tmpdir="$(mktemp -d)"
|
||||
finish() {
|
||||
rm -rf "$tmpdir"
|
||||
}
|
||||
trap finish EXIT
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
umask 077
|
||||
|
||||
kubectl -n "dev-${USER}" get secret "${USER}.holos-server-db.credentials.postgresql.acid.zalan.do" -o json > "${tmpdir}/creds.json"
|
||||
if [[ -f ~/.pgpass ]]; then
|
||||
(grep -v "^localhost:14126:holos:${USER}:" ~/.pgpass || true) > "${tmpdir}/pgpass"
|
||||
fi
|
||||
PGUSER="$(jq -r '.data | map_values(@base64d) | .username' ${tmpdir}/creds.json)"
|
||||
PGPASSWORD="$(jq -r '.data | map_values(@base64d) | .password' ${tmpdir}/creds.json)"
|
||||
|
||||
echo "${PGHOST}:${PGPORT}:${PGDATABASE}:${PGUSER}:${PGPASSWORD}" >> "${tmpdir}/pgpass"
|
||||
cp "${tmpdir}/pgpass" ~/.pgpass
|
||||
echo "updated: ${HOME}/.pgpass" >&2
|
||||
cat <<EOF >&2
|
||||
|
||||
## Connect from a localhost shell through the port forward to the cluster
|
||||
export PGHOST=${PGHOST}
|
||||
export PGPORT=${PGPORT}
|
||||
export PGDATABASE=${PGDATABASE}
|
||||
export PGUSER=${PGUSER}
|
||||
|
||||
psql -c '\conninfo'
|
||||
EOF
|
||||
psql --host=${PGHOST} --port=${PGPORT} ${PGDATABASE} -c '\conninfo'
|
||||
@@ -10,14 +10,13 @@ import (
|
||||
"reflect"
|
||||
|
||||
"github.com/gofrs/uuid"
|
||||
"github.com/holos-run/holos/internal/server/ent/migrate"
|
||||
"github.com/holos-run/holos/internal/ent/migrate"
|
||||
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/dialect"
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"github.com/holos-run/holos/internal/server/ent/user"
|
||||
"github.com/holos-run/holos/internal/server/ent/useridentity"
|
||||
"github.com/holos-run/holos/internal/ent/organization"
|
||||
"github.com/holos-run/holos/internal/ent/user"
|
||||
)
|
||||
|
||||
// Client is the client that holds all ent builders.
|
||||
@@ -25,10 +24,10 @@ type Client struct {
|
||||
config
|
||||
// Schema is the client for creating, migrating and dropping schema.
|
||||
Schema *migrate.Schema
|
||||
// Organization is the client for interacting with the Organization builders.
|
||||
Organization *OrganizationClient
|
||||
// User is the client for interacting with the User builders.
|
||||
User *UserClient
|
||||
// UserIdentity is the client for interacting with the UserIdentity builders.
|
||||
UserIdentity *UserIdentityClient
|
||||
}
|
||||
|
||||
// NewClient creates a new client configured with the given options.
|
||||
@@ -40,8 +39,8 @@ func NewClient(opts ...Option) *Client {
|
||||
|
||||
func (c *Client) init() {
|
||||
c.Schema = migrate.NewSchema(c.driver)
|
||||
c.Organization = NewOrganizationClient(c.config)
|
||||
c.User = NewUserClient(c.config)
|
||||
c.UserIdentity = NewUserIdentityClient(c.config)
|
||||
}
|
||||
|
||||
type (
|
||||
@@ -134,8 +133,8 @@ func (c *Client) Tx(ctx context.Context) (*Tx, error) {
|
||||
return &Tx{
|
||||
ctx: ctx,
|
||||
config: cfg,
|
||||
Organization: NewOrganizationClient(cfg),
|
||||
User: NewUserClient(cfg),
|
||||
UserIdentity: NewUserIdentityClient(cfg),
|
||||
}, nil
|
||||
}
|
||||
|
||||
@@ -155,15 +154,15 @@ func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
|
||||
return &Tx{
|
||||
ctx: ctx,
|
||||
config: cfg,
|
||||
Organization: NewOrganizationClient(cfg),
|
||||
User: NewUserClient(cfg),
|
||||
UserIdentity: NewUserIdentityClient(cfg),
|
||||
}, nil
|
||||
}
|
||||
|
||||
// Debug returns a new debug-client. It's used to get verbose logging on specific operations.
|
||||
//
|
||||
// client.Debug().
|
||||
// User.
|
||||
// Organization.
|
||||
// Query().
|
||||
// Count(ctx)
|
||||
func (c *Client) Debug() *Client {
|
||||
@@ -185,29 +184,162 @@ func (c *Client) Close() error {
|
||||
// Use adds the mutation hooks to all the entity clients.
|
||||
// In order to add hooks to a specific client, call: `client.Node.Use(...)`.
|
||||
func (c *Client) Use(hooks ...Hook) {
|
||||
c.Organization.Use(hooks...)
|
||||
c.User.Use(hooks...)
|
||||
c.UserIdentity.Use(hooks...)
|
||||
}
|
||||
|
||||
// Intercept adds the query interceptors to all the entity clients.
|
||||
// In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.
|
||||
func (c *Client) Intercept(interceptors ...Interceptor) {
|
||||
c.Organization.Intercept(interceptors...)
|
||||
c.User.Intercept(interceptors...)
|
||||
c.UserIdentity.Intercept(interceptors...)
|
||||
}
|
||||
|
||||
// Mutate implements the ent.Mutator interface.
|
||||
func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error) {
|
||||
switch m := m.(type) {
|
||||
case *OrganizationMutation:
|
||||
return c.Organization.mutate(ctx, m)
|
||||
case *UserMutation:
|
||||
return c.User.mutate(ctx, m)
|
||||
case *UserIdentityMutation:
|
||||
return c.UserIdentity.mutate(ctx, m)
|
||||
default:
|
||||
return nil, fmt.Errorf("ent: unknown mutation type %T", m)
|
||||
}
|
||||
}
|
||||
|
||||
// OrganizationClient is a client for the Organization schema.
|
||||
type OrganizationClient struct {
|
||||
config
|
||||
}
|
||||
|
||||
// NewOrganizationClient returns a client for the Organization from the given config.
|
||||
func NewOrganizationClient(c config) *OrganizationClient {
|
||||
return &OrganizationClient{config: c}
|
||||
}
|
||||
|
||||
// Use adds a list of mutation hooks to the hooks stack.
|
||||
// A call to `Use(f, g, h)` equals to `organization.Hooks(f(g(h())))`.
|
||||
func (c *OrganizationClient) Use(hooks ...Hook) {
|
||||
c.hooks.Organization = append(c.hooks.Organization, hooks...)
|
||||
}
|
||||
|
||||
// Intercept adds a list of query interceptors to the interceptors stack.
|
||||
// A call to `Intercept(f, g, h)` equals to `organization.Intercept(f(g(h())))`.
|
||||
func (c *OrganizationClient) Intercept(interceptors ...Interceptor) {
|
||||
c.inters.Organization = append(c.inters.Organization, interceptors...)
|
||||
}
|
||||
|
||||
// Create returns a builder for creating a Organization entity.
|
||||
func (c *OrganizationClient) Create() *OrganizationCreate {
|
||||
mutation := newOrganizationMutation(c.config, OpCreate)
|
||||
return &OrganizationCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}
|
||||
}
|
||||
|
||||
// CreateBulk returns a builder for creating a bulk of Organization entities.
|
||||
func (c *OrganizationClient) CreateBulk(builders ...*OrganizationCreate) *OrganizationCreateBulk {
|
||||
return &OrganizationCreateBulk{config: c.config, builders: builders}
|
||||
}
|
||||
|
||||
// MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates
|
||||
// a builder and applies setFunc on it.
|
||||
func (c *OrganizationClient) MapCreateBulk(slice any, setFunc func(*OrganizationCreate, int)) *OrganizationCreateBulk {
|
||||
rv := reflect.ValueOf(slice)
|
||||
if rv.Kind() != reflect.Slice {
|
||||
return &OrganizationCreateBulk{err: fmt.Errorf("calling to OrganizationClient.MapCreateBulk with wrong type %T, need slice", slice)}
|
||||
}
|
||||
builders := make([]*OrganizationCreate, rv.Len())
|
||||
for i := 0; i < rv.Len(); i++ {
|
||||
builders[i] = c.Create()
|
||||
setFunc(builders[i], i)
|
||||
}
|
||||
return &OrganizationCreateBulk{config: c.config, builders: builders}
|
||||
}
|
||||
|
||||
// Update returns an update builder for Organization.
|
||||
func (c *OrganizationClient) Update() *OrganizationUpdate {
|
||||
mutation := newOrganizationMutation(c.config, OpUpdate)
|
||||
return &OrganizationUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation}
|
||||
}
|
||||
|
||||
// UpdateOne returns an update builder for the given entity.
|
||||
func (c *OrganizationClient) UpdateOne(o *Organization) *OrganizationUpdateOne {
|
||||
mutation := newOrganizationMutation(c.config, OpUpdateOne, withOrganization(o))
|
||||
return &OrganizationUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}
|
||||
}
|
||||
|
||||
// UpdateOneID returns an update builder for the given id.
|
||||
func (c *OrganizationClient) UpdateOneID(id uuid.UUID) *OrganizationUpdateOne {
|
||||
mutation := newOrganizationMutation(c.config, OpUpdateOne, withOrganizationID(id))
|
||||
return &OrganizationUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}
|
||||
}
|
||||
|
||||
// Delete returns a delete builder for Organization.
|
||||
func (c *OrganizationClient) Delete() *OrganizationDelete {
|
||||
mutation := newOrganizationMutation(c.config, OpDelete)
|
||||
return &OrganizationDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}
|
||||
}
|
||||
|
||||
// DeleteOne returns a builder for deleting the given entity.
|
||||
func (c *OrganizationClient) DeleteOne(o *Organization) *OrganizationDeleteOne {
|
||||
return c.DeleteOneID(o.ID)
|
||||
}
|
||||
|
||||
// DeleteOneID returns a builder for deleting the given entity by its id.
|
||||
func (c *OrganizationClient) DeleteOneID(id uuid.UUID) *OrganizationDeleteOne {
|
||||
builder := c.Delete().Where(organization.ID(id))
|
||||
builder.mutation.id = &id
|
||||
builder.mutation.op = OpDeleteOne
|
||||
return &OrganizationDeleteOne{builder}
|
||||
}
|
||||
|
||||
// Query returns a query builder for Organization.
|
||||
func (c *OrganizationClient) Query() *OrganizationQuery {
|
||||
return &OrganizationQuery{
|
||||
config: c.config,
|
||||
ctx: &QueryContext{Type: TypeOrganization},
|
||||
inters: c.Interceptors(),
|
||||
}
|
||||
}
|
||||
|
||||
// Get returns a Organization entity by its id.
|
||||
func (c *OrganizationClient) Get(ctx context.Context, id uuid.UUID) (*Organization, error) {
|
||||
return c.Query().Where(organization.ID(id)).Only(ctx)
|
||||
}
|
||||
|
||||
// GetX is like Get, but panics if an error occurs.
|
||||
func (c *OrganizationClient) GetX(ctx context.Context, id uuid.UUID) *Organization {
|
||||
obj, err := c.Get(ctx, id)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return obj
|
||||
}
|
||||
|
||||
// Hooks returns the client hooks.
|
||||
func (c *OrganizationClient) Hooks() []Hook {
|
||||
return c.hooks.Organization
|
||||
}
|
||||
|
||||
// Interceptors returns the client interceptors.
|
||||
func (c *OrganizationClient) Interceptors() []Interceptor {
|
||||
return c.inters.Organization
|
||||
}
|
||||
|
||||
func (c *OrganizationClient) mutate(ctx context.Context, m *OrganizationMutation) (Value, error) {
|
||||
switch m.Op() {
|
||||
case OpCreate:
|
||||
return (&OrganizationCreate{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx)
|
||||
case OpUpdate:
|
||||
return (&OrganizationUpdate{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx)
|
||||
case OpUpdateOne:
|
||||
return (&OrganizationUpdateOne{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx)
|
||||
case OpDelete, OpDeleteOne:
|
||||
return (&OrganizationDelete{config: c.config, hooks: c.Hooks(), mutation: m}).Exec(ctx)
|
||||
default:
|
||||
return nil, fmt.Errorf("ent: unknown Organization mutation op: %q", m.Op())
|
||||
}
|
||||
}
|
||||
|
||||
// UserClient is a client for the User schema.
|
||||
type UserClient struct {
|
||||
config
|
||||
@@ -316,22 +448,6 @@ func (c *UserClient) GetX(ctx context.Context, id uuid.UUID) *User {
|
||||
return obj
|
||||
}
|
||||
|
||||
// QueryIdentities queries the identities edge of a User.
|
||||
func (c *UserClient) QueryIdentities(u *User) *UserIdentityQuery {
|
||||
query := (&UserIdentityClient{config: c.config}).Query()
|
||||
query.path = func(context.Context) (fromV *sql.Selector, _ error) {
|
||||
id := u.ID
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(user.Table, user.FieldID, id),
|
||||
sqlgraph.To(useridentity.Table, useridentity.FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, user.IdentitiesTable, user.IdentitiesColumn),
|
||||
)
|
||||
fromV = sqlgraph.Neighbors(u.driver.Dialect(), step)
|
||||
return fromV, nil
|
||||
}
|
||||
return query
|
||||
}
|
||||
|
||||
// Hooks returns the client hooks.
|
||||
func (c *UserClient) Hooks() []Hook {
|
||||
return c.hooks.User
|
||||
@@ -357,161 +473,12 @@ func (c *UserClient) mutate(ctx context.Context, m *UserMutation) (Value, error)
|
||||
}
|
||||
}
|
||||
|
||||
// UserIdentityClient is a client for the UserIdentity schema.
|
||||
type UserIdentityClient struct {
|
||||
config
|
||||
}
|
||||
|
||||
// NewUserIdentityClient returns a client for the UserIdentity from the given config.
|
||||
func NewUserIdentityClient(c config) *UserIdentityClient {
|
||||
return &UserIdentityClient{config: c}
|
||||
}
|
||||
|
||||
// Use adds a list of mutation hooks to the hooks stack.
|
||||
// A call to `Use(f, g, h)` equals to `useridentity.Hooks(f(g(h())))`.
|
||||
func (c *UserIdentityClient) Use(hooks ...Hook) {
|
||||
c.hooks.UserIdentity = append(c.hooks.UserIdentity, hooks...)
|
||||
}
|
||||
|
||||
// Intercept adds a list of query interceptors to the interceptors stack.
|
||||
// A call to `Intercept(f, g, h)` equals to `useridentity.Intercept(f(g(h())))`.
|
||||
func (c *UserIdentityClient) Intercept(interceptors ...Interceptor) {
|
||||
c.inters.UserIdentity = append(c.inters.UserIdentity, interceptors...)
|
||||
}
|
||||
|
||||
// Create returns a builder for creating a UserIdentity entity.
|
||||
func (c *UserIdentityClient) Create() *UserIdentityCreate {
|
||||
mutation := newUserIdentityMutation(c.config, OpCreate)
|
||||
return &UserIdentityCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}
|
||||
}
|
||||
|
||||
// CreateBulk returns a builder for creating a bulk of UserIdentity entities.
|
||||
func (c *UserIdentityClient) CreateBulk(builders ...*UserIdentityCreate) *UserIdentityCreateBulk {
|
||||
return &UserIdentityCreateBulk{config: c.config, builders: builders}
|
||||
}
|
||||
|
||||
// MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates
|
||||
// a builder and applies setFunc on it.
|
||||
func (c *UserIdentityClient) MapCreateBulk(slice any, setFunc func(*UserIdentityCreate, int)) *UserIdentityCreateBulk {
|
||||
rv := reflect.ValueOf(slice)
|
||||
if rv.Kind() != reflect.Slice {
|
||||
return &UserIdentityCreateBulk{err: fmt.Errorf("calling to UserIdentityClient.MapCreateBulk with wrong type %T, need slice", slice)}
|
||||
}
|
||||
builders := make([]*UserIdentityCreate, rv.Len())
|
||||
for i := 0; i < rv.Len(); i++ {
|
||||
builders[i] = c.Create()
|
||||
setFunc(builders[i], i)
|
||||
}
|
||||
return &UserIdentityCreateBulk{config: c.config, builders: builders}
|
||||
}
|
||||
|
||||
// Update returns an update builder for UserIdentity.
|
||||
func (c *UserIdentityClient) Update() *UserIdentityUpdate {
|
||||
mutation := newUserIdentityMutation(c.config, OpUpdate)
|
||||
return &UserIdentityUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation}
|
||||
}
|
||||
|
||||
// UpdateOne returns an update builder for the given entity.
|
||||
func (c *UserIdentityClient) UpdateOne(ui *UserIdentity) *UserIdentityUpdateOne {
|
||||
mutation := newUserIdentityMutation(c.config, OpUpdateOne, withUserIdentity(ui))
|
||||
return &UserIdentityUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}
|
||||
}
|
||||
|
||||
// UpdateOneID returns an update builder for the given id.
|
||||
func (c *UserIdentityClient) UpdateOneID(id uuid.UUID) *UserIdentityUpdateOne {
|
||||
mutation := newUserIdentityMutation(c.config, OpUpdateOne, withUserIdentityID(id))
|
||||
return &UserIdentityUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}
|
||||
}
|
||||
|
||||
// Delete returns a delete builder for UserIdentity.
|
||||
func (c *UserIdentityClient) Delete() *UserIdentityDelete {
|
||||
mutation := newUserIdentityMutation(c.config, OpDelete)
|
||||
return &UserIdentityDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}
|
||||
}
|
||||
|
||||
// DeleteOne returns a builder for deleting the given entity.
|
||||
func (c *UserIdentityClient) DeleteOne(ui *UserIdentity) *UserIdentityDeleteOne {
|
||||
return c.DeleteOneID(ui.ID)
|
||||
}
|
||||
|
||||
// DeleteOneID returns a builder for deleting the given entity by its id.
|
||||
func (c *UserIdentityClient) DeleteOneID(id uuid.UUID) *UserIdentityDeleteOne {
|
||||
builder := c.Delete().Where(useridentity.ID(id))
|
||||
builder.mutation.id = &id
|
||||
builder.mutation.op = OpDeleteOne
|
||||
return &UserIdentityDeleteOne{builder}
|
||||
}
|
||||
|
||||
// Query returns a query builder for UserIdentity.
|
||||
func (c *UserIdentityClient) Query() *UserIdentityQuery {
|
||||
return &UserIdentityQuery{
|
||||
config: c.config,
|
||||
ctx: &QueryContext{Type: TypeUserIdentity},
|
||||
inters: c.Interceptors(),
|
||||
}
|
||||
}
|
||||
|
||||
// Get returns a UserIdentity entity by its id.
|
||||
func (c *UserIdentityClient) Get(ctx context.Context, id uuid.UUID) (*UserIdentity, error) {
|
||||
return c.Query().Where(useridentity.ID(id)).Only(ctx)
|
||||
}
|
||||
|
||||
// GetX is like Get, but panics if an error occurs.
|
||||
func (c *UserIdentityClient) GetX(ctx context.Context, id uuid.UUID) *UserIdentity {
|
||||
obj, err := c.Get(ctx, id)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return obj
|
||||
}
|
||||
|
||||
// QueryUser queries the user edge of a UserIdentity.
|
||||
func (c *UserIdentityClient) QueryUser(ui *UserIdentity) *UserQuery {
|
||||
query := (&UserClient{config: c.config}).Query()
|
||||
query.path = func(context.Context) (fromV *sql.Selector, _ error) {
|
||||
id := ui.ID
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(useridentity.Table, useridentity.FieldID, id),
|
||||
sqlgraph.To(user.Table, user.FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2O, true, useridentity.UserTable, useridentity.UserColumn),
|
||||
)
|
||||
fromV = sqlgraph.Neighbors(ui.driver.Dialect(), step)
|
||||
return fromV, nil
|
||||
}
|
||||
return query
|
||||
}
|
||||
|
||||
// Hooks returns the client hooks.
|
||||
func (c *UserIdentityClient) Hooks() []Hook {
|
||||
return c.hooks.UserIdentity
|
||||
}
|
||||
|
||||
// Interceptors returns the client interceptors.
|
||||
func (c *UserIdentityClient) Interceptors() []Interceptor {
|
||||
return c.inters.UserIdentity
|
||||
}
|
||||
|
||||
func (c *UserIdentityClient) mutate(ctx context.Context, m *UserIdentityMutation) (Value, error) {
|
||||
switch m.Op() {
|
||||
case OpCreate:
|
||||
return (&UserIdentityCreate{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx)
|
||||
case OpUpdate:
|
||||
return (&UserIdentityUpdate{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx)
|
||||
case OpUpdateOne:
|
||||
return (&UserIdentityUpdateOne{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx)
|
||||
case OpDelete, OpDeleteOne:
|
||||
return (&UserIdentityDelete{config: c.config, hooks: c.Hooks(), mutation: m}).Exec(ctx)
|
||||
default:
|
||||
return nil, fmt.Errorf("ent: unknown UserIdentity mutation op: %q", m.Op())
|
||||
}
|
||||
}
|
||||
|
||||
// hooks and interceptors per client, for fast access.
|
||||
type (
|
||||
hooks struct {
|
||||
User, UserIdentity []ent.Hook
|
||||
Organization, User []ent.Hook
|
||||
}
|
||||
inters struct {
|
||||
User, UserIdentity []ent.Interceptor
|
||||
Organization, User []ent.Interceptor
|
||||
}
|
||||
)
|
||||
@@ -12,8 +12,8 @@ import (
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"github.com/holos-run/holos/internal/server/ent/user"
|
||||
"github.com/holos-run/holos/internal/server/ent/useridentity"
|
||||
"github.com/holos-run/holos/internal/ent/organization"
|
||||
"github.com/holos-run/holos/internal/ent/user"
|
||||
)
|
||||
|
||||
// ent aliases to avoid import conflicts in user's code.
|
||||
@@ -74,8 +74,8 @@ var (
|
||||
func checkColumn(table, column string) error {
|
||||
initCheck.Do(func() {
|
||||
columnCheck = sql.NewColumnCheck(map[string]func(string) bool{
|
||||
organization.Table: organization.ValidColumn,
|
||||
user.Table: user.ValidColumn,
|
||||
useridentity.Table: useridentity.ValidColumn,
|
||||
})
|
||||
})
|
||||
return columnCheck(table, column)
|
||||
@@ -5,12 +5,12 @@ package enttest
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/holos-run/holos/internal/server/ent"
|
||||
"github.com/holos-run/holos/internal/ent"
|
||||
// required by schema hooks.
|
||||
_ "github.com/holos-run/holos/internal/server/ent/runtime"
|
||||
_ "github.com/holos-run/holos/internal/ent/runtime"
|
||||
|
||||
"entgo.io/ent/dialect/sql/schema"
|
||||
"github.com/holos-run/holos/internal/server/ent/migrate"
|
||||
"github.com/holos-run/holos/internal/ent/migrate"
|
||||
)
|
||||
|
||||
type (
|
||||
@@ -6,9 +6,21 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/holos-run/holos/internal/server/ent"
|
||||
"github.com/holos-run/holos/internal/ent"
|
||||
)
|
||||
|
||||
// The OrganizationFunc type is an adapter to allow the use of ordinary
|
||||
// function as Organization mutator.
|
||||
type OrganizationFunc func(context.Context, *ent.OrganizationMutation) (ent.Value, error)
|
||||
|
||||
// Mutate calls f(ctx, m).
|
||||
func (f OrganizationFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
|
||||
if mv, ok := m.(*ent.OrganizationMutation); ok {
|
||||
return f(ctx, mv)
|
||||
}
|
||||
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.OrganizationMutation", m)
|
||||
}
|
||||
|
||||
// The UserFunc type is an adapter to allow the use of ordinary
|
||||
// function as User mutator.
|
||||
type UserFunc func(context.Context, *ent.UserMutation) (ent.Value, error)
|
||||
@@ -21,18 +33,6 @@ func (f UserFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error)
|
||||
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.UserMutation", m)
|
||||
}
|
||||
|
||||
// The UserIdentityFunc type is an adapter to allow the use of ordinary
|
||||
// function as UserIdentity mutator.
|
||||
type UserIdentityFunc func(context.Context, *ent.UserIdentityMutation) (ent.Value, error)
|
||||
|
||||
// Mutate calls f(ctx, m).
|
||||
func (f UserIdentityFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
|
||||
if mv, ok := m.(*ent.UserIdentityMutation); ok {
|
||||
return f(ctx, mv)
|
||||
}
|
||||
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.UserIdentityMutation", m)
|
||||
}
|
||||
|
||||
// Condition is a hook condition function.
|
||||
type Condition func(context.Context, ent.Mutation) bool
|
||||
|
||||
49
internal/ent/migrate/schema.go
Normal file
49
internal/ent/migrate/schema.go
Normal file
@@ -0,0 +1,49 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package migrate
|
||||
|
||||
import (
|
||||
"entgo.io/ent/dialect/sql/schema"
|
||||
"entgo.io/ent/schema/field"
|
||||
)
|
||||
|
||||
var (
|
||||
// OrganizationsColumns holds the columns for the "organizations" table.
|
||||
OrganizationsColumns = []*schema.Column{
|
||||
{Name: "id", Type: field.TypeUUID},
|
||||
{Name: "created_at", Type: field.TypeTime},
|
||||
{Name: "updated_at", Type: field.TypeTime},
|
||||
{Name: "name", Type: field.TypeString, Unique: true},
|
||||
{Name: "display_name", Type: field.TypeString},
|
||||
}
|
||||
// OrganizationsTable holds the schema information for the "organizations" table.
|
||||
OrganizationsTable = &schema.Table{
|
||||
Name: "organizations",
|
||||
Columns: OrganizationsColumns,
|
||||
PrimaryKey: []*schema.Column{OrganizationsColumns[0]},
|
||||
}
|
||||
// UsersColumns holds the columns for the "users" table.
|
||||
UsersColumns = []*schema.Column{
|
||||
{Name: "id", Type: field.TypeUUID},
|
||||
{Name: "created_at", Type: field.TypeTime},
|
||||
{Name: "updated_at", Type: field.TypeTime},
|
||||
{Name: "email", Type: field.TypeString, Unique: true},
|
||||
{Name: "iss", Type: field.TypeString},
|
||||
{Name: "sub", Type: field.TypeString},
|
||||
{Name: "name", Type: field.TypeString},
|
||||
}
|
||||
// UsersTable holds the schema information for the "users" table.
|
||||
UsersTable = &schema.Table{
|
||||
Name: "users",
|
||||
Columns: UsersColumns,
|
||||
PrimaryKey: []*schema.Column{UsersColumns[0]},
|
||||
}
|
||||
// Tables holds all the tables in the schema.
|
||||
Tables = []*schema.Table{
|
||||
OrganizationsTable,
|
||||
UsersTable,
|
||||
}
|
||||
)
|
||||
|
||||
func init() {
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
140
internal/ent/organization.go
Normal file
140
internal/ent/organization.go
Normal file
@@ -0,0 +1,140 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package ent
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"github.com/gofrs/uuid"
|
||||
"github.com/holos-run/holos/internal/ent/organization"
|
||||
)
|
||||
|
||||
// Organization is the model entity for the Organization schema.
|
||||
type Organization struct {
|
||||
config `json:"-"`
|
||||
// ID of the ent.
|
||||
ID uuid.UUID `json:"id,omitempty"`
|
||||
// CreatedAt holds the value of the "created_at" field.
|
||||
CreatedAt time.Time `json:"created_at,omitempty"`
|
||||
// UpdatedAt holds the value of the "updated_at" field.
|
||||
UpdatedAt time.Time `json:"updated_at,omitempty"`
|
||||
// Name holds the value of the "name" field.
|
||||
Name string `json:"name,omitempty"`
|
||||
// DisplayName holds the value of the "display_name" field.
|
||||
DisplayName string `json:"display_name,omitempty"`
|
||||
selectValues sql.SelectValues
|
||||
}
|
||||
|
||||
// scanValues returns the types for scanning values from sql.Rows.
|
||||
func (*Organization) scanValues(columns []string) ([]any, error) {
|
||||
values := make([]any, len(columns))
|
||||
for i := range columns {
|
||||
switch columns[i] {
|
||||
case organization.FieldName, organization.FieldDisplayName:
|
||||
values[i] = new(sql.NullString)
|
||||
case organization.FieldCreatedAt, organization.FieldUpdatedAt:
|
||||
values[i] = new(sql.NullTime)
|
||||
case organization.FieldID:
|
||||
values[i] = new(uuid.UUID)
|
||||
default:
|
||||
values[i] = new(sql.UnknownType)
|
||||
}
|
||||
}
|
||||
return values, nil
|
||||
}
|
||||
|
||||
// assignValues assigns the values that were returned from sql.Rows (after scanning)
|
||||
// to the Organization fields.
|
||||
func (o *Organization) assignValues(columns []string, values []any) error {
|
||||
if m, n := len(values), len(columns); m < n {
|
||||
return fmt.Errorf("mismatch number of scan values: %d != %d", m, n)
|
||||
}
|
||||
for i := range columns {
|
||||
switch columns[i] {
|
||||
case organization.FieldID:
|
||||
if value, ok := values[i].(*uuid.UUID); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field id", values[i])
|
||||
} else if value != nil {
|
||||
o.ID = *value
|
||||
}
|
||||
case organization.FieldCreatedAt:
|
||||
if value, ok := values[i].(*sql.NullTime); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field created_at", values[i])
|
||||
} else if value.Valid {
|
||||
o.CreatedAt = value.Time
|
||||
}
|
||||
case organization.FieldUpdatedAt:
|
||||
if value, ok := values[i].(*sql.NullTime); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field updated_at", values[i])
|
||||
} else if value.Valid {
|
||||
o.UpdatedAt = value.Time
|
||||
}
|
||||
case organization.FieldName:
|
||||
if value, ok := values[i].(*sql.NullString); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field name", values[i])
|
||||
} else if value.Valid {
|
||||
o.Name = value.String
|
||||
}
|
||||
case organization.FieldDisplayName:
|
||||
if value, ok := values[i].(*sql.NullString); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field display_name", values[i])
|
||||
} else if value.Valid {
|
||||
o.DisplayName = value.String
|
||||
}
|
||||
default:
|
||||
o.selectValues.Set(columns[i], values[i])
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Value returns the ent.Value that was dynamically selected and assigned to the Organization.
|
||||
// This includes values selected through modifiers, order, etc.
|
||||
func (o *Organization) Value(name string) (ent.Value, error) {
|
||||
return o.selectValues.Get(name)
|
||||
}
|
||||
|
||||
// Update returns a builder for updating this Organization.
|
||||
// Note that you need to call Organization.Unwrap() before calling this method if this Organization
|
||||
// was returned from a transaction, and the transaction was committed or rolled back.
|
||||
func (o *Organization) Update() *OrganizationUpdateOne {
|
||||
return NewOrganizationClient(o.config).UpdateOne(o)
|
||||
}
|
||||
|
||||
// Unwrap unwraps the Organization entity that was returned from a transaction after it was closed,
|
||||
// so that all future queries will be executed through the driver which created the transaction.
|
||||
func (o *Organization) Unwrap() *Organization {
|
||||
_tx, ok := o.config.driver.(*txDriver)
|
||||
if !ok {
|
||||
panic("ent: Organization is not a transactional entity")
|
||||
}
|
||||
o.config.driver = _tx.drv
|
||||
return o
|
||||
}
|
||||
|
||||
// String implements the fmt.Stringer.
|
||||
func (o *Organization) String() string {
|
||||
var builder strings.Builder
|
||||
builder.WriteString("Organization(")
|
||||
builder.WriteString(fmt.Sprintf("id=%v, ", o.ID))
|
||||
builder.WriteString("created_at=")
|
||||
builder.WriteString(o.CreatedAt.Format(time.ANSIC))
|
||||
builder.WriteString(", ")
|
||||
builder.WriteString("updated_at=")
|
||||
builder.WriteString(o.UpdatedAt.Format(time.ANSIC))
|
||||
builder.WriteString(", ")
|
||||
builder.WriteString("name=")
|
||||
builder.WriteString(o.Name)
|
||||
builder.WriteString(", ")
|
||||
builder.WriteString("display_name=")
|
||||
builder.WriteString(o.DisplayName)
|
||||
builder.WriteByte(')')
|
||||
return builder.String()
|
||||
}
|
||||
|
||||
// Organizations is a parsable slice of Organization.
|
||||
type Organizations []*Organization
|
||||
87
internal/ent/organization/organization.go
Normal file
87
internal/ent/organization/organization.go
Normal file
@@ -0,0 +1,87 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package organization
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"github.com/gofrs/uuid"
|
||||
)
|
||||
|
||||
const (
|
||||
// Label holds the string label denoting the organization type in the database.
|
||||
Label = "organization"
|
||||
// FieldID holds the string denoting the id field in the database.
|
||||
FieldID = "id"
|
||||
// FieldCreatedAt holds the string denoting the created_at field in the database.
|
||||
FieldCreatedAt = "created_at"
|
||||
// FieldUpdatedAt holds the string denoting the updated_at field in the database.
|
||||
FieldUpdatedAt = "updated_at"
|
||||
// FieldName holds the string denoting the name field in the database.
|
||||
FieldName = "name"
|
||||
// FieldDisplayName holds the string denoting the display_name field in the database.
|
||||
FieldDisplayName = "display_name"
|
||||
// Table holds the table name of the organization in the database.
|
||||
Table = "organizations"
|
||||
)
|
||||
|
||||
// Columns holds all SQL columns for organization fields.
|
||||
var Columns = []string{
|
||||
FieldID,
|
||||
FieldCreatedAt,
|
||||
FieldUpdatedAt,
|
||||
FieldName,
|
||||
FieldDisplayName,
|
||||
}
|
||||
|
||||
// ValidColumn reports if the column name is valid (part of the table columns).
|
||||
func ValidColumn(column string) bool {
|
||||
for i := range Columns {
|
||||
if column == Columns[i] {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
var (
|
||||
// DefaultCreatedAt holds the default value on creation for the "created_at" field.
|
||||
DefaultCreatedAt func() time.Time
|
||||
// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
|
||||
DefaultUpdatedAt func() time.Time
|
||||
// UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
|
||||
UpdateDefaultUpdatedAt func() time.Time
|
||||
// NameValidator is a validator for the "name" field. It is called by the builders before save.
|
||||
NameValidator func(string) error
|
||||
// DefaultID holds the default value on creation for the "id" field.
|
||||
DefaultID func() uuid.UUID
|
||||
)
|
||||
|
||||
// OrderOption defines the ordering options for the Organization queries.
|
||||
type OrderOption func(*sql.Selector)
|
||||
|
||||
// ByID orders the results by the id field.
|
||||
func ByID(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldID, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCreatedAt orders the results by the created_at field.
|
||||
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByUpdatedAt orders the results by the updated_at field.
|
||||
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldUpdatedAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByName orders the results by the name field.
|
||||
func ByName(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldName, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByDisplayName orders the results by the display_name field.
|
||||
func ByDisplayName(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldDisplayName, opts...).ToFunc()
|
||||
}
|
||||
301
internal/ent/organization/where.go
Normal file
301
internal/ent/organization/where.go
Normal file
@@ -0,0 +1,301 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package organization
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"github.com/gofrs/uuid"
|
||||
"github.com/holos-run/holos/internal/ent/predicate"
|
||||
)
|
||||
|
||||
// ID filters vertices based on their ID field.
|
||||
func ID(id uuid.UUID) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDEQ applies the EQ predicate on the ID field.
|
||||
func IDEQ(id uuid.UUID) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDNEQ applies the NEQ predicate on the ID field.
|
||||
func IDNEQ(id uuid.UUID) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldNEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDIn applies the In predicate on the ID field.
|
||||
func IDIn(ids ...uuid.UUID) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDNotIn applies the NotIn predicate on the ID field.
|
||||
func IDNotIn(ids ...uuid.UUID) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldNotIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDGT applies the GT predicate on the ID field.
|
||||
func IDGT(id uuid.UUID) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldGT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDGTE applies the GTE predicate on the ID field.
|
||||
func IDGTE(id uuid.UUID) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldGTE(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLT applies the LT predicate on the ID field.
|
||||
func IDLT(id uuid.UUID) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldLT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLTE applies the LTE predicate on the ID field.
|
||||
func IDLTE(id uuid.UUID) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldLTE(FieldID, id))
|
||||
}
|
||||
|
||||
// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
|
||||
func CreatedAt(v time.Time) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
|
||||
func UpdatedAt(v time.Time) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldEQ(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// Name applies equality check predicate on the "name" field. It's identical to NameEQ.
|
||||
func Name(v string) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldEQ(FieldName, v))
|
||||
}
|
||||
|
||||
// DisplayName applies equality check predicate on the "display_name" field. It's identical to DisplayNameEQ.
|
||||
func DisplayName(v string) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldEQ(FieldDisplayName, v))
|
||||
}
|
||||
|
||||
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
|
||||
func CreatedAtEQ(v time.Time) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
|
||||
func CreatedAtNEQ(v time.Time) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldNEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtIn applies the In predicate on the "created_at" field.
|
||||
func CreatedAtIn(vs ...time.Time) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldIn(FieldCreatedAt, vs...))
|
||||
}
|
||||
|
||||
// CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
|
||||
func CreatedAtNotIn(vs ...time.Time) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldNotIn(FieldCreatedAt, vs...))
|
||||
}
|
||||
|
||||
// CreatedAtGT applies the GT predicate on the "created_at" field.
|
||||
func CreatedAtGT(v time.Time) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldGT(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtGTE applies the GTE predicate on the "created_at" field.
|
||||
func CreatedAtGTE(v time.Time) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldGTE(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtLT applies the LT predicate on the "created_at" field.
|
||||
func CreatedAtLT(v time.Time) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldLT(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtLTE applies the LTE predicate on the "created_at" field.
|
||||
func CreatedAtLTE(v time.Time) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldLTE(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
|
||||
func UpdatedAtEQ(v time.Time) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldEQ(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
|
||||
func UpdatedAtNEQ(v time.Time) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldNEQ(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtIn applies the In predicate on the "updated_at" field.
|
||||
func UpdatedAtIn(vs ...time.Time) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldIn(FieldUpdatedAt, vs...))
|
||||
}
|
||||
|
||||
// UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
|
||||
func UpdatedAtNotIn(vs ...time.Time) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldNotIn(FieldUpdatedAt, vs...))
|
||||
}
|
||||
|
||||
// UpdatedAtGT applies the GT predicate on the "updated_at" field.
|
||||
func UpdatedAtGT(v time.Time) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldGT(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
|
||||
func UpdatedAtGTE(v time.Time) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldGTE(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtLT applies the LT predicate on the "updated_at" field.
|
||||
func UpdatedAtLT(v time.Time) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldLT(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
|
||||
func UpdatedAtLTE(v time.Time) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldLTE(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// NameEQ applies the EQ predicate on the "name" field.
|
||||
func NameEQ(v string) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldEQ(FieldName, v))
|
||||
}
|
||||
|
||||
// NameNEQ applies the NEQ predicate on the "name" field.
|
||||
func NameNEQ(v string) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldNEQ(FieldName, v))
|
||||
}
|
||||
|
||||
// NameIn applies the In predicate on the "name" field.
|
||||
func NameIn(vs ...string) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldIn(FieldName, vs...))
|
||||
}
|
||||
|
||||
// NameNotIn applies the NotIn predicate on the "name" field.
|
||||
func NameNotIn(vs ...string) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldNotIn(FieldName, vs...))
|
||||
}
|
||||
|
||||
// NameGT applies the GT predicate on the "name" field.
|
||||
func NameGT(v string) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldGT(FieldName, v))
|
||||
}
|
||||
|
||||
// NameGTE applies the GTE predicate on the "name" field.
|
||||
func NameGTE(v string) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldGTE(FieldName, v))
|
||||
}
|
||||
|
||||
// NameLT applies the LT predicate on the "name" field.
|
||||
func NameLT(v string) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldLT(FieldName, v))
|
||||
}
|
||||
|
||||
// NameLTE applies the LTE predicate on the "name" field.
|
||||
func NameLTE(v string) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldLTE(FieldName, v))
|
||||
}
|
||||
|
||||
// NameContains applies the Contains predicate on the "name" field.
|
||||
func NameContains(v string) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldContains(FieldName, v))
|
||||
}
|
||||
|
||||
// NameHasPrefix applies the HasPrefix predicate on the "name" field.
|
||||
func NameHasPrefix(v string) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldHasPrefix(FieldName, v))
|
||||
}
|
||||
|
||||
// NameHasSuffix applies the HasSuffix predicate on the "name" field.
|
||||
func NameHasSuffix(v string) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldHasSuffix(FieldName, v))
|
||||
}
|
||||
|
||||
// NameEqualFold applies the EqualFold predicate on the "name" field.
|
||||
func NameEqualFold(v string) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldEqualFold(FieldName, v))
|
||||
}
|
||||
|
||||
// NameContainsFold applies the ContainsFold predicate on the "name" field.
|
||||
func NameContainsFold(v string) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldContainsFold(FieldName, v))
|
||||
}
|
||||
|
||||
// DisplayNameEQ applies the EQ predicate on the "display_name" field.
|
||||
func DisplayNameEQ(v string) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldEQ(FieldDisplayName, v))
|
||||
}
|
||||
|
||||
// DisplayNameNEQ applies the NEQ predicate on the "display_name" field.
|
||||
func DisplayNameNEQ(v string) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldNEQ(FieldDisplayName, v))
|
||||
}
|
||||
|
||||
// DisplayNameIn applies the In predicate on the "display_name" field.
|
||||
func DisplayNameIn(vs ...string) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldIn(FieldDisplayName, vs...))
|
||||
}
|
||||
|
||||
// DisplayNameNotIn applies the NotIn predicate on the "display_name" field.
|
||||
func DisplayNameNotIn(vs ...string) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldNotIn(FieldDisplayName, vs...))
|
||||
}
|
||||
|
||||
// DisplayNameGT applies the GT predicate on the "display_name" field.
|
||||
func DisplayNameGT(v string) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldGT(FieldDisplayName, v))
|
||||
}
|
||||
|
||||
// DisplayNameGTE applies the GTE predicate on the "display_name" field.
|
||||
func DisplayNameGTE(v string) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldGTE(FieldDisplayName, v))
|
||||
}
|
||||
|
||||
// DisplayNameLT applies the LT predicate on the "display_name" field.
|
||||
func DisplayNameLT(v string) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldLT(FieldDisplayName, v))
|
||||
}
|
||||
|
||||
// DisplayNameLTE applies the LTE predicate on the "display_name" field.
|
||||
func DisplayNameLTE(v string) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldLTE(FieldDisplayName, v))
|
||||
}
|
||||
|
||||
// DisplayNameContains applies the Contains predicate on the "display_name" field.
|
||||
func DisplayNameContains(v string) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldContains(FieldDisplayName, v))
|
||||
}
|
||||
|
||||
// DisplayNameHasPrefix applies the HasPrefix predicate on the "display_name" field.
|
||||
func DisplayNameHasPrefix(v string) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldHasPrefix(FieldDisplayName, v))
|
||||
}
|
||||
|
||||
// DisplayNameHasSuffix applies the HasSuffix predicate on the "display_name" field.
|
||||
func DisplayNameHasSuffix(v string) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldHasSuffix(FieldDisplayName, v))
|
||||
}
|
||||
|
||||
// DisplayNameEqualFold applies the EqualFold predicate on the "display_name" field.
|
||||
func DisplayNameEqualFold(v string) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldEqualFold(FieldDisplayName, v))
|
||||
}
|
||||
|
||||
// DisplayNameContainsFold applies the ContainsFold predicate on the "display_name" field.
|
||||
func DisplayNameContainsFold(v string) predicate.Organization {
|
||||
return predicate.Organization(sql.FieldContainsFold(FieldDisplayName, v))
|
||||
}
|
||||
|
||||
// And groups predicates with the AND operator between them.
|
||||
func And(predicates ...predicate.Organization) predicate.Organization {
|
||||
return predicate.Organization(sql.AndPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Or groups predicates with the OR operator between them.
|
||||
func Or(predicates ...predicate.Organization) predicate.Organization {
|
||||
return predicate.Organization(sql.OrPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Not applies the not operator on the given predicate.
|
||||
func Not(p predicate.Organization) predicate.Organization {
|
||||
return predicate.Organization(sql.NotPredicates(p))
|
||||
}
|
||||
663
internal/ent/organization_create.go
Normal file
663
internal/ent/organization_create.go
Normal file
@@ -0,0 +1,663 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package ent
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"entgo.io/ent/dialect"
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"entgo.io/ent/schema/field"
|
||||
"github.com/gofrs/uuid"
|
||||
"github.com/holos-run/holos/internal/ent/organization"
|
||||
)
|
||||
|
||||
// OrganizationCreate is the builder for creating a Organization entity.
|
||||
type OrganizationCreate struct {
|
||||
config
|
||||
mutation *OrganizationMutation
|
||||
hooks []Hook
|
||||
conflict []sql.ConflictOption
|
||||
}
|
||||
|
||||
// SetCreatedAt sets the "created_at" field.
|
||||
func (oc *OrganizationCreate) SetCreatedAt(t time.Time) *OrganizationCreate {
|
||||
oc.mutation.SetCreatedAt(t)
|
||||
return oc
|
||||
}
|
||||
|
||||
// SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
|
||||
func (oc *OrganizationCreate) SetNillableCreatedAt(t *time.Time) *OrganizationCreate {
|
||||
if t != nil {
|
||||
oc.SetCreatedAt(*t)
|
||||
}
|
||||
return oc
|
||||
}
|
||||
|
||||
// SetUpdatedAt sets the "updated_at" field.
|
||||
func (oc *OrganizationCreate) SetUpdatedAt(t time.Time) *OrganizationCreate {
|
||||
oc.mutation.SetUpdatedAt(t)
|
||||
return oc
|
||||
}
|
||||
|
||||
// SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
|
||||
func (oc *OrganizationCreate) SetNillableUpdatedAt(t *time.Time) *OrganizationCreate {
|
||||
if t != nil {
|
||||
oc.SetUpdatedAt(*t)
|
||||
}
|
||||
return oc
|
||||
}
|
||||
|
||||
// SetName sets the "name" field.
|
||||
func (oc *OrganizationCreate) SetName(s string) *OrganizationCreate {
|
||||
oc.mutation.SetName(s)
|
||||
return oc
|
||||
}
|
||||
|
||||
// SetDisplayName sets the "display_name" field.
|
||||
func (oc *OrganizationCreate) SetDisplayName(s string) *OrganizationCreate {
|
||||
oc.mutation.SetDisplayName(s)
|
||||
return oc
|
||||
}
|
||||
|
||||
// SetID sets the "id" field.
|
||||
func (oc *OrganizationCreate) SetID(u uuid.UUID) *OrganizationCreate {
|
||||
oc.mutation.SetID(u)
|
||||
return oc
|
||||
}
|
||||
|
||||
// SetNillableID sets the "id" field if the given value is not nil.
|
||||
func (oc *OrganizationCreate) SetNillableID(u *uuid.UUID) *OrganizationCreate {
|
||||
if u != nil {
|
||||
oc.SetID(*u)
|
||||
}
|
||||
return oc
|
||||
}
|
||||
|
||||
// Mutation returns the OrganizationMutation object of the builder.
|
||||
func (oc *OrganizationCreate) Mutation() *OrganizationMutation {
|
||||
return oc.mutation
|
||||
}
|
||||
|
||||
// Save creates the Organization in the database.
|
||||
func (oc *OrganizationCreate) Save(ctx context.Context) (*Organization, error) {
|
||||
oc.defaults()
|
||||
return withHooks(ctx, oc.sqlSave, oc.mutation, oc.hooks)
|
||||
}
|
||||
|
||||
// SaveX calls Save and panics if Save returns an error.
|
||||
func (oc *OrganizationCreate) SaveX(ctx context.Context) *Organization {
|
||||
v, err := oc.Save(ctx)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return v
|
||||
}
|
||||
|
||||
// Exec executes the query.
|
||||
func (oc *OrganizationCreate) Exec(ctx context.Context) error {
|
||||
_, err := oc.Save(ctx)
|
||||
return err
|
||||
}
|
||||
|
||||
// ExecX is like Exec, but panics if an error occurs.
|
||||
func (oc *OrganizationCreate) ExecX(ctx context.Context) {
|
||||
if err := oc.Exec(ctx); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
// defaults sets the default values of the builder before save.
|
||||
func (oc *OrganizationCreate) defaults() {
|
||||
if _, ok := oc.mutation.CreatedAt(); !ok {
|
||||
v := organization.DefaultCreatedAt()
|
||||
oc.mutation.SetCreatedAt(v)
|
||||
}
|
||||
if _, ok := oc.mutation.UpdatedAt(); !ok {
|
||||
v := organization.DefaultUpdatedAt()
|
||||
oc.mutation.SetUpdatedAt(v)
|
||||
}
|
||||
if _, ok := oc.mutation.ID(); !ok {
|
||||
v := organization.DefaultID()
|
||||
oc.mutation.SetID(v)
|
||||
}
|
||||
}
|
||||
|
||||
// check runs all checks and user-defined validators on the builder.
|
||||
func (oc *OrganizationCreate) check() error {
|
||||
if _, ok := oc.mutation.CreatedAt(); !ok {
|
||||
return &ValidationError{Name: "created_at", err: errors.New(`ent: missing required field "Organization.created_at"`)}
|
||||
}
|
||||
if _, ok := oc.mutation.UpdatedAt(); !ok {
|
||||
return &ValidationError{Name: "updated_at", err: errors.New(`ent: missing required field "Organization.updated_at"`)}
|
||||
}
|
||||
if _, ok := oc.mutation.Name(); !ok {
|
||||
return &ValidationError{Name: "name", err: errors.New(`ent: missing required field "Organization.name"`)}
|
||||
}
|
||||
if v, ok := oc.mutation.Name(); ok {
|
||||
if err := organization.NameValidator(v); err != nil {
|
||||
return &ValidationError{Name: "name", err: fmt.Errorf(`ent: validator failed for field "Organization.name": %w`, err)}
|
||||
}
|
||||
}
|
||||
if _, ok := oc.mutation.DisplayName(); !ok {
|
||||
return &ValidationError{Name: "display_name", err: errors.New(`ent: missing required field "Organization.display_name"`)}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (oc *OrganizationCreate) sqlSave(ctx context.Context) (*Organization, error) {
|
||||
if err := oc.check(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
_node, _spec := oc.createSpec()
|
||||
if err := sqlgraph.CreateNode(ctx, oc.driver, _spec); err != nil {
|
||||
if sqlgraph.IsConstraintError(err) {
|
||||
err = &ConstraintError{msg: err.Error(), wrap: err}
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
if _spec.ID.Value != nil {
|
||||
if id, ok := _spec.ID.Value.(*uuid.UUID); ok {
|
||||
_node.ID = *id
|
||||
} else if err := _node.ID.Scan(_spec.ID.Value); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
oc.mutation.id = &_node.ID
|
||||
oc.mutation.done = true
|
||||
return _node, nil
|
||||
}
|
||||
|
||||
func (oc *OrganizationCreate) createSpec() (*Organization, *sqlgraph.CreateSpec) {
|
||||
var (
|
||||
_node = &Organization{config: oc.config}
|
||||
_spec = sqlgraph.NewCreateSpec(organization.Table, sqlgraph.NewFieldSpec(organization.FieldID, field.TypeUUID))
|
||||
)
|
||||
_spec.OnConflict = oc.conflict
|
||||
if id, ok := oc.mutation.ID(); ok {
|
||||
_node.ID = id
|
||||
_spec.ID.Value = &id
|
||||
}
|
||||
if value, ok := oc.mutation.CreatedAt(); ok {
|
||||
_spec.SetField(organization.FieldCreatedAt, field.TypeTime, value)
|
||||
_node.CreatedAt = value
|
||||
}
|
||||
if value, ok := oc.mutation.UpdatedAt(); ok {
|
||||
_spec.SetField(organization.FieldUpdatedAt, field.TypeTime, value)
|
||||
_node.UpdatedAt = value
|
||||
}
|
||||
if value, ok := oc.mutation.Name(); ok {
|
||||
_spec.SetField(organization.FieldName, field.TypeString, value)
|
||||
_node.Name = value
|
||||
}
|
||||
if value, ok := oc.mutation.DisplayName(); ok {
|
||||
_spec.SetField(organization.FieldDisplayName, field.TypeString, value)
|
||||
_node.DisplayName = value
|
||||
}
|
||||
return _node, _spec
|
||||
}
|
||||
|
||||
// OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause
|
||||
// of the `INSERT` statement. For example:
|
||||
//
|
||||
// client.Organization.Create().
|
||||
// SetCreatedAt(v).
|
||||
// OnConflict(
|
||||
// // Update the row with the new values
|
||||
// // the was proposed for insertion.
|
||||
// sql.ResolveWithNewValues(),
|
||||
// ).
|
||||
// // Override some of the fields with custom
|
||||
// // update values.
|
||||
// Update(func(u *ent.OrganizationUpsert) {
|
||||
// SetCreatedAt(v+v).
|
||||
// }).
|
||||
// Exec(ctx)
|
||||
func (oc *OrganizationCreate) OnConflict(opts ...sql.ConflictOption) *OrganizationUpsertOne {
|
||||
oc.conflict = opts
|
||||
return &OrganizationUpsertOne{
|
||||
create: oc,
|
||||
}
|
||||
}
|
||||
|
||||
// OnConflictColumns calls `OnConflict` and configures the columns
|
||||
// as conflict target. Using this option is equivalent to using:
|
||||
//
|
||||
// client.Organization.Create().
|
||||
// OnConflict(sql.ConflictColumns(columns...)).
|
||||
// Exec(ctx)
|
||||
func (oc *OrganizationCreate) OnConflictColumns(columns ...string) *OrganizationUpsertOne {
|
||||
oc.conflict = append(oc.conflict, sql.ConflictColumns(columns...))
|
||||
return &OrganizationUpsertOne{
|
||||
create: oc,
|
||||
}
|
||||
}
|
||||
|
||||
type (
|
||||
// OrganizationUpsertOne is the builder for "upsert"-ing
|
||||
// one Organization node.
|
||||
OrganizationUpsertOne struct {
|
||||
create *OrganizationCreate
|
||||
}
|
||||
|
||||
// OrganizationUpsert is the "OnConflict" setter.
|
||||
OrganizationUpsert struct {
|
||||
*sql.UpdateSet
|
||||
}
|
||||
)
|
||||
|
||||
// SetUpdatedAt sets the "updated_at" field.
|
||||
func (u *OrganizationUpsert) SetUpdatedAt(v time.Time) *OrganizationUpsert {
|
||||
u.Set(organization.FieldUpdatedAt, v)
|
||||
return u
|
||||
}
|
||||
|
||||
// UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
|
||||
func (u *OrganizationUpsert) UpdateUpdatedAt() *OrganizationUpsert {
|
||||
u.SetExcluded(organization.FieldUpdatedAt)
|
||||
return u
|
||||
}
|
||||
|
||||
// SetName sets the "name" field.
|
||||
func (u *OrganizationUpsert) SetName(v string) *OrganizationUpsert {
|
||||
u.Set(organization.FieldName, v)
|
||||
return u
|
||||
}
|
||||
|
||||
// UpdateName sets the "name" field to the value that was provided on create.
|
||||
func (u *OrganizationUpsert) UpdateName() *OrganizationUpsert {
|
||||
u.SetExcluded(organization.FieldName)
|
||||
return u
|
||||
}
|
||||
|
||||
// SetDisplayName sets the "display_name" field.
|
||||
func (u *OrganizationUpsert) SetDisplayName(v string) *OrganizationUpsert {
|
||||
u.Set(organization.FieldDisplayName, v)
|
||||
return u
|
||||
}
|
||||
|
||||
// UpdateDisplayName sets the "display_name" field to the value that was provided on create.
|
||||
func (u *OrganizationUpsert) UpdateDisplayName() *OrganizationUpsert {
|
||||
u.SetExcluded(organization.FieldDisplayName)
|
||||
return u
|
||||
}
|
||||
|
||||
// UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field.
|
||||
// Using this option is equivalent to using:
|
||||
//
|
||||
// client.Organization.Create().
|
||||
// OnConflict(
|
||||
// sql.ResolveWithNewValues(),
|
||||
// sql.ResolveWith(func(u *sql.UpdateSet) {
|
||||
// u.SetIgnore(organization.FieldID)
|
||||
// }),
|
||||
// ).
|
||||
// Exec(ctx)
|
||||
func (u *OrganizationUpsertOne) UpdateNewValues() *OrganizationUpsertOne {
|
||||
u.create.conflict = append(u.create.conflict, sql.ResolveWithNewValues())
|
||||
u.create.conflict = append(u.create.conflict, sql.ResolveWith(func(s *sql.UpdateSet) {
|
||||
if _, exists := u.create.mutation.ID(); exists {
|
||||
s.SetIgnore(organization.FieldID)
|
||||
}
|
||||
if _, exists := u.create.mutation.CreatedAt(); exists {
|
||||
s.SetIgnore(organization.FieldCreatedAt)
|
||||
}
|
||||
}))
|
||||
return u
|
||||
}
|
||||
|
||||
// Ignore sets each column to itself in case of conflict.
|
||||
// Using this option is equivalent to using:
|
||||
//
|
||||
// client.Organization.Create().
|
||||
// OnConflict(sql.ResolveWithIgnore()).
|
||||
// Exec(ctx)
|
||||
func (u *OrganizationUpsertOne) Ignore() *OrganizationUpsertOne {
|
||||
u.create.conflict = append(u.create.conflict, sql.ResolveWithIgnore())
|
||||
return u
|
||||
}
|
||||
|
||||
// DoNothing configures the conflict_action to `DO NOTHING`.
|
||||
// Supported only by SQLite and PostgreSQL.
|
||||
func (u *OrganizationUpsertOne) DoNothing() *OrganizationUpsertOne {
|
||||
u.create.conflict = append(u.create.conflict, sql.DoNothing())
|
||||
return u
|
||||
}
|
||||
|
||||
// Update allows overriding fields `UPDATE` values. See the OrganizationCreate.OnConflict
|
||||
// documentation for more info.
|
||||
func (u *OrganizationUpsertOne) Update(set func(*OrganizationUpsert)) *OrganizationUpsertOne {
|
||||
u.create.conflict = append(u.create.conflict, sql.ResolveWith(func(update *sql.UpdateSet) {
|
||||
set(&OrganizationUpsert{UpdateSet: update})
|
||||
}))
|
||||
return u
|
||||
}
|
||||
|
||||
// SetUpdatedAt sets the "updated_at" field.
|
||||
func (u *OrganizationUpsertOne) SetUpdatedAt(v time.Time) *OrganizationUpsertOne {
|
||||
return u.Update(func(s *OrganizationUpsert) {
|
||||
s.SetUpdatedAt(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
|
||||
func (u *OrganizationUpsertOne) UpdateUpdatedAt() *OrganizationUpsertOne {
|
||||
return u.Update(func(s *OrganizationUpsert) {
|
||||
s.UpdateUpdatedAt()
|
||||
})
|
||||
}
|
||||
|
||||
// SetName sets the "name" field.
|
||||
func (u *OrganizationUpsertOne) SetName(v string) *OrganizationUpsertOne {
|
||||
return u.Update(func(s *OrganizationUpsert) {
|
||||
s.SetName(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateName sets the "name" field to the value that was provided on create.
|
||||
func (u *OrganizationUpsertOne) UpdateName() *OrganizationUpsertOne {
|
||||
return u.Update(func(s *OrganizationUpsert) {
|
||||
s.UpdateName()
|
||||
})
|
||||
}
|
||||
|
||||
// SetDisplayName sets the "display_name" field.
|
||||
func (u *OrganizationUpsertOne) SetDisplayName(v string) *OrganizationUpsertOne {
|
||||
return u.Update(func(s *OrganizationUpsert) {
|
||||
s.SetDisplayName(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateDisplayName sets the "display_name" field to the value that was provided on create.
|
||||
func (u *OrganizationUpsertOne) UpdateDisplayName() *OrganizationUpsertOne {
|
||||
return u.Update(func(s *OrganizationUpsert) {
|
||||
s.UpdateDisplayName()
|
||||
})
|
||||
}
|
||||
|
||||
// Exec executes the query.
|
||||
func (u *OrganizationUpsertOne) Exec(ctx context.Context) error {
|
||||
if len(u.create.conflict) == 0 {
|
||||
return errors.New("ent: missing options for OrganizationCreate.OnConflict")
|
||||
}
|
||||
return u.create.Exec(ctx)
|
||||
}
|
||||
|
||||
// ExecX is like Exec, but panics if an error occurs.
|
||||
func (u *OrganizationUpsertOne) ExecX(ctx context.Context) {
|
||||
if err := u.create.Exec(ctx); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
// Exec executes the UPSERT query and returns the inserted/updated ID.
|
||||
func (u *OrganizationUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error) {
|
||||
if u.create.driver.Dialect() == dialect.MySQL {
|
||||
// In case of "ON CONFLICT", there is no way to get back non-numeric ID
|
||||
// fields from the database since MySQL does not support the RETURNING clause.
|
||||
return id, errors.New("ent: OrganizationUpsertOne.ID is not supported by MySQL driver. Use OrganizationUpsertOne.Exec instead")
|
||||
}
|
||||
node, err := u.create.Save(ctx)
|
||||
if err != nil {
|
||||
return id, err
|
||||
}
|
||||
return node.ID, nil
|
||||
}
|
||||
|
||||
// IDX is like ID, but panics if an error occurs.
|
||||
func (u *OrganizationUpsertOne) IDX(ctx context.Context) uuid.UUID {
|
||||
id, err := u.ID(ctx)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return id
|
||||
}
|
||||
|
||||
// OrganizationCreateBulk is the builder for creating many Organization entities in bulk.
|
||||
type OrganizationCreateBulk struct {
|
||||
config
|
||||
err error
|
||||
builders []*OrganizationCreate
|
||||
conflict []sql.ConflictOption
|
||||
}
|
||||
|
||||
// Save creates the Organization entities in the database.
|
||||
func (ocb *OrganizationCreateBulk) Save(ctx context.Context) ([]*Organization, error) {
|
||||
if ocb.err != nil {
|
||||
return nil, ocb.err
|
||||
}
|
||||
specs := make([]*sqlgraph.CreateSpec, len(ocb.builders))
|
||||
nodes := make([]*Organization, len(ocb.builders))
|
||||
mutators := make([]Mutator, len(ocb.builders))
|
||||
for i := range ocb.builders {
|
||||
func(i int, root context.Context) {
|
||||
builder := ocb.builders[i]
|
||||
builder.defaults()
|
||||
var mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {
|
||||
mutation, ok := m.(*OrganizationMutation)
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("unexpected mutation type %T", m)
|
||||
}
|
||||
if err := builder.check(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
builder.mutation = mutation
|
||||
var err error
|
||||
nodes[i], specs[i] = builder.createSpec()
|
||||
if i < len(mutators)-1 {
|
||||
_, err = mutators[i+1].Mutate(root, ocb.builders[i+1].mutation)
|
||||
} else {
|
||||
spec := &sqlgraph.BatchCreateSpec{Nodes: specs}
|
||||
spec.OnConflict = ocb.conflict
|
||||
// Invoke the actual operation on the latest mutation in the chain.
|
||||
if err = sqlgraph.BatchCreate(ctx, ocb.driver, spec); err != nil {
|
||||
if sqlgraph.IsConstraintError(err) {
|
||||
err = &ConstraintError{msg: err.Error(), wrap: err}
|
||||
}
|
||||
}
|
||||
}
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
mutation.id = &nodes[i].ID
|
||||
mutation.done = true
|
||||
return nodes[i], nil
|
||||
})
|
||||
for i := len(builder.hooks) - 1; i >= 0; i-- {
|
||||
mut = builder.hooks[i](mut)
|
||||
}
|
||||
mutators[i] = mut
|
||||
}(i, ctx)
|
||||
}
|
||||
if len(mutators) > 0 {
|
||||
if _, err := mutators[0].Mutate(ctx, ocb.builders[0].mutation); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
return nodes, nil
|
||||
}
|
||||
|
||||
// SaveX is like Save, but panics if an error occurs.
|
||||
func (ocb *OrganizationCreateBulk) SaveX(ctx context.Context) []*Organization {
|
||||
v, err := ocb.Save(ctx)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return v
|
||||
}
|
||||
|
||||
// Exec executes the query.
|
||||
func (ocb *OrganizationCreateBulk) Exec(ctx context.Context) error {
|
||||
_, err := ocb.Save(ctx)
|
||||
return err
|
||||
}
|
||||
|
||||
// ExecX is like Exec, but panics if an error occurs.
|
||||
func (ocb *OrganizationCreateBulk) ExecX(ctx context.Context) {
|
||||
if err := ocb.Exec(ctx); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
// OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause
|
||||
// of the `INSERT` statement. For example:
|
||||
//
|
||||
// client.Organization.CreateBulk(builders...).
|
||||
// OnConflict(
|
||||
// // Update the row with the new values
|
||||
// // the was proposed for insertion.
|
||||
// sql.ResolveWithNewValues(),
|
||||
// ).
|
||||
// // Override some of the fields with custom
|
||||
// // update values.
|
||||
// Update(func(u *ent.OrganizationUpsert) {
|
||||
// SetCreatedAt(v+v).
|
||||
// }).
|
||||
// Exec(ctx)
|
||||
func (ocb *OrganizationCreateBulk) OnConflict(opts ...sql.ConflictOption) *OrganizationUpsertBulk {
|
||||
ocb.conflict = opts
|
||||
return &OrganizationUpsertBulk{
|
||||
create: ocb,
|
||||
}
|
||||
}
|
||||
|
||||
// OnConflictColumns calls `OnConflict` and configures the columns
|
||||
// as conflict target. Using this option is equivalent to using:
|
||||
//
|
||||
// client.Organization.Create().
|
||||
// OnConflict(sql.ConflictColumns(columns...)).
|
||||
// Exec(ctx)
|
||||
func (ocb *OrganizationCreateBulk) OnConflictColumns(columns ...string) *OrganizationUpsertBulk {
|
||||
ocb.conflict = append(ocb.conflict, sql.ConflictColumns(columns...))
|
||||
return &OrganizationUpsertBulk{
|
||||
create: ocb,
|
||||
}
|
||||
}
|
||||
|
||||
// OrganizationUpsertBulk is the builder for "upsert"-ing
|
||||
// a bulk of Organization nodes.
|
||||
type OrganizationUpsertBulk struct {
|
||||
create *OrganizationCreateBulk
|
||||
}
|
||||
|
||||
// UpdateNewValues updates the mutable fields using the new values that
|
||||
// were set on create. Using this option is equivalent to using:
|
||||
//
|
||||
// client.Organization.Create().
|
||||
// OnConflict(
|
||||
// sql.ResolveWithNewValues(),
|
||||
// sql.ResolveWith(func(u *sql.UpdateSet) {
|
||||
// u.SetIgnore(organization.FieldID)
|
||||
// }),
|
||||
// ).
|
||||
// Exec(ctx)
|
||||
func (u *OrganizationUpsertBulk) UpdateNewValues() *OrganizationUpsertBulk {
|
||||
u.create.conflict = append(u.create.conflict, sql.ResolveWithNewValues())
|
||||
u.create.conflict = append(u.create.conflict, sql.ResolveWith(func(s *sql.UpdateSet) {
|
||||
for _, b := range u.create.builders {
|
||||
if _, exists := b.mutation.ID(); exists {
|
||||
s.SetIgnore(organization.FieldID)
|
||||
}
|
||||
if _, exists := b.mutation.CreatedAt(); exists {
|
||||
s.SetIgnore(organization.FieldCreatedAt)
|
||||
}
|
||||
}
|
||||
}))
|
||||
return u
|
||||
}
|
||||
|
||||
// Ignore sets each column to itself in case of conflict.
|
||||
// Using this option is equivalent to using:
|
||||
//
|
||||
// client.Organization.Create().
|
||||
// OnConflict(sql.ResolveWithIgnore()).
|
||||
// Exec(ctx)
|
||||
func (u *OrganizationUpsertBulk) Ignore() *OrganizationUpsertBulk {
|
||||
u.create.conflict = append(u.create.conflict, sql.ResolveWithIgnore())
|
||||
return u
|
||||
}
|
||||
|
||||
// DoNothing configures the conflict_action to `DO NOTHING`.
|
||||
// Supported only by SQLite and PostgreSQL.
|
||||
func (u *OrganizationUpsertBulk) DoNothing() *OrganizationUpsertBulk {
|
||||
u.create.conflict = append(u.create.conflict, sql.DoNothing())
|
||||
return u
|
||||
}
|
||||
|
||||
// Update allows overriding fields `UPDATE` values. See the OrganizationCreateBulk.OnConflict
|
||||
// documentation for more info.
|
||||
func (u *OrganizationUpsertBulk) Update(set func(*OrganizationUpsert)) *OrganizationUpsertBulk {
|
||||
u.create.conflict = append(u.create.conflict, sql.ResolveWith(func(update *sql.UpdateSet) {
|
||||
set(&OrganizationUpsert{UpdateSet: update})
|
||||
}))
|
||||
return u
|
||||
}
|
||||
|
||||
// SetUpdatedAt sets the "updated_at" field.
|
||||
func (u *OrganizationUpsertBulk) SetUpdatedAt(v time.Time) *OrganizationUpsertBulk {
|
||||
return u.Update(func(s *OrganizationUpsert) {
|
||||
s.SetUpdatedAt(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
|
||||
func (u *OrganizationUpsertBulk) UpdateUpdatedAt() *OrganizationUpsertBulk {
|
||||
return u.Update(func(s *OrganizationUpsert) {
|
||||
s.UpdateUpdatedAt()
|
||||
})
|
||||
}
|
||||
|
||||
// SetName sets the "name" field.
|
||||
func (u *OrganizationUpsertBulk) SetName(v string) *OrganizationUpsertBulk {
|
||||
return u.Update(func(s *OrganizationUpsert) {
|
||||
s.SetName(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateName sets the "name" field to the value that was provided on create.
|
||||
func (u *OrganizationUpsertBulk) UpdateName() *OrganizationUpsertBulk {
|
||||
return u.Update(func(s *OrganizationUpsert) {
|
||||
s.UpdateName()
|
||||
})
|
||||
}
|
||||
|
||||
// SetDisplayName sets the "display_name" field.
|
||||
func (u *OrganizationUpsertBulk) SetDisplayName(v string) *OrganizationUpsertBulk {
|
||||
return u.Update(func(s *OrganizationUpsert) {
|
||||
s.SetDisplayName(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateDisplayName sets the "display_name" field to the value that was provided on create.
|
||||
func (u *OrganizationUpsertBulk) UpdateDisplayName() *OrganizationUpsertBulk {
|
||||
return u.Update(func(s *OrganizationUpsert) {
|
||||
s.UpdateDisplayName()
|
||||
})
|
||||
}
|
||||
|
||||
// Exec executes the query.
|
||||
func (u *OrganizationUpsertBulk) Exec(ctx context.Context) error {
|
||||
if u.create.err != nil {
|
||||
return u.create.err
|
||||
}
|
||||
for i, b := range u.create.builders {
|
||||
if len(b.conflict) != 0 {
|
||||
return fmt.Errorf("ent: OnConflict was set for builder %d. Set it on the OrganizationCreateBulk instead", i)
|
||||
}
|
||||
}
|
||||
if len(u.create.conflict) == 0 {
|
||||
return errors.New("ent: missing options for OrganizationCreateBulk.OnConflict")
|
||||
}
|
||||
return u.create.Exec(ctx)
|
||||
}
|
||||
|
||||
// ExecX is like Exec, but panics if an error occurs.
|
||||
func (u *OrganizationUpsertBulk) ExecX(ctx context.Context) {
|
||||
if err := u.create.Exec(ctx); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
88
internal/ent/organization_delete.go
Normal file
88
internal/ent/organization_delete.go
Normal file
@@ -0,0 +1,88 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package ent
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"entgo.io/ent/schema/field"
|
||||
"github.com/holos-run/holos/internal/ent/organization"
|
||||
"github.com/holos-run/holos/internal/ent/predicate"
|
||||
)
|
||||
|
||||
// OrganizationDelete is the builder for deleting a Organization entity.
|
||||
type OrganizationDelete struct {
|
||||
config
|
||||
hooks []Hook
|
||||
mutation *OrganizationMutation
|
||||
}
|
||||
|
||||
// Where appends a list predicates to the OrganizationDelete builder.
|
||||
func (od *OrganizationDelete) Where(ps ...predicate.Organization) *OrganizationDelete {
|
||||
od.mutation.Where(ps...)
|
||||
return od
|
||||
}
|
||||
|
||||
// Exec executes the deletion query and returns how many vertices were deleted.
|
||||
func (od *OrganizationDelete) Exec(ctx context.Context) (int, error) {
|
||||
return withHooks(ctx, od.sqlExec, od.mutation, od.hooks)
|
||||
}
|
||||
|
||||
// ExecX is like Exec, but panics if an error occurs.
|
||||
func (od *OrganizationDelete) ExecX(ctx context.Context) int {
|
||||
n, err := od.Exec(ctx)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func (od *OrganizationDelete) sqlExec(ctx context.Context) (int, error) {
|
||||
_spec := sqlgraph.NewDeleteSpec(organization.Table, sqlgraph.NewFieldSpec(organization.FieldID, field.TypeUUID))
|
||||
if ps := od.mutation.predicates; len(ps) > 0 {
|
||||
_spec.Predicate = func(selector *sql.Selector) {
|
||||
for i := range ps {
|
||||
ps[i](selector)
|
||||
}
|
||||
}
|
||||
}
|
||||
affected, err := sqlgraph.DeleteNodes(ctx, od.driver, _spec)
|
||||
if err != nil && sqlgraph.IsConstraintError(err) {
|
||||
err = &ConstraintError{msg: err.Error(), wrap: err}
|
||||
}
|
||||
od.mutation.done = true
|
||||
return affected, err
|
||||
}
|
||||
|
||||
// OrganizationDeleteOne is the builder for deleting a single Organization entity.
|
||||
type OrganizationDeleteOne struct {
|
||||
od *OrganizationDelete
|
||||
}
|
||||
|
||||
// Where appends a list predicates to the OrganizationDelete builder.
|
||||
func (odo *OrganizationDeleteOne) Where(ps ...predicate.Organization) *OrganizationDeleteOne {
|
||||
odo.od.mutation.Where(ps...)
|
||||
return odo
|
||||
}
|
||||
|
||||
// Exec executes the deletion query.
|
||||
func (odo *OrganizationDeleteOne) Exec(ctx context.Context) error {
|
||||
n, err := odo.od.Exec(ctx)
|
||||
switch {
|
||||
case err != nil:
|
||||
return err
|
||||
case n == 0:
|
||||
return &NotFoundError{organization.Label}
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// ExecX is like Exec, but panics if an error occurs.
|
||||
func (odo *OrganizationDeleteOne) ExecX(ctx context.Context) {
|
||||
if err := odo.Exec(ctx); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
527
internal/ent/organization_query.go
Normal file
527
internal/ent/organization_query.go
Normal file
@@ -0,0 +1,527 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package ent
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"math"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"entgo.io/ent/schema/field"
|
||||
"github.com/gofrs/uuid"
|
||||
"github.com/holos-run/holos/internal/ent/organization"
|
||||
"github.com/holos-run/holos/internal/ent/predicate"
|
||||
)
|
||||
|
||||
// OrganizationQuery is the builder for querying Organization entities.
|
||||
type OrganizationQuery struct {
|
||||
config
|
||||
ctx *QueryContext
|
||||
order []organization.OrderOption
|
||||
inters []Interceptor
|
||||
predicates []predicate.Organization
|
||||
// intermediate query (i.e. traversal path).
|
||||
sql *sql.Selector
|
||||
path func(context.Context) (*sql.Selector, error)
|
||||
}
|
||||
|
||||
// Where adds a new predicate for the OrganizationQuery builder.
|
||||
func (oq *OrganizationQuery) Where(ps ...predicate.Organization) *OrganizationQuery {
|
||||
oq.predicates = append(oq.predicates, ps...)
|
||||
return oq
|
||||
}
|
||||
|
||||
// Limit the number of records to be returned by this query.
|
||||
func (oq *OrganizationQuery) Limit(limit int) *OrganizationQuery {
|
||||
oq.ctx.Limit = &limit
|
||||
return oq
|
||||
}
|
||||
|
||||
// Offset to start from.
|
||||
func (oq *OrganizationQuery) Offset(offset int) *OrganizationQuery {
|
||||
oq.ctx.Offset = &offset
|
||||
return oq
|
||||
}
|
||||
|
||||
// Unique configures the query builder to filter duplicate records on query.
|
||||
// By default, unique is set to true, and can be disabled using this method.
|
||||
func (oq *OrganizationQuery) Unique(unique bool) *OrganizationQuery {
|
||||
oq.ctx.Unique = &unique
|
||||
return oq
|
||||
}
|
||||
|
||||
// Order specifies how the records should be ordered.
|
||||
func (oq *OrganizationQuery) Order(o ...organization.OrderOption) *OrganizationQuery {
|
||||
oq.order = append(oq.order, o...)
|
||||
return oq
|
||||
}
|
||||
|
||||
// First returns the first Organization entity from the query.
|
||||
// Returns a *NotFoundError when no Organization was found.
|
||||
func (oq *OrganizationQuery) First(ctx context.Context) (*Organization, error) {
|
||||
nodes, err := oq.Limit(1).All(setContextOp(ctx, oq.ctx, "First"))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if len(nodes) == 0 {
|
||||
return nil, &NotFoundError{organization.Label}
|
||||
}
|
||||
return nodes[0], nil
|
||||
}
|
||||
|
||||
// FirstX is like First, but panics if an error occurs.
|
||||
func (oq *OrganizationQuery) FirstX(ctx context.Context) *Organization {
|
||||
node, err := oq.First(ctx)
|
||||
if err != nil && !IsNotFound(err) {
|
||||
panic(err)
|
||||
}
|
||||
return node
|
||||
}
|
||||
|
||||
// FirstID returns the first Organization ID from the query.
|
||||
// Returns a *NotFoundError when no Organization ID was found.
|
||||
func (oq *OrganizationQuery) FirstID(ctx context.Context) (id uuid.UUID, err error) {
|
||||
var ids []uuid.UUID
|
||||
if ids, err = oq.Limit(1).IDs(setContextOp(ctx, oq.ctx, "FirstID")); err != nil {
|
||||
return
|
||||
}
|
||||
if len(ids) == 0 {
|
||||
err = &NotFoundError{organization.Label}
|
||||
return
|
||||
}
|
||||
return ids[0], nil
|
||||
}
|
||||
|
||||
// FirstIDX is like FirstID, but panics if an error occurs.
|
||||
func (oq *OrganizationQuery) FirstIDX(ctx context.Context) uuid.UUID {
|
||||
id, err := oq.FirstID(ctx)
|
||||
if err != nil && !IsNotFound(err) {
|
||||
panic(err)
|
||||
}
|
||||
return id
|
||||
}
|
||||
|
||||
// Only returns a single Organization entity found by the query, ensuring it only returns one.
|
||||
// Returns a *NotSingularError when more than one Organization entity is found.
|
||||
// Returns a *NotFoundError when no Organization entities are found.
|
||||
func (oq *OrganizationQuery) Only(ctx context.Context) (*Organization, error) {
|
||||
nodes, err := oq.Limit(2).All(setContextOp(ctx, oq.ctx, "Only"))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
switch len(nodes) {
|
||||
case 1:
|
||||
return nodes[0], nil
|
||||
case 0:
|
||||
return nil, &NotFoundError{organization.Label}
|
||||
default:
|
||||
return nil, &NotSingularError{organization.Label}
|
||||
}
|
||||
}
|
||||
|
||||
// OnlyX is like Only, but panics if an error occurs.
|
||||
func (oq *OrganizationQuery) OnlyX(ctx context.Context) *Organization {
|
||||
node, err := oq.Only(ctx)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return node
|
||||
}
|
||||
|
||||
// OnlyID is like Only, but returns the only Organization ID in the query.
|
||||
// Returns a *NotSingularError when more than one Organization ID is found.
|
||||
// Returns a *NotFoundError when no entities are found.
|
||||
func (oq *OrganizationQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error) {
|
||||
var ids []uuid.UUID
|
||||
if ids, err = oq.Limit(2).IDs(setContextOp(ctx, oq.ctx, "OnlyID")); err != nil {
|
||||
return
|
||||
}
|
||||
switch len(ids) {
|
||||
case 1:
|
||||
id = ids[0]
|
||||
case 0:
|
||||
err = &NotFoundError{organization.Label}
|
||||
default:
|
||||
err = &NotSingularError{organization.Label}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// OnlyIDX is like OnlyID, but panics if an error occurs.
|
||||
func (oq *OrganizationQuery) OnlyIDX(ctx context.Context) uuid.UUID {
|
||||
id, err := oq.OnlyID(ctx)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return id
|
||||
}
|
||||
|
||||
// All executes the query and returns a list of Organizations.
|
||||
func (oq *OrganizationQuery) All(ctx context.Context) ([]*Organization, error) {
|
||||
ctx = setContextOp(ctx, oq.ctx, "All")
|
||||
if err := oq.prepareQuery(ctx); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
qr := querierAll[[]*Organization, *OrganizationQuery]()
|
||||
return withInterceptors[[]*Organization](ctx, oq, qr, oq.inters)
|
||||
}
|
||||
|
||||
// AllX is like All, but panics if an error occurs.
|
||||
func (oq *OrganizationQuery) AllX(ctx context.Context) []*Organization {
|
||||
nodes, err := oq.All(ctx)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return nodes
|
||||
}
|
||||
|
||||
// IDs executes the query and returns a list of Organization IDs.
|
||||
func (oq *OrganizationQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error) {
|
||||
if oq.ctx.Unique == nil && oq.path != nil {
|
||||
oq.Unique(true)
|
||||
}
|
||||
ctx = setContextOp(ctx, oq.ctx, "IDs")
|
||||
if err = oq.Select(organization.FieldID).Scan(ctx, &ids); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return ids, nil
|
||||
}
|
||||
|
||||
// IDsX is like IDs, but panics if an error occurs.
|
||||
func (oq *OrganizationQuery) IDsX(ctx context.Context) []uuid.UUID {
|
||||
ids, err := oq.IDs(ctx)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return ids
|
||||
}
|
||||
|
||||
// Count returns the count of the given query.
|
||||
func (oq *OrganizationQuery) Count(ctx context.Context) (int, error) {
|
||||
ctx = setContextOp(ctx, oq.ctx, "Count")
|
||||
if err := oq.prepareQuery(ctx); err != nil {
|
||||
return 0, err
|
||||
}
|
||||
return withInterceptors[int](ctx, oq, querierCount[*OrganizationQuery](), oq.inters)
|
||||
}
|
||||
|
||||
// CountX is like Count, but panics if an error occurs.
|
||||
func (oq *OrganizationQuery) CountX(ctx context.Context) int {
|
||||
count, err := oq.Count(ctx)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return count
|
||||
}
|
||||
|
||||
// Exist returns true if the query has elements in the graph.
|
||||
func (oq *OrganizationQuery) Exist(ctx context.Context) (bool, error) {
|
||||
ctx = setContextOp(ctx, oq.ctx, "Exist")
|
||||
switch _, err := oq.FirstID(ctx); {
|
||||
case IsNotFound(err):
|
||||
return false, nil
|
||||
case err != nil:
|
||||
return false, fmt.Errorf("ent: check existence: %w", err)
|
||||
default:
|
||||
return true, nil
|
||||
}
|
||||
}
|
||||
|
||||
// ExistX is like Exist, but panics if an error occurs.
|
||||
func (oq *OrganizationQuery) ExistX(ctx context.Context) bool {
|
||||
exist, err := oq.Exist(ctx)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return exist
|
||||
}
|
||||
|
||||
// Clone returns a duplicate of the OrganizationQuery builder, including all associated steps. It can be
|
||||
// used to prepare common query builders and use them differently after the clone is made.
|
||||
func (oq *OrganizationQuery) Clone() *OrganizationQuery {
|
||||
if oq == nil {
|
||||
return nil
|
||||
}
|
||||
return &OrganizationQuery{
|
||||
config: oq.config,
|
||||
ctx: oq.ctx.Clone(),
|
||||
order: append([]organization.OrderOption{}, oq.order...),
|
||||
inters: append([]Interceptor{}, oq.inters...),
|
||||
predicates: append([]predicate.Organization{}, oq.predicates...),
|
||||
// clone intermediate query.
|
||||
sql: oq.sql.Clone(),
|
||||
path: oq.path,
|
||||
}
|
||||
}
|
||||
|
||||
// GroupBy is used to group vertices by one or more fields/columns.
|
||||
// It is often used with aggregate functions, like: count, max, mean, min, sum.
|
||||
//
|
||||
// Example:
|
||||
//
|
||||
// var v []struct {
|
||||
// CreatedAt time.Time `json:"created_at,omitempty"`
|
||||
// Count int `json:"count,omitempty"`
|
||||
// }
|
||||
//
|
||||
// client.Organization.Query().
|
||||
// GroupBy(organization.FieldCreatedAt).
|
||||
// Aggregate(ent.Count()).
|
||||
// Scan(ctx, &v)
|
||||
func (oq *OrganizationQuery) GroupBy(field string, fields ...string) *OrganizationGroupBy {
|
||||
oq.ctx.Fields = append([]string{field}, fields...)
|
||||
grbuild := &OrganizationGroupBy{build: oq}
|
||||
grbuild.flds = &oq.ctx.Fields
|
||||
grbuild.label = organization.Label
|
||||
grbuild.scan = grbuild.Scan
|
||||
return grbuild
|
||||
}
|
||||
|
||||
// Select allows the selection one or more fields/columns for the given query,
|
||||
// instead of selecting all fields in the entity.
|
||||
//
|
||||
// Example:
|
||||
//
|
||||
// var v []struct {
|
||||
// CreatedAt time.Time `json:"created_at,omitempty"`
|
||||
// }
|
||||
//
|
||||
// client.Organization.Query().
|
||||
// Select(organization.FieldCreatedAt).
|
||||
// Scan(ctx, &v)
|
||||
func (oq *OrganizationQuery) Select(fields ...string) *OrganizationSelect {
|
||||
oq.ctx.Fields = append(oq.ctx.Fields, fields...)
|
||||
sbuild := &OrganizationSelect{OrganizationQuery: oq}
|
||||
sbuild.label = organization.Label
|
||||
sbuild.flds, sbuild.scan = &oq.ctx.Fields, sbuild.Scan
|
||||
return sbuild
|
||||
}
|
||||
|
||||
// Aggregate returns a OrganizationSelect configured with the given aggregations.
|
||||
func (oq *OrganizationQuery) Aggregate(fns ...AggregateFunc) *OrganizationSelect {
|
||||
return oq.Select().Aggregate(fns...)
|
||||
}
|
||||
|
||||
func (oq *OrganizationQuery) prepareQuery(ctx context.Context) error {
|
||||
for _, inter := range oq.inters {
|
||||
if inter == nil {
|
||||
return fmt.Errorf("ent: uninitialized interceptor (forgotten import ent/runtime?)")
|
||||
}
|
||||
if trv, ok := inter.(Traverser); ok {
|
||||
if err := trv.Traverse(ctx, oq); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
for _, f := range oq.ctx.Fields {
|
||||
if !organization.ValidColumn(f) {
|
||||
return &ValidationError{Name: f, err: fmt.Errorf("ent: invalid field %q for query", f)}
|
||||
}
|
||||
}
|
||||
if oq.path != nil {
|
||||
prev, err := oq.path(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
oq.sql = prev
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (oq *OrganizationQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Organization, error) {
|
||||
var (
|
||||
nodes = []*Organization{}
|
||||
_spec = oq.querySpec()
|
||||
)
|
||||
_spec.ScanValues = func(columns []string) ([]any, error) {
|
||||
return (*Organization).scanValues(nil, columns)
|
||||
}
|
||||
_spec.Assign = func(columns []string, values []any) error {
|
||||
node := &Organization{config: oq.config}
|
||||
nodes = append(nodes, node)
|
||||
return node.assignValues(columns, values)
|
||||
}
|
||||
for i := range hooks {
|
||||
hooks[i](ctx, _spec)
|
||||
}
|
||||
if err := sqlgraph.QueryNodes(ctx, oq.driver, _spec); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if len(nodes) == 0 {
|
||||
return nodes, nil
|
||||
}
|
||||
return nodes, nil
|
||||
}
|
||||
|
||||
func (oq *OrganizationQuery) sqlCount(ctx context.Context) (int, error) {
|
||||
_spec := oq.querySpec()
|
||||
_spec.Node.Columns = oq.ctx.Fields
|
||||
if len(oq.ctx.Fields) > 0 {
|
||||
_spec.Unique = oq.ctx.Unique != nil && *oq.ctx.Unique
|
||||
}
|
||||
return sqlgraph.CountNodes(ctx, oq.driver, _spec)
|
||||
}
|
||||
|
||||
func (oq *OrganizationQuery) querySpec() *sqlgraph.QuerySpec {
|
||||
_spec := sqlgraph.NewQuerySpec(organization.Table, organization.Columns, sqlgraph.NewFieldSpec(organization.FieldID, field.TypeUUID))
|
||||
_spec.From = oq.sql
|
||||
if unique := oq.ctx.Unique; unique != nil {
|
||||
_spec.Unique = *unique
|
||||
} else if oq.path != nil {
|
||||
_spec.Unique = true
|
||||
}
|
||||
if fields := oq.ctx.Fields; len(fields) > 0 {
|
||||
_spec.Node.Columns = make([]string, 0, len(fields))
|
||||
_spec.Node.Columns = append(_spec.Node.Columns, organization.FieldID)
|
||||
for i := range fields {
|
||||
if fields[i] != organization.FieldID {
|
||||
_spec.Node.Columns = append(_spec.Node.Columns, fields[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
if ps := oq.predicates; len(ps) > 0 {
|
||||
_spec.Predicate = func(selector *sql.Selector) {
|
||||
for i := range ps {
|
||||
ps[i](selector)
|
||||
}
|
||||
}
|
||||
}
|
||||
if limit := oq.ctx.Limit; limit != nil {
|
||||
_spec.Limit = *limit
|
||||
}
|
||||
if offset := oq.ctx.Offset; offset != nil {
|
||||
_spec.Offset = *offset
|
||||
}
|
||||
if ps := oq.order; len(ps) > 0 {
|
||||
_spec.Order = func(selector *sql.Selector) {
|
||||
for i := range ps {
|
||||
ps[i](selector)
|
||||
}
|
||||
}
|
||||
}
|
||||
return _spec
|
||||
}
|
||||
|
||||
func (oq *OrganizationQuery) sqlQuery(ctx context.Context) *sql.Selector {
|
||||
builder := sql.Dialect(oq.driver.Dialect())
|
||||
t1 := builder.Table(organization.Table)
|
||||
columns := oq.ctx.Fields
|
||||
if len(columns) == 0 {
|
||||
columns = organization.Columns
|
||||
}
|
||||
selector := builder.Select(t1.Columns(columns...)...).From(t1)
|
||||
if oq.sql != nil {
|
||||
selector = oq.sql
|
||||
selector.Select(selector.Columns(columns...)...)
|
||||
}
|
||||
if oq.ctx.Unique != nil && *oq.ctx.Unique {
|
||||
selector.Distinct()
|
||||
}
|
||||
for _, p := range oq.predicates {
|
||||
p(selector)
|
||||
}
|
||||
for _, p := range oq.order {
|
||||
p(selector)
|
||||
}
|
||||
if offset := oq.ctx.Offset; offset != nil {
|
||||
// limit is mandatory for offset clause. We start
|
||||
// with default value, and override it below if needed.
|
||||
selector.Offset(*offset).Limit(math.MaxInt32)
|
||||
}
|
||||
if limit := oq.ctx.Limit; limit != nil {
|
||||
selector.Limit(*limit)
|
||||
}
|
||||
return selector
|
||||
}
|
||||
|
||||
// OrganizationGroupBy is the group-by builder for Organization entities.
|
||||
type OrganizationGroupBy struct {
|
||||
selector
|
||||
build *OrganizationQuery
|
||||
}
|
||||
|
||||
// Aggregate adds the given aggregation functions to the group-by query.
|
||||
func (ogb *OrganizationGroupBy) Aggregate(fns ...AggregateFunc) *OrganizationGroupBy {
|
||||
ogb.fns = append(ogb.fns, fns...)
|
||||
return ogb
|
||||
}
|
||||
|
||||
// Scan applies the selector query and scans the result into the given value.
|
||||
func (ogb *OrganizationGroupBy) Scan(ctx context.Context, v any) error {
|
||||
ctx = setContextOp(ctx, ogb.build.ctx, "GroupBy")
|
||||
if err := ogb.build.prepareQuery(ctx); err != nil {
|
||||
return err
|
||||
}
|
||||
return scanWithInterceptors[*OrganizationQuery, *OrganizationGroupBy](ctx, ogb.build, ogb, ogb.build.inters, v)
|
||||
}
|
||||
|
||||
func (ogb *OrganizationGroupBy) sqlScan(ctx context.Context, root *OrganizationQuery, v any) error {
|
||||
selector := root.sqlQuery(ctx).Select()
|
||||
aggregation := make([]string, 0, len(ogb.fns))
|
||||
for _, fn := range ogb.fns {
|
||||
aggregation = append(aggregation, fn(selector))
|
||||
}
|
||||
if len(selector.SelectedColumns()) == 0 {
|
||||
columns := make([]string, 0, len(*ogb.flds)+len(ogb.fns))
|
||||
for _, f := range *ogb.flds {
|
||||
columns = append(columns, selector.C(f))
|
||||
}
|
||||
columns = append(columns, aggregation...)
|
||||
selector.Select(columns...)
|
||||
}
|
||||
selector.GroupBy(selector.Columns(*ogb.flds...)...)
|
||||
if err := selector.Err(); err != nil {
|
||||
return err
|
||||
}
|
||||
rows := &sql.Rows{}
|
||||
query, args := selector.Query()
|
||||
if err := ogb.build.driver.Query(ctx, query, args, rows); err != nil {
|
||||
return err
|
||||
}
|
||||
defer rows.Close()
|
||||
return sql.ScanSlice(rows, v)
|
||||
}
|
||||
|
||||
// OrganizationSelect is the builder for selecting fields of Organization entities.
|
||||
type OrganizationSelect struct {
|
||||
*OrganizationQuery
|
||||
selector
|
||||
}
|
||||
|
||||
// Aggregate adds the given aggregation functions to the selector query.
|
||||
func (os *OrganizationSelect) Aggregate(fns ...AggregateFunc) *OrganizationSelect {
|
||||
os.fns = append(os.fns, fns...)
|
||||
return os
|
||||
}
|
||||
|
||||
// Scan applies the selector query and scans the result into the given value.
|
||||
func (os *OrganizationSelect) Scan(ctx context.Context, v any) error {
|
||||
ctx = setContextOp(ctx, os.ctx, "Select")
|
||||
if err := os.prepareQuery(ctx); err != nil {
|
||||
return err
|
||||
}
|
||||
return scanWithInterceptors[*OrganizationQuery, *OrganizationSelect](ctx, os.OrganizationQuery, os, os.inters, v)
|
||||
}
|
||||
|
||||
func (os *OrganizationSelect) sqlScan(ctx context.Context, root *OrganizationQuery, v any) error {
|
||||
selector := root.sqlQuery(ctx)
|
||||
aggregation := make([]string, 0, len(os.fns))
|
||||
for _, fn := range os.fns {
|
||||
aggregation = append(aggregation, fn(selector))
|
||||
}
|
||||
switch n := len(*os.selector.flds); {
|
||||
case n == 0 && len(aggregation) > 0:
|
||||
selector.Select(aggregation...)
|
||||
case n != 0 && len(aggregation) > 0:
|
||||
selector.AppendSelect(aggregation...)
|
||||
}
|
||||
rows := &sql.Rows{}
|
||||
query, args := selector.Query()
|
||||
if err := os.driver.Query(ctx, query, args, rows); err != nil {
|
||||
return err
|
||||
}
|
||||
defer rows.Close()
|
||||
return sql.ScanSlice(rows, v)
|
||||
}
|
||||
306
internal/ent/organization_update.go
Normal file
306
internal/ent/organization_update.go
Normal file
@@ -0,0 +1,306 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package ent
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"entgo.io/ent/schema/field"
|
||||
"github.com/holos-run/holos/internal/ent/organization"
|
||||
"github.com/holos-run/holos/internal/ent/predicate"
|
||||
)
|
||||
|
||||
// OrganizationUpdate is the builder for updating Organization entities.
|
||||
type OrganizationUpdate struct {
|
||||
config
|
||||
hooks []Hook
|
||||
mutation *OrganizationMutation
|
||||
}
|
||||
|
||||
// Where appends a list predicates to the OrganizationUpdate builder.
|
||||
func (ou *OrganizationUpdate) Where(ps ...predicate.Organization) *OrganizationUpdate {
|
||||
ou.mutation.Where(ps...)
|
||||
return ou
|
||||
}
|
||||
|
||||
// SetUpdatedAt sets the "updated_at" field.
|
||||
func (ou *OrganizationUpdate) SetUpdatedAt(t time.Time) *OrganizationUpdate {
|
||||
ou.mutation.SetUpdatedAt(t)
|
||||
return ou
|
||||
}
|
||||
|
||||
// SetName sets the "name" field.
|
||||
func (ou *OrganizationUpdate) SetName(s string) *OrganizationUpdate {
|
||||
ou.mutation.SetName(s)
|
||||
return ou
|
||||
}
|
||||
|
||||
// SetNillableName sets the "name" field if the given value is not nil.
|
||||
func (ou *OrganizationUpdate) SetNillableName(s *string) *OrganizationUpdate {
|
||||
if s != nil {
|
||||
ou.SetName(*s)
|
||||
}
|
||||
return ou
|
||||
}
|
||||
|
||||
// SetDisplayName sets the "display_name" field.
|
||||
func (ou *OrganizationUpdate) SetDisplayName(s string) *OrganizationUpdate {
|
||||
ou.mutation.SetDisplayName(s)
|
||||
return ou
|
||||
}
|
||||
|
||||
// SetNillableDisplayName sets the "display_name" field if the given value is not nil.
|
||||
func (ou *OrganizationUpdate) SetNillableDisplayName(s *string) *OrganizationUpdate {
|
||||
if s != nil {
|
||||
ou.SetDisplayName(*s)
|
||||
}
|
||||
return ou
|
||||
}
|
||||
|
||||
// Mutation returns the OrganizationMutation object of the builder.
|
||||
func (ou *OrganizationUpdate) Mutation() *OrganizationMutation {
|
||||
return ou.mutation
|
||||
}
|
||||
|
||||
// Save executes the query and returns the number of nodes affected by the update operation.
|
||||
func (ou *OrganizationUpdate) Save(ctx context.Context) (int, error) {
|
||||
ou.defaults()
|
||||
return withHooks(ctx, ou.sqlSave, ou.mutation, ou.hooks)
|
||||
}
|
||||
|
||||
// SaveX is like Save, but panics if an error occurs.
|
||||
func (ou *OrganizationUpdate) SaveX(ctx context.Context) int {
|
||||
affected, err := ou.Save(ctx)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return affected
|
||||
}
|
||||
|
||||
// Exec executes the query.
|
||||
func (ou *OrganizationUpdate) Exec(ctx context.Context) error {
|
||||
_, err := ou.Save(ctx)
|
||||
return err
|
||||
}
|
||||
|
||||
// ExecX is like Exec, but panics if an error occurs.
|
||||
func (ou *OrganizationUpdate) ExecX(ctx context.Context) {
|
||||
if err := ou.Exec(ctx); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
// defaults sets the default values of the builder before save.
|
||||
func (ou *OrganizationUpdate) defaults() {
|
||||
if _, ok := ou.mutation.UpdatedAt(); !ok {
|
||||
v := organization.UpdateDefaultUpdatedAt()
|
||||
ou.mutation.SetUpdatedAt(v)
|
||||
}
|
||||
}
|
||||
|
||||
// check runs all checks and user-defined validators on the builder.
|
||||
func (ou *OrganizationUpdate) check() error {
|
||||
if v, ok := ou.mutation.Name(); ok {
|
||||
if err := organization.NameValidator(v); err != nil {
|
||||
return &ValidationError{Name: "name", err: fmt.Errorf(`ent: validator failed for field "Organization.name": %w`, err)}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (ou *OrganizationUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
||||
if err := ou.check(); err != nil {
|
||||
return n, err
|
||||
}
|
||||
_spec := sqlgraph.NewUpdateSpec(organization.Table, organization.Columns, sqlgraph.NewFieldSpec(organization.FieldID, field.TypeUUID))
|
||||
if ps := ou.mutation.predicates; len(ps) > 0 {
|
||||
_spec.Predicate = func(selector *sql.Selector) {
|
||||
for i := range ps {
|
||||
ps[i](selector)
|
||||
}
|
||||
}
|
||||
}
|
||||
if value, ok := ou.mutation.UpdatedAt(); ok {
|
||||
_spec.SetField(organization.FieldUpdatedAt, field.TypeTime, value)
|
||||
}
|
||||
if value, ok := ou.mutation.Name(); ok {
|
||||
_spec.SetField(organization.FieldName, field.TypeString, value)
|
||||
}
|
||||
if value, ok := ou.mutation.DisplayName(); ok {
|
||||
_spec.SetField(organization.FieldDisplayName, field.TypeString, value)
|
||||
}
|
||||
if n, err = sqlgraph.UpdateNodes(ctx, ou.driver, _spec); err != nil {
|
||||
if _, ok := err.(*sqlgraph.NotFoundError); ok {
|
||||
err = &NotFoundError{organization.Label}
|
||||
} else if sqlgraph.IsConstraintError(err) {
|
||||
err = &ConstraintError{msg: err.Error(), wrap: err}
|
||||
}
|
||||
return 0, err
|
||||
}
|
||||
ou.mutation.done = true
|
||||
return n, nil
|
||||
}
|
||||
|
||||
// OrganizationUpdateOne is the builder for updating a single Organization entity.
|
||||
type OrganizationUpdateOne struct {
|
||||
config
|
||||
fields []string
|
||||
hooks []Hook
|
||||
mutation *OrganizationMutation
|
||||
}
|
||||
|
||||
// SetUpdatedAt sets the "updated_at" field.
|
||||
func (ouo *OrganizationUpdateOne) SetUpdatedAt(t time.Time) *OrganizationUpdateOne {
|
||||
ouo.mutation.SetUpdatedAt(t)
|
||||
return ouo
|
||||
}
|
||||
|
||||
// SetName sets the "name" field.
|
||||
func (ouo *OrganizationUpdateOne) SetName(s string) *OrganizationUpdateOne {
|
||||
ouo.mutation.SetName(s)
|
||||
return ouo
|
||||
}
|
||||
|
||||
// SetNillableName sets the "name" field if the given value is not nil.
|
||||
func (ouo *OrganizationUpdateOne) SetNillableName(s *string) *OrganizationUpdateOne {
|
||||
if s != nil {
|
||||
ouo.SetName(*s)
|
||||
}
|
||||
return ouo
|
||||
}
|
||||
|
||||
// SetDisplayName sets the "display_name" field.
|
||||
func (ouo *OrganizationUpdateOne) SetDisplayName(s string) *OrganizationUpdateOne {
|
||||
ouo.mutation.SetDisplayName(s)
|
||||
return ouo
|
||||
}
|
||||
|
||||
// SetNillableDisplayName sets the "display_name" field if the given value is not nil.
|
||||
func (ouo *OrganizationUpdateOne) SetNillableDisplayName(s *string) *OrganizationUpdateOne {
|
||||
if s != nil {
|
||||
ouo.SetDisplayName(*s)
|
||||
}
|
||||
return ouo
|
||||
}
|
||||
|
||||
// Mutation returns the OrganizationMutation object of the builder.
|
||||
func (ouo *OrganizationUpdateOne) Mutation() *OrganizationMutation {
|
||||
return ouo.mutation
|
||||
}
|
||||
|
||||
// Where appends a list predicates to the OrganizationUpdate builder.
|
||||
func (ouo *OrganizationUpdateOne) Where(ps ...predicate.Organization) *OrganizationUpdateOne {
|
||||
ouo.mutation.Where(ps...)
|
||||
return ouo
|
||||
}
|
||||
|
||||
// Select allows selecting one or more fields (columns) of the returned entity.
|
||||
// The default is selecting all fields defined in the entity schema.
|
||||
func (ouo *OrganizationUpdateOne) Select(field string, fields ...string) *OrganizationUpdateOne {
|
||||
ouo.fields = append([]string{field}, fields...)
|
||||
return ouo
|
||||
}
|
||||
|
||||
// Save executes the query and returns the updated Organization entity.
|
||||
func (ouo *OrganizationUpdateOne) Save(ctx context.Context) (*Organization, error) {
|
||||
ouo.defaults()
|
||||
return withHooks(ctx, ouo.sqlSave, ouo.mutation, ouo.hooks)
|
||||
}
|
||||
|
||||
// SaveX is like Save, but panics if an error occurs.
|
||||
func (ouo *OrganizationUpdateOne) SaveX(ctx context.Context) *Organization {
|
||||
node, err := ouo.Save(ctx)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return node
|
||||
}
|
||||
|
||||
// Exec executes the query on the entity.
|
||||
func (ouo *OrganizationUpdateOne) Exec(ctx context.Context) error {
|
||||
_, err := ouo.Save(ctx)
|
||||
return err
|
||||
}
|
||||
|
||||
// ExecX is like Exec, but panics if an error occurs.
|
||||
func (ouo *OrganizationUpdateOne) ExecX(ctx context.Context) {
|
||||
if err := ouo.Exec(ctx); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
// defaults sets the default values of the builder before save.
|
||||
func (ouo *OrganizationUpdateOne) defaults() {
|
||||
if _, ok := ouo.mutation.UpdatedAt(); !ok {
|
||||
v := organization.UpdateDefaultUpdatedAt()
|
||||
ouo.mutation.SetUpdatedAt(v)
|
||||
}
|
||||
}
|
||||
|
||||
// check runs all checks and user-defined validators on the builder.
|
||||
func (ouo *OrganizationUpdateOne) check() error {
|
||||
if v, ok := ouo.mutation.Name(); ok {
|
||||
if err := organization.NameValidator(v); err != nil {
|
||||
return &ValidationError{Name: "name", err: fmt.Errorf(`ent: validator failed for field "Organization.name": %w`, err)}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (ouo *OrganizationUpdateOne) sqlSave(ctx context.Context) (_node *Organization, err error) {
|
||||
if err := ouo.check(); err != nil {
|
||||
return _node, err
|
||||
}
|
||||
_spec := sqlgraph.NewUpdateSpec(organization.Table, organization.Columns, sqlgraph.NewFieldSpec(organization.FieldID, field.TypeUUID))
|
||||
id, ok := ouo.mutation.ID()
|
||||
if !ok {
|
||||
return nil, &ValidationError{Name: "id", err: errors.New(`ent: missing "Organization.id" for update`)}
|
||||
}
|
||||
_spec.Node.ID.Value = id
|
||||
if fields := ouo.fields; len(fields) > 0 {
|
||||
_spec.Node.Columns = make([]string, 0, len(fields))
|
||||
_spec.Node.Columns = append(_spec.Node.Columns, organization.FieldID)
|
||||
for _, f := range fields {
|
||||
if !organization.ValidColumn(f) {
|
||||
return nil, &ValidationError{Name: f, err: fmt.Errorf("ent: invalid field %q for query", f)}
|
||||
}
|
||||
if f != organization.FieldID {
|
||||
_spec.Node.Columns = append(_spec.Node.Columns, f)
|
||||
}
|
||||
}
|
||||
}
|
||||
if ps := ouo.mutation.predicates; len(ps) > 0 {
|
||||
_spec.Predicate = func(selector *sql.Selector) {
|
||||
for i := range ps {
|
||||
ps[i](selector)
|
||||
}
|
||||
}
|
||||
}
|
||||
if value, ok := ouo.mutation.UpdatedAt(); ok {
|
||||
_spec.SetField(organization.FieldUpdatedAt, field.TypeTime, value)
|
||||
}
|
||||
if value, ok := ouo.mutation.Name(); ok {
|
||||
_spec.SetField(organization.FieldName, field.TypeString, value)
|
||||
}
|
||||
if value, ok := ouo.mutation.DisplayName(); ok {
|
||||
_spec.SetField(organization.FieldDisplayName, field.TypeString, value)
|
||||
}
|
||||
_node = &Organization{config: ouo.config}
|
||||
_spec.Assign = _node.assignValues
|
||||
_spec.ScanValues = _node.scanValues
|
||||
if err = sqlgraph.UpdateNode(ctx, ouo.driver, _spec); err != nil {
|
||||
if _, ok := err.(*sqlgraph.NotFoundError); ok {
|
||||
err = &NotFoundError{organization.Label}
|
||||
} else if sqlgraph.IsConstraintError(err) {
|
||||
err = &ConstraintError{msg: err.Error(), wrap: err}
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
ouo.mutation.done = true
|
||||
return _node, nil
|
||||
}
|
||||
@@ -6,8 +6,8 @@ import (
|
||||
"entgo.io/ent/dialect/sql"
|
||||
)
|
||||
|
||||
// Organization is the predicate function for organization builders.
|
||||
type Organization func(*sql.Selector)
|
||||
|
||||
// User is the predicate function for user builders.
|
||||
type User func(*sql.Selector)
|
||||
|
||||
// UserIdentity is the predicate function for useridentity builders.
|
||||
type UserIdentity func(*sql.Selector)
|
||||
68
internal/ent/runtime.go
Normal file
68
internal/ent/runtime.go
Normal file
@@ -0,0 +1,68 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package ent
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/gofrs/uuid"
|
||||
"github.com/holos-run/holos/internal/ent/organization"
|
||||
"github.com/holos-run/holos/internal/ent/schema"
|
||||
"github.com/holos-run/holos/internal/ent/user"
|
||||
)
|
||||
|
||||
// The init function reads all schema descriptors with runtime code
|
||||
// (default values, validators, hooks and policies) and stitches it
|
||||
// to their package variables.
|
||||
func init() {
|
||||
organizationMixin := schema.Organization{}.Mixin()
|
||||
organizationMixinFields0 := organizationMixin[0].Fields()
|
||||
_ = organizationMixinFields0
|
||||
organizationMixinFields1 := organizationMixin[1].Fields()
|
||||
_ = organizationMixinFields1
|
||||
organizationFields := schema.Organization{}.Fields()
|
||||
_ = organizationFields
|
||||
// organizationDescCreatedAt is the schema descriptor for created_at field.
|
||||
organizationDescCreatedAt := organizationMixinFields1[0].Descriptor()
|
||||
// organization.DefaultCreatedAt holds the default value on creation for the created_at field.
|
||||
organization.DefaultCreatedAt = organizationDescCreatedAt.Default.(func() time.Time)
|
||||
// organizationDescUpdatedAt is the schema descriptor for updated_at field.
|
||||
organizationDescUpdatedAt := organizationMixinFields1[1].Descriptor()
|
||||
// organization.DefaultUpdatedAt holds the default value on creation for the updated_at field.
|
||||
organization.DefaultUpdatedAt = organizationDescUpdatedAt.Default.(func() time.Time)
|
||||
// organization.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
|
||||
organization.UpdateDefaultUpdatedAt = organizationDescUpdatedAt.UpdateDefault.(func() time.Time)
|
||||
// organizationDescName is the schema descriptor for name field.
|
||||
organizationDescName := organizationFields[0].Descriptor()
|
||||
// organization.NameValidator is a validator for the "name" field. It is called by the builders before save.
|
||||
organization.NameValidator = organizationDescName.Validators[0].(func(string) error)
|
||||
// organizationDescID is the schema descriptor for id field.
|
||||
organizationDescID := organizationMixinFields0[0].Descriptor()
|
||||
// organization.DefaultID holds the default value on creation for the id field.
|
||||
organization.DefaultID = organizationDescID.Default.(func() uuid.UUID)
|
||||
userMixin := schema.User{}.Mixin()
|
||||
userMixinFields0 := userMixin[0].Fields()
|
||||
_ = userMixinFields0
|
||||
userMixinFields1 := userMixin[1].Fields()
|
||||
_ = userMixinFields1
|
||||
userFields := schema.User{}.Fields()
|
||||
_ = userFields
|
||||
// userDescCreatedAt is the schema descriptor for created_at field.
|
||||
userDescCreatedAt := userMixinFields1[0].Descriptor()
|
||||
// user.DefaultCreatedAt holds the default value on creation for the created_at field.
|
||||
user.DefaultCreatedAt = userDescCreatedAt.Default.(func() time.Time)
|
||||
// userDescUpdatedAt is the schema descriptor for updated_at field.
|
||||
userDescUpdatedAt := userMixinFields1[1].Descriptor()
|
||||
// user.DefaultUpdatedAt holds the default value on creation for the updated_at field.
|
||||
user.DefaultUpdatedAt = userDescUpdatedAt.Default.(func() time.Time)
|
||||
// user.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
|
||||
user.UpdateDefaultUpdatedAt = userDescUpdatedAt.UpdateDefault.(func() time.Time)
|
||||
// userDescEmail is the schema descriptor for email field.
|
||||
userDescEmail := userFields[0].Descriptor()
|
||||
// user.EmailValidator is a validator for the "email" field. It is called by the builders before save.
|
||||
user.EmailValidator = userDescEmail.Validators[0].(func(string) error)
|
||||
// userDescID is the schema descriptor for id field.
|
||||
userDescID := userMixinFields0[0].Descriptor()
|
||||
// user.DefaultID holds the default value on creation for the id field.
|
||||
user.DefaultID = userDescID.Default.(func() uuid.UUID)
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
package runtime
|
||||
|
||||
// The schema-stitching logic is generated in github.com/holos-run/holos/internal/server/ent/runtime.go
|
||||
// The schema-stitching logic is generated in github.com/holos-run/holos/internal/ent/runtime.go
|
||||
|
||||
const (
|
||||
Version = "v0.13.1" // Version of ent codegen.
|
||||
27
internal/ent/schema/organization.go
Normal file
27
internal/ent/schema/organization.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package schema
|
||||
|
||||
import (
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/schema/field"
|
||||
)
|
||||
|
||||
// User holds the schema definition for the User entity, the internal
|
||||
// representation and identity of a single human user. Users are scoped
|
||||
// globally.
|
||||
type Organization struct {
|
||||
ent.Schema
|
||||
}
|
||||
|
||||
func (Organization) Fields() []ent.Field {
|
||||
return []ent.Field{
|
||||
field.String("name").NotEmpty().Unique(),
|
||||
field.String("display_name"),
|
||||
}
|
||||
}
|
||||
|
||||
func (Organization) Mixin() []ent.Mixin {
|
||||
return []ent.Mixin{
|
||||
BaseMixin{},
|
||||
TimeMixin{},
|
||||
}
|
||||
}
|
||||
30
internal/ent/schema/user.go
Normal file
30
internal/ent/schema/user.go
Normal file
@@ -0,0 +1,30 @@
|
||||
package schema
|
||||
|
||||
import (
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/schema/field"
|
||||
)
|
||||
|
||||
// User holds the schema definition for the User entity, the internal
|
||||
// representation and identity of a single human user. Users are scoped
|
||||
// globally.
|
||||
type User struct {
|
||||
ent.Schema
|
||||
}
|
||||
|
||||
func (User) Mixin() []ent.Mixin {
|
||||
return []ent.Mixin{
|
||||
BaseMixin{},
|
||||
TimeMixin{},
|
||||
}
|
||||
}
|
||||
|
||||
// Fields of the User.
|
||||
func (User) Fields() []ent.Field {
|
||||
return []ent.Field{
|
||||
field.String("email").NotEmpty().Unique(),
|
||||
field.String("iss"),
|
||||
field.String("sub"),
|
||||
field.String("name"),
|
||||
}
|
||||
}
|
||||
@@ -12,10 +12,10 @@ import (
|
||||
// Tx is a transactional client that is created by calling Client.Tx().
|
||||
type Tx struct {
|
||||
config
|
||||
// Organization is the client for interacting with the Organization builders.
|
||||
Organization *OrganizationClient
|
||||
// User is the client for interacting with the User builders.
|
||||
User *UserClient
|
||||
// UserIdentity is the client for interacting with the UserIdentity builders.
|
||||
UserIdentity *UserIdentityClient
|
||||
|
||||
// lazily loaded.
|
||||
client *Client
|
||||
@@ -147,8 +147,8 @@ func (tx *Tx) Client() *Client {
|
||||
}
|
||||
|
||||
func (tx *Tx) init() {
|
||||
tx.Organization = NewOrganizationClient(tx.config)
|
||||
tx.User = NewUserClient(tx.config)
|
||||
tx.UserIdentity = NewUserIdentityClient(tx.config)
|
||||
}
|
||||
|
||||
// txDriver wraps the given dialect.Tx with a nop dialect.Driver implementation.
|
||||
@@ -158,7 +158,7 @@ func (tx *Tx) init() {
|
||||
// of them in order to commit or rollback the transaction.
|
||||
//
|
||||
// If a closed transaction is embedded in one of the generated entities, and the entity
|
||||
// applies a query, for example: User.QueryXXX(), the query will be executed
|
||||
// applies a query, for example: Organization.QueryXXX(), the query will be executed
|
||||
// through the driver which created this transaction.
|
||||
//
|
||||
// Note that txDriver is not goroutine safe.
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"github.com/gofrs/uuid"
|
||||
"github.com/holos-run/holos/internal/server/ent/user"
|
||||
"github.com/holos-run/holos/internal/ent/user"
|
||||
)
|
||||
|
||||
// User is the model entity for the User schema.
|
||||
@@ -24,42 +24,21 @@ type User struct {
|
||||
UpdatedAt time.Time `json:"updated_at,omitempty"`
|
||||
// Email holds the value of the "email" field.
|
||||
Email string `json:"email,omitempty"`
|
||||
// EmailVerified holds the value of the "email_verified" field.
|
||||
EmailVerified bool `json:"email_verified,omitempty"`
|
||||
// Iss holds the value of the "iss" field.
|
||||
Iss string `json:"iss,omitempty"`
|
||||
// Sub holds the value of the "sub" field.
|
||||
Sub string `json:"sub,omitempty"`
|
||||
// Name holds the value of the "name" field.
|
||||
Name string `json:"name,omitempty"`
|
||||
// Edges holds the relations/edges for other nodes in the graph.
|
||||
// The values are being populated by the UserQuery when eager-loading is set.
|
||||
Edges UserEdges `json:"edges"`
|
||||
Name string `json:"name,omitempty"`
|
||||
selectValues sql.SelectValues
|
||||
}
|
||||
|
||||
// UserEdges holds the relations/edges for other nodes in the graph.
|
||||
type UserEdges struct {
|
||||
// Identities holds the value of the identities edge.
|
||||
Identities []*UserIdentity `json:"identities,omitempty"`
|
||||
// loadedTypes holds the information for reporting if a
|
||||
// type was loaded (or requested) in eager-loading or not.
|
||||
loadedTypes [1]bool
|
||||
}
|
||||
|
||||
// IdentitiesOrErr returns the Identities value or an error if the edge
|
||||
// was not loaded in eager-loading.
|
||||
func (e UserEdges) IdentitiesOrErr() ([]*UserIdentity, error) {
|
||||
if e.loadedTypes[0] {
|
||||
return e.Identities, nil
|
||||
}
|
||||
return nil, &NotLoadedError{edge: "identities"}
|
||||
}
|
||||
|
||||
// scanValues returns the types for scanning values from sql.Rows.
|
||||
func (*User) scanValues(columns []string) ([]any, error) {
|
||||
values := make([]any, len(columns))
|
||||
for i := range columns {
|
||||
switch columns[i] {
|
||||
case user.FieldEmailVerified:
|
||||
values[i] = new(sql.NullBool)
|
||||
case user.FieldEmail, user.FieldName:
|
||||
case user.FieldEmail, user.FieldIss, user.FieldSub, user.FieldName:
|
||||
values[i] = new(sql.NullString)
|
||||
case user.FieldCreatedAt, user.FieldUpdatedAt:
|
||||
values[i] = new(sql.NullTime)
|
||||
@@ -104,11 +83,17 @@ func (u *User) assignValues(columns []string, values []any) error {
|
||||
} else if value.Valid {
|
||||
u.Email = value.String
|
||||
}
|
||||
case user.FieldEmailVerified:
|
||||
if value, ok := values[i].(*sql.NullBool); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field email_verified", values[i])
|
||||
case user.FieldIss:
|
||||
if value, ok := values[i].(*sql.NullString); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field iss", values[i])
|
||||
} else if value.Valid {
|
||||
u.EmailVerified = value.Bool
|
||||
u.Iss = value.String
|
||||
}
|
||||
case user.FieldSub:
|
||||
if value, ok := values[i].(*sql.NullString); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field sub", values[i])
|
||||
} else if value.Valid {
|
||||
u.Sub = value.String
|
||||
}
|
||||
case user.FieldName:
|
||||
if value, ok := values[i].(*sql.NullString); !ok {
|
||||
@@ -129,11 +114,6 @@ func (u *User) Value(name string) (ent.Value, error) {
|
||||
return u.selectValues.Get(name)
|
||||
}
|
||||
|
||||
// QueryIdentities queries the "identities" edge of the User entity.
|
||||
func (u *User) QueryIdentities() *UserIdentityQuery {
|
||||
return NewUserClient(u.config).QueryIdentities(u)
|
||||
}
|
||||
|
||||
// Update returns a builder for updating this User.
|
||||
// Note that you need to call User.Unwrap() before calling this method if this User
|
||||
// was returned from a transaction, and the transaction was committed or rolled back.
|
||||
@@ -166,8 +146,11 @@ func (u *User) String() string {
|
||||
builder.WriteString("email=")
|
||||
builder.WriteString(u.Email)
|
||||
builder.WriteString(", ")
|
||||
builder.WriteString("email_verified=")
|
||||
builder.WriteString(fmt.Sprintf("%v", u.EmailVerified))
|
||||
builder.WriteString("iss=")
|
||||
builder.WriteString(u.Iss)
|
||||
builder.WriteString(", ")
|
||||
builder.WriteString("sub=")
|
||||
builder.WriteString(u.Sub)
|
||||
builder.WriteString(", ")
|
||||
builder.WriteString("name=")
|
||||
builder.WriteString(u.Name)
|
||||
@@ -6,7 +6,6 @@ import (
|
||||
"time"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"github.com/gofrs/uuid"
|
||||
)
|
||||
|
||||
@@ -21,21 +20,14 @@ const (
|
||||
FieldUpdatedAt = "updated_at"
|
||||
// FieldEmail holds the string denoting the email field in the database.
|
||||
FieldEmail = "email"
|
||||
// FieldEmailVerified holds the string denoting the email_verified field in the database.
|
||||
FieldEmailVerified = "email_verified"
|
||||
// FieldIss holds the string denoting the iss field in the database.
|
||||
FieldIss = "iss"
|
||||
// FieldSub holds the string denoting the sub field in the database.
|
||||
FieldSub = "sub"
|
||||
// FieldName holds the string denoting the name field in the database.
|
||||
FieldName = "name"
|
||||
// EdgeIdentities holds the string denoting the identities edge name in mutations.
|
||||
EdgeIdentities = "identities"
|
||||
// Table holds the table name of the user in the database.
|
||||
Table = "users"
|
||||
// IdentitiesTable is the table that holds the identities relation/edge.
|
||||
IdentitiesTable = "user_identities"
|
||||
// IdentitiesInverseTable is the table name for the UserIdentity entity.
|
||||
// It exists in this package in order to avoid circular dependency with the "useridentity" package.
|
||||
IdentitiesInverseTable = "user_identities"
|
||||
// IdentitiesColumn is the table column denoting the identities relation/edge.
|
||||
IdentitiesColumn = "user_id"
|
||||
)
|
||||
|
||||
// Columns holds all SQL columns for user fields.
|
||||
@@ -44,7 +36,8 @@ var Columns = []string{
|
||||
FieldCreatedAt,
|
||||
FieldUpdatedAt,
|
||||
FieldEmail,
|
||||
FieldEmailVerified,
|
||||
FieldIss,
|
||||
FieldSub,
|
||||
FieldName,
|
||||
}
|
||||
|
||||
@@ -67,8 +60,6 @@ var (
|
||||
UpdateDefaultUpdatedAt func() time.Time
|
||||
// EmailValidator is a validator for the "email" field. It is called by the builders before save.
|
||||
EmailValidator func(string) error
|
||||
// DefaultEmailVerified holds the default value on creation for the "email_verified" field.
|
||||
DefaultEmailVerified bool
|
||||
// DefaultID holds the default value on creation for the "id" field.
|
||||
DefaultID func() uuid.UUID
|
||||
)
|
||||
@@ -96,33 +87,17 @@ func ByEmail(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldEmail, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByEmailVerified orders the results by the email_verified field.
|
||||
func ByEmailVerified(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldEmailVerified, opts...).ToFunc()
|
||||
// ByIss orders the results by the iss field.
|
||||
func ByIss(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldIss, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// BySub orders the results by the sub field.
|
||||
func BySub(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldSub, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByName orders the results by the name field.
|
||||
func ByName(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldName, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByIdentitiesCount orders the results by identities count.
|
||||
func ByIdentitiesCount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborsCount(s, newIdentitiesStep(), opts...)
|
||||
}
|
||||
}
|
||||
|
||||
// ByIdentities orders the results by identities terms.
|
||||
func ByIdentities(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newIdentitiesStep(), append([]sql.OrderTerm{term}, terms...)...)
|
||||
}
|
||||
}
|
||||
func newIdentitiesStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(IdentitiesInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, IdentitiesTable, IdentitiesColumn),
|
||||
)
|
||||
}
|
||||
@@ -6,9 +6,8 @@ import (
|
||||
"time"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"github.com/gofrs/uuid"
|
||||
"github.com/holos-run/holos/internal/server/ent/predicate"
|
||||
"github.com/holos-run/holos/internal/ent/predicate"
|
||||
)
|
||||
|
||||
// ID filters vertices based on their ID field.
|
||||
@@ -71,9 +70,14 @@ func Email(v string) predicate.User {
|
||||
return predicate.User(sql.FieldEQ(FieldEmail, v))
|
||||
}
|
||||
|
||||
// EmailVerified applies equality check predicate on the "email_verified" field. It's identical to EmailVerifiedEQ.
|
||||
func EmailVerified(v bool) predicate.User {
|
||||
return predicate.User(sql.FieldEQ(FieldEmailVerified, v))
|
||||
// Iss applies equality check predicate on the "iss" field. It's identical to IssEQ.
|
||||
func Iss(v string) predicate.User {
|
||||
return predicate.User(sql.FieldEQ(FieldIss, v))
|
||||
}
|
||||
|
||||
// Sub applies equality check predicate on the "sub" field. It's identical to SubEQ.
|
||||
func Sub(v string) predicate.User {
|
||||
return predicate.User(sql.FieldEQ(FieldSub, v))
|
||||
}
|
||||
|
||||
// Name applies equality check predicate on the "name" field. It's identical to NameEQ.
|
||||
@@ -226,14 +230,134 @@ func EmailContainsFold(v string) predicate.User {
|
||||
return predicate.User(sql.FieldContainsFold(FieldEmail, v))
|
||||
}
|
||||
|
||||
// EmailVerifiedEQ applies the EQ predicate on the "email_verified" field.
|
||||
func EmailVerifiedEQ(v bool) predicate.User {
|
||||
return predicate.User(sql.FieldEQ(FieldEmailVerified, v))
|
||||
// IssEQ applies the EQ predicate on the "iss" field.
|
||||
func IssEQ(v string) predicate.User {
|
||||
return predicate.User(sql.FieldEQ(FieldIss, v))
|
||||
}
|
||||
|
||||
// EmailVerifiedNEQ applies the NEQ predicate on the "email_verified" field.
|
||||
func EmailVerifiedNEQ(v bool) predicate.User {
|
||||
return predicate.User(sql.FieldNEQ(FieldEmailVerified, v))
|
||||
// IssNEQ applies the NEQ predicate on the "iss" field.
|
||||
func IssNEQ(v string) predicate.User {
|
||||
return predicate.User(sql.FieldNEQ(FieldIss, v))
|
||||
}
|
||||
|
||||
// IssIn applies the In predicate on the "iss" field.
|
||||
func IssIn(vs ...string) predicate.User {
|
||||
return predicate.User(sql.FieldIn(FieldIss, vs...))
|
||||
}
|
||||
|
||||
// IssNotIn applies the NotIn predicate on the "iss" field.
|
||||
func IssNotIn(vs ...string) predicate.User {
|
||||
return predicate.User(sql.FieldNotIn(FieldIss, vs...))
|
||||
}
|
||||
|
||||
// IssGT applies the GT predicate on the "iss" field.
|
||||
func IssGT(v string) predicate.User {
|
||||
return predicate.User(sql.FieldGT(FieldIss, v))
|
||||
}
|
||||
|
||||
// IssGTE applies the GTE predicate on the "iss" field.
|
||||
func IssGTE(v string) predicate.User {
|
||||
return predicate.User(sql.FieldGTE(FieldIss, v))
|
||||
}
|
||||
|
||||
// IssLT applies the LT predicate on the "iss" field.
|
||||
func IssLT(v string) predicate.User {
|
||||
return predicate.User(sql.FieldLT(FieldIss, v))
|
||||
}
|
||||
|
||||
// IssLTE applies the LTE predicate on the "iss" field.
|
||||
func IssLTE(v string) predicate.User {
|
||||
return predicate.User(sql.FieldLTE(FieldIss, v))
|
||||
}
|
||||
|
||||
// IssContains applies the Contains predicate on the "iss" field.
|
||||
func IssContains(v string) predicate.User {
|
||||
return predicate.User(sql.FieldContains(FieldIss, v))
|
||||
}
|
||||
|
||||
// IssHasPrefix applies the HasPrefix predicate on the "iss" field.
|
||||
func IssHasPrefix(v string) predicate.User {
|
||||
return predicate.User(sql.FieldHasPrefix(FieldIss, v))
|
||||
}
|
||||
|
||||
// IssHasSuffix applies the HasSuffix predicate on the "iss" field.
|
||||
func IssHasSuffix(v string) predicate.User {
|
||||
return predicate.User(sql.FieldHasSuffix(FieldIss, v))
|
||||
}
|
||||
|
||||
// IssEqualFold applies the EqualFold predicate on the "iss" field.
|
||||
func IssEqualFold(v string) predicate.User {
|
||||
return predicate.User(sql.FieldEqualFold(FieldIss, v))
|
||||
}
|
||||
|
||||
// IssContainsFold applies the ContainsFold predicate on the "iss" field.
|
||||
func IssContainsFold(v string) predicate.User {
|
||||
return predicate.User(sql.FieldContainsFold(FieldIss, v))
|
||||
}
|
||||
|
||||
// SubEQ applies the EQ predicate on the "sub" field.
|
||||
func SubEQ(v string) predicate.User {
|
||||
return predicate.User(sql.FieldEQ(FieldSub, v))
|
||||
}
|
||||
|
||||
// SubNEQ applies the NEQ predicate on the "sub" field.
|
||||
func SubNEQ(v string) predicate.User {
|
||||
return predicate.User(sql.FieldNEQ(FieldSub, v))
|
||||
}
|
||||
|
||||
// SubIn applies the In predicate on the "sub" field.
|
||||
func SubIn(vs ...string) predicate.User {
|
||||
return predicate.User(sql.FieldIn(FieldSub, vs...))
|
||||
}
|
||||
|
||||
// SubNotIn applies the NotIn predicate on the "sub" field.
|
||||
func SubNotIn(vs ...string) predicate.User {
|
||||
return predicate.User(sql.FieldNotIn(FieldSub, vs...))
|
||||
}
|
||||
|
||||
// SubGT applies the GT predicate on the "sub" field.
|
||||
func SubGT(v string) predicate.User {
|
||||
return predicate.User(sql.FieldGT(FieldSub, v))
|
||||
}
|
||||
|
||||
// SubGTE applies the GTE predicate on the "sub" field.
|
||||
func SubGTE(v string) predicate.User {
|
||||
return predicate.User(sql.FieldGTE(FieldSub, v))
|
||||
}
|
||||
|
||||
// SubLT applies the LT predicate on the "sub" field.
|
||||
func SubLT(v string) predicate.User {
|
||||
return predicate.User(sql.FieldLT(FieldSub, v))
|
||||
}
|
||||
|
||||
// SubLTE applies the LTE predicate on the "sub" field.
|
||||
func SubLTE(v string) predicate.User {
|
||||
return predicate.User(sql.FieldLTE(FieldSub, v))
|
||||
}
|
||||
|
||||
// SubContains applies the Contains predicate on the "sub" field.
|
||||
func SubContains(v string) predicate.User {
|
||||
return predicate.User(sql.FieldContains(FieldSub, v))
|
||||
}
|
||||
|
||||
// SubHasPrefix applies the HasPrefix predicate on the "sub" field.
|
||||
func SubHasPrefix(v string) predicate.User {
|
||||
return predicate.User(sql.FieldHasPrefix(FieldSub, v))
|
||||
}
|
||||
|
||||
// SubHasSuffix applies the HasSuffix predicate on the "sub" field.
|
||||
func SubHasSuffix(v string) predicate.User {
|
||||
return predicate.User(sql.FieldHasSuffix(FieldSub, v))
|
||||
}
|
||||
|
||||
// SubEqualFold applies the EqualFold predicate on the "sub" field.
|
||||
func SubEqualFold(v string) predicate.User {
|
||||
return predicate.User(sql.FieldEqualFold(FieldSub, v))
|
||||
}
|
||||
|
||||
// SubContainsFold applies the ContainsFold predicate on the "sub" field.
|
||||
func SubContainsFold(v string) predicate.User {
|
||||
return predicate.User(sql.FieldContainsFold(FieldSub, v))
|
||||
}
|
||||
|
||||
// NameEQ applies the EQ predicate on the "name" field.
|
||||
@@ -301,29 +425,6 @@ func NameContainsFold(v string) predicate.User {
|
||||
return predicate.User(sql.FieldContainsFold(FieldName, v))
|
||||
}
|
||||
|
||||
// HasIdentities applies the HasEdge predicate on the "identities" edge.
|
||||
func HasIdentities() predicate.User {
|
||||
return predicate.User(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, IdentitiesTable, IdentitiesColumn),
|
||||
)
|
||||
sqlgraph.HasNeighbors(s, step)
|
||||
})
|
||||
}
|
||||
|
||||
// HasIdentitiesWith applies the HasEdge predicate on the "identities" edge with a given conditions (other predicates).
|
||||
func HasIdentitiesWith(preds ...predicate.UserIdentity) predicate.User {
|
||||
return predicate.User(func(s *sql.Selector) {
|
||||
step := newIdentitiesStep()
|
||||
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
||||
for _, p := range preds {
|
||||
p(s)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// And groups predicates with the AND operator between them.
|
||||
func And(predicates ...predicate.User) predicate.User {
|
||||
return predicate.User(sql.AndPredicates(predicates...))
|
||||
@@ -13,8 +13,7 @@ import (
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"entgo.io/ent/schema/field"
|
||||
"github.com/gofrs/uuid"
|
||||
"github.com/holos-run/holos/internal/server/ent/user"
|
||||
"github.com/holos-run/holos/internal/server/ent/useridentity"
|
||||
"github.com/holos-run/holos/internal/ent/user"
|
||||
)
|
||||
|
||||
// UserCreate is the builder for creating a User entity.
|
||||
@@ -59,17 +58,15 @@ func (uc *UserCreate) SetEmail(s string) *UserCreate {
|
||||
return uc
|
||||
}
|
||||
|
||||
// SetEmailVerified sets the "email_verified" field.
|
||||
func (uc *UserCreate) SetEmailVerified(b bool) *UserCreate {
|
||||
uc.mutation.SetEmailVerified(b)
|
||||
// SetIss sets the "iss" field.
|
||||
func (uc *UserCreate) SetIss(s string) *UserCreate {
|
||||
uc.mutation.SetIss(s)
|
||||
return uc
|
||||
}
|
||||
|
||||
// SetNillableEmailVerified sets the "email_verified" field if the given value is not nil.
|
||||
func (uc *UserCreate) SetNillableEmailVerified(b *bool) *UserCreate {
|
||||
if b != nil {
|
||||
uc.SetEmailVerified(*b)
|
||||
}
|
||||
// SetSub sets the "sub" field.
|
||||
func (uc *UserCreate) SetSub(s string) *UserCreate {
|
||||
uc.mutation.SetSub(s)
|
||||
return uc
|
||||
}
|
||||
|
||||
@@ -93,21 +90,6 @@ func (uc *UserCreate) SetNillableID(u *uuid.UUID) *UserCreate {
|
||||
return uc
|
||||
}
|
||||
|
||||
// AddIdentityIDs adds the "identities" edge to the UserIdentity entity by IDs.
|
||||
func (uc *UserCreate) AddIdentityIDs(ids ...uuid.UUID) *UserCreate {
|
||||
uc.mutation.AddIdentityIDs(ids...)
|
||||
return uc
|
||||
}
|
||||
|
||||
// AddIdentities adds the "identities" edges to the UserIdentity entity.
|
||||
func (uc *UserCreate) AddIdentities(u ...*UserIdentity) *UserCreate {
|
||||
ids := make([]uuid.UUID, len(u))
|
||||
for i := range u {
|
||||
ids[i] = u[i].ID
|
||||
}
|
||||
return uc.AddIdentityIDs(ids...)
|
||||
}
|
||||
|
||||
// Mutation returns the UserMutation object of the builder.
|
||||
func (uc *UserCreate) Mutation() *UserMutation {
|
||||
return uc.mutation
|
||||
@@ -151,10 +133,6 @@ func (uc *UserCreate) defaults() {
|
||||
v := user.DefaultUpdatedAt()
|
||||
uc.mutation.SetUpdatedAt(v)
|
||||
}
|
||||
if _, ok := uc.mutation.EmailVerified(); !ok {
|
||||
v := user.DefaultEmailVerified
|
||||
uc.mutation.SetEmailVerified(v)
|
||||
}
|
||||
if _, ok := uc.mutation.ID(); !ok {
|
||||
v := user.DefaultID()
|
||||
uc.mutation.SetID(v)
|
||||
@@ -177,8 +155,11 @@ func (uc *UserCreate) check() error {
|
||||
return &ValidationError{Name: "email", err: fmt.Errorf(`ent: validator failed for field "User.email": %w`, err)}
|
||||
}
|
||||
}
|
||||
if _, ok := uc.mutation.EmailVerified(); !ok {
|
||||
return &ValidationError{Name: "email_verified", err: errors.New(`ent: missing required field "User.email_verified"`)}
|
||||
if _, ok := uc.mutation.Iss(); !ok {
|
||||
return &ValidationError{Name: "iss", err: errors.New(`ent: missing required field "User.iss"`)}
|
||||
}
|
||||
if _, ok := uc.mutation.Sub(); !ok {
|
||||
return &ValidationError{Name: "sub", err: errors.New(`ent: missing required field "User.sub"`)}
|
||||
}
|
||||
if _, ok := uc.mutation.Name(); !ok {
|
||||
return &ValidationError{Name: "name", err: errors.New(`ent: missing required field "User.name"`)}
|
||||
@@ -231,30 +212,18 @@ func (uc *UserCreate) createSpec() (*User, *sqlgraph.CreateSpec) {
|
||||
_spec.SetField(user.FieldEmail, field.TypeString, value)
|
||||
_node.Email = value
|
||||
}
|
||||
if value, ok := uc.mutation.EmailVerified(); ok {
|
||||
_spec.SetField(user.FieldEmailVerified, field.TypeBool, value)
|
||||
_node.EmailVerified = value
|
||||
if value, ok := uc.mutation.Iss(); ok {
|
||||
_spec.SetField(user.FieldIss, field.TypeString, value)
|
||||
_node.Iss = value
|
||||
}
|
||||
if value, ok := uc.mutation.Sub(); ok {
|
||||
_spec.SetField(user.FieldSub, field.TypeString, value)
|
||||
_node.Sub = value
|
||||
}
|
||||
if value, ok := uc.mutation.Name(); ok {
|
||||
_spec.SetField(user.FieldName, field.TypeString, value)
|
||||
_node.Name = value
|
||||
}
|
||||
if nodes := uc.mutation.IdentitiesIDs(); len(nodes) > 0 {
|
||||
edge := &sqlgraph.EdgeSpec{
|
||||
Rel: sqlgraph.O2M,
|
||||
Inverse: false,
|
||||
Table: user.IdentitiesTable,
|
||||
Columns: []string{user.IdentitiesColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: sqlgraph.NewFieldSpec(useridentity.FieldID, field.TypeUUID),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
edge.Target.Nodes = append(edge.Target.Nodes, k)
|
||||
}
|
||||
_spec.Edges = append(_spec.Edges, edge)
|
||||
}
|
||||
return _node, _spec
|
||||
}
|
||||
|
||||
@@ -331,15 +300,27 @@ func (u *UserUpsert) UpdateEmail() *UserUpsert {
|
||||
return u
|
||||
}
|
||||
|
||||
// SetEmailVerified sets the "email_verified" field.
|
||||
func (u *UserUpsert) SetEmailVerified(v bool) *UserUpsert {
|
||||
u.Set(user.FieldEmailVerified, v)
|
||||
// SetIss sets the "iss" field.
|
||||
func (u *UserUpsert) SetIss(v string) *UserUpsert {
|
||||
u.Set(user.FieldIss, v)
|
||||
return u
|
||||
}
|
||||
|
||||
// UpdateEmailVerified sets the "email_verified" field to the value that was provided on create.
|
||||
func (u *UserUpsert) UpdateEmailVerified() *UserUpsert {
|
||||
u.SetExcluded(user.FieldEmailVerified)
|
||||
// UpdateIss sets the "iss" field to the value that was provided on create.
|
||||
func (u *UserUpsert) UpdateIss() *UserUpsert {
|
||||
u.SetExcluded(user.FieldIss)
|
||||
return u
|
||||
}
|
||||
|
||||
// SetSub sets the "sub" field.
|
||||
func (u *UserUpsert) SetSub(v string) *UserUpsert {
|
||||
u.Set(user.FieldSub, v)
|
||||
return u
|
||||
}
|
||||
|
||||
// UpdateSub sets the "sub" field to the value that was provided on create.
|
||||
func (u *UserUpsert) UpdateSub() *UserUpsert {
|
||||
u.SetExcluded(user.FieldSub)
|
||||
return u
|
||||
}
|
||||
|
||||
@@ -434,17 +415,31 @@ func (u *UserUpsertOne) UpdateEmail() *UserUpsertOne {
|
||||
})
|
||||
}
|
||||
|
||||
// SetEmailVerified sets the "email_verified" field.
|
||||
func (u *UserUpsertOne) SetEmailVerified(v bool) *UserUpsertOne {
|
||||
// SetIss sets the "iss" field.
|
||||
func (u *UserUpsertOne) SetIss(v string) *UserUpsertOne {
|
||||
return u.Update(func(s *UserUpsert) {
|
||||
s.SetEmailVerified(v)
|
||||
s.SetIss(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateEmailVerified sets the "email_verified" field to the value that was provided on create.
|
||||
func (u *UserUpsertOne) UpdateEmailVerified() *UserUpsertOne {
|
||||
// UpdateIss sets the "iss" field to the value that was provided on create.
|
||||
func (u *UserUpsertOne) UpdateIss() *UserUpsertOne {
|
||||
return u.Update(func(s *UserUpsert) {
|
||||
s.UpdateEmailVerified()
|
||||
s.UpdateIss()
|
||||
})
|
||||
}
|
||||
|
||||
// SetSub sets the "sub" field.
|
||||
func (u *UserUpsertOne) SetSub(v string) *UserUpsertOne {
|
||||
return u.Update(func(s *UserUpsert) {
|
||||
s.SetSub(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateSub sets the "sub" field to the value that was provided on create.
|
||||
func (u *UserUpsertOne) UpdateSub() *UserUpsertOne {
|
||||
return u.Update(func(s *UserUpsert) {
|
||||
s.UpdateSub()
|
||||
})
|
||||
}
|
||||
|
||||
@@ -708,17 +703,31 @@ func (u *UserUpsertBulk) UpdateEmail() *UserUpsertBulk {
|
||||
})
|
||||
}
|
||||
|
||||
// SetEmailVerified sets the "email_verified" field.
|
||||
func (u *UserUpsertBulk) SetEmailVerified(v bool) *UserUpsertBulk {
|
||||
// SetIss sets the "iss" field.
|
||||
func (u *UserUpsertBulk) SetIss(v string) *UserUpsertBulk {
|
||||
return u.Update(func(s *UserUpsert) {
|
||||
s.SetEmailVerified(v)
|
||||
s.SetIss(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateEmailVerified sets the "email_verified" field to the value that was provided on create.
|
||||
func (u *UserUpsertBulk) UpdateEmailVerified() *UserUpsertBulk {
|
||||
// UpdateIss sets the "iss" field to the value that was provided on create.
|
||||
func (u *UserUpsertBulk) UpdateIss() *UserUpsertBulk {
|
||||
return u.Update(func(s *UserUpsert) {
|
||||
s.UpdateEmailVerified()
|
||||
s.UpdateIss()
|
||||
})
|
||||
}
|
||||
|
||||
// SetSub sets the "sub" field.
|
||||
func (u *UserUpsertBulk) SetSub(v string) *UserUpsertBulk {
|
||||
return u.Update(func(s *UserUpsert) {
|
||||
s.SetSub(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateSub sets the "sub" field to the value that was provided on create.
|
||||
func (u *UserUpsertBulk) UpdateSub() *UserUpsertBulk {
|
||||
return u.Update(func(s *UserUpsert) {
|
||||
s.UpdateSub()
|
||||
})
|
||||
}
|
||||
|
||||
@@ -8,8 +8,8 @@ import (
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"entgo.io/ent/schema/field"
|
||||
"github.com/holos-run/holos/internal/server/ent/predicate"
|
||||
"github.com/holos-run/holos/internal/server/ent/user"
|
||||
"github.com/holos-run/holos/internal/ent/predicate"
|
||||
"github.com/holos-run/holos/internal/ent/user"
|
||||
)
|
||||
|
||||
// UserDelete is the builder for deleting a User entity.
|
||||
@@ -4,7 +4,6 @@ package ent
|
||||
|
||||
import (
|
||||
"context"
|
||||
"database/sql/driver"
|
||||
"fmt"
|
||||
"math"
|
||||
|
||||
@@ -12,19 +11,17 @@ import (
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"entgo.io/ent/schema/field"
|
||||
"github.com/gofrs/uuid"
|
||||
"github.com/holos-run/holos/internal/server/ent/predicate"
|
||||
"github.com/holos-run/holos/internal/server/ent/user"
|
||||
"github.com/holos-run/holos/internal/server/ent/useridentity"
|
||||
"github.com/holos-run/holos/internal/ent/predicate"
|
||||
"github.com/holos-run/holos/internal/ent/user"
|
||||
)
|
||||
|
||||
// UserQuery is the builder for querying User entities.
|
||||
type UserQuery struct {
|
||||
config
|
||||
ctx *QueryContext
|
||||
order []user.OrderOption
|
||||
inters []Interceptor
|
||||
predicates []predicate.User
|
||||
withIdentities *UserIdentityQuery
|
||||
ctx *QueryContext
|
||||
order []user.OrderOption
|
||||
inters []Interceptor
|
||||
predicates []predicate.User
|
||||
// intermediate query (i.e. traversal path).
|
||||
sql *sql.Selector
|
||||
path func(context.Context) (*sql.Selector, error)
|
||||
@@ -61,28 +58,6 @@ func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery {
|
||||
return uq
|
||||
}
|
||||
|
||||
// QueryIdentities chains the current query on the "identities" edge.
|
||||
func (uq *UserQuery) QueryIdentities() *UserIdentityQuery {
|
||||
query := (&UserIdentityClient{config: uq.config}).Query()
|
||||
query.path = func(ctx context.Context) (fromU *sql.Selector, err error) {
|
||||
if err := uq.prepareQuery(ctx); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
selector := uq.sqlQuery(ctx)
|
||||
if err := selector.Err(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(user.Table, user.FieldID, selector),
|
||||
sqlgraph.To(useridentity.Table, useridentity.FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, user.IdentitiesTable, user.IdentitiesColumn),
|
||||
)
|
||||
fromU = sqlgraph.SetNeighbors(uq.driver.Dialect(), step)
|
||||
return fromU, nil
|
||||
}
|
||||
return query
|
||||
}
|
||||
|
||||
// First returns the first User entity from the query.
|
||||
// Returns a *NotFoundError when no User was found.
|
||||
func (uq *UserQuery) First(ctx context.Context) (*User, error) {
|
||||
@@ -270,29 +245,17 @@ func (uq *UserQuery) Clone() *UserQuery {
|
||||
return nil
|
||||
}
|
||||
return &UserQuery{
|
||||
config: uq.config,
|
||||
ctx: uq.ctx.Clone(),
|
||||
order: append([]user.OrderOption{}, uq.order...),
|
||||
inters: append([]Interceptor{}, uq.inters...),
|
||||
predicates: append([]predicate.User{}, uq.predicates...),
|
||||
withIdentities: uq.withIdentities.Clone(),
|
||||
config: uq.config,
|
||||
ctx: uq.ctx.Clone(),
|
||||
order: append([]user.OrderOption{}, uq.order...),
|
||||
inters: append([]Interceptor{}, uq.inters...),
|
||||
predicates: append([]predicate.User{}, uq.predicates...),
|
||||
// clone intermediate query.
|
||||
sql: uq.sql.Clone(),
|
||||
path: uq.path,
|
||||
}
|
||||
}
|
||||
|
||||
// WithIdentities tells the query-builder to eager-load the nodes that are connected to
|
||||
// the "identities" edge. The optional arguments are used to configure the query builder of the edge.
|
||||
func (uq *UserQuery) WithIdentities(opts ...func(*UserIdentityQuery)) *UserQuery {
|
||||
query := (&UserIdentityClient{config: uq.config}).Query()
|
||||
for _, opt := range opts {
|
||||
opt(query)
|
||||
}
|
||||
uq.withIdentities = query
|
||||
return uq
|
||||
}
|
||||
|
||||
// GroupBy is used to group vertices by one or more fields/columns.
|
||||
// It is often used with aggregate functions, like: count, max, mean, min, sum.
|
||||
//
|
||||
@@ -369,11 +332,8 @@ func (uq *UserQuery) prepareQuery(ctx context.Context) error {
|
||||
|
||||
func (uq *UserQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*User, error) {
|
||||
var (
|
||||
nodes = []*User{}
|
||||
_spec = uq.querySpec()
|
||||
loadedTypes = [1]bool{
|
||||
uq.withIdentities != nil,
|
||||
}
|
||||
nodes = []*User{}
|
||||
_spec = uq.querySpec()
|
||||
)
|
||||
_spec.ScanValues = func(columns []string) ([]any, error) {
|
||||
return (*User).scanValues(nil, columns)
|
||||
@@ -381,7 +341,6 @@ func (uq *UserQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*User, e
|
||||
_spec.Assign = func(columns []string, values []any) error {
|
||||
node := &User{config: uq.config}
|
||||
nodes = append(nodes, node)
|
||||
node.Edges.loadedTypes = loadedTypes
|
||||
return node.assignValues(columns, values)
|
||||
}
|
||||
for i := range hooks {
|
||||
@@ -393,48 +352,9 @@ func (uq *UserQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*User, e
|
||||
if len(nodes) == 0 {
|
||||
return nodes, nil
|
||||
}
|
||||
if query := uq.withIdentities; query != nil {
|
||||
if err := uq.loadIdentities(ctx, query, nodes,
|
||||
func(n *User) { n.Edges.Identities = []*UserIdentity{} },
|
||||
func(n *User, e *UserIdentity) { n.Edges.Identities = append(n.Edges.Identities, e) }); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
return nodes, nil
|
||||
}
|
||||
|
||||
func (uq *UserQuery) loadIdentities(ctx context.Context, query *UserIdentityQuery, nodes []*User, init func(*User), assign func(*User, *UserIdentity)) error {
|
||||
fks := make([]driver.Value, 0, len(nodes))
|
||||
nodeids := make(map[uuid.UUID]*User)
|
||||
for i := range nodes {
|
||||
fks = append(fks, nodes[i].ID)
|
||||
nodeids[nodes[i].ID] = nodes[i]
|
||||
if init != nil {
|
||||
init(nodes[i])
|
||||
}
|
||||
}
|
||||
query.withFKs = true
|
||||
query.Where(predicate.UserIdentity(func(s *sql.Selector) {
|
||||
s.Where(sql.InValues(s.C(user.IdentitiesColumn), fks...))
|
||||
}))
|
||||
neighbors, err := query.All(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
for _, n := range neighbors {
|
||||
fk := n.user_id
|
||||
if fk == nil {
|
||||
return fmt.Errorf(`foreign-key "user_id" is nil for node %v`, n.ID)
|
||||
}
|
||||
node, ok := nodeids[*fk]
|
||||
if !ok {
|
||||
return fmt.Errorf(`unexpected referenced foreign-key "user_id" returned %v for node %v`, *fk, n.ID)
|
||||
}
|
||||
assign(node, n)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (uq *UserQuery) sqlCount(ctx context.Context) (int, error) {
|
||||
_spec := uq.querySpec()
|
||||
_spec.Node.Columns = uq.ctx.Fields
|
||||
@@ -11,10 +11,8 @@ import (
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"entgo.io/ent/schema/field"
|
||||
"github.com/gofrs/uuid"
|
||||
"github.com/holos-run/holos/internal/server/ent/predicate"
|
||||
"github.com/holos-run/holos/internal/server/ent/user"
|
||||
"github.com/holos-run/holos/internal/server/ent/useridentity"
|
||||
"github.com/holos-run/holos/internal/ent/predicate"
|
||||
"github.com/holos-run/holos/internal/ent/user"
|
||||
)
|
||||
|
||||
// UserUpdate is the builder for updating User entities.
|
||||
@@ -50,16 +48,30 @@ func (uu *UserUpdate) SetNillableEmail(s *string) *UserUpdate {
|
||||
return uu
|
||||
}
|
||||
|
||||
// SetEmailVerified sets the "email_verified" field.
|
||||
func (uu *UserUpdate) SetEmailVerified(b bool) *UserUpdate {
|
||||
uu.mutation.SetEmailVerified(b)
|
||||
// SetIss sets the "iss" field.
|
||||
func (uu *UserUpdate) SetIss(s string) *UserUpdate {
|
||||
uu.mutation.SetIss(s)
|
||||
return uu
|
||||
}
|
||||
|
||||
// SetNillableEmailVerified sets the "email_verified" field if the given value is not nil.
|
||||
func (uu *UserUpdate) SetNillableEmailVerified(b *bool) *UserUpdate {
|
||||
if b != nil {
|
||||
uu.SetEmailVerified(*b)
|
||||
// SetNillableIss sets the "iss" field if the given value is not nil.
|
||||
func (uu *UserUpdate) SetNillableIss(s *string) *UserUpdate {
|
||||
if s != nil {
|
||||
uu.SetIss(*s)
|
||||
}
|
||||
return uu
|
||||
}
|
||||
|
||||
// SetSub sets the "sub" field.
|
||||
func (uu *UserUpdate) SetSub(s string) *UserUpdate {
|
||||
uu.mutation.SetSub(s)
|
||||
return uu
|
||||
}
|
||||
|
||||
// SetNillableSub sets the "sub" field if the given value is not nil.
|
||||
func (uu *UserUpdate) SetNillableSub(s *string) *UserUpdate {
|
||||
if s != nil {
|
||||
uu.SetSub(*s)
|
||||
}
|
||||
return uu
|
||||
}
|
||||
@@ -78,47 +90,11 @@ func (uu *UserUpdate) SetNillableName(s *string) *UserUpdate {
|
||||
return uu
|
||||
}
|
||||
|
||||
// AddIdentityIDs adds the "identities" edge to the UserIdentity entity by IDs.
|
||||
func (uu *UserUpdate) AddIdentityIDs(ids ...uuid.UUID) *UserUpdate {
|
||||
uu.mutation.AddIdentityIDs(ids...)
|
||||
return uu
|
||||
}
|
||||
|
||||
// AddIdentities adds the "identities" edges to the UserIdentity entity.
|
||||
func (uu *UserUpdate) AddIdentities(u ...*UserIdentity) *UserUpdate {
|
||||
ids := make([]uuid.UUID, len(u))
|
||||
for i := range u {
|
||||
ids[i] = u[i].ID
|
||||
}
|
||||
return uu.AddIdentityIDs(ids...)
|
||||
}
|
||||
|
||||
// Mutation returns the UserMutation object of the builder.
|
||||
func (uu *UserUpdate) Mutation() *UserMutation {
|
||||
return uu.mutation
|
||||
}
|
||||
|
||||
// ClearIdentities clears all "identities" edges to the UserIdentity entity.
|
||||
func (uu *UserUpdate) ClearIdentities() *UserUpdate {
|
||||
uu.mutation.ClearIdentities()
|
||||
return uu
|
||||
}
|
||||
|
||||
// RemoveIdentityIDs removes the "identities" edge to UserIdentity entities by IDs.
|
||||
func (uu *UserUpdate) RemoveIdentityIDs(ids ...uuid.UUID) *UserUpdate {
|
||||
uu.mutation.RemoveIdentityIDs(ids...)
|
||||
return uu
|
||||
}
|
||||
|
||||
// RemoveIdentities removes "identities" edges to UserIdentity entities.
|
||||
func (uu *UserUpdate) RemoveIdentities(u ...*UserIdentity) *UserUpdate {
|
||||
ids := make([]uuid.UUID, len(u))
|
||||
for i := range u {
|
||||
ids[i] = u[i].ID
|
||||
}
|
||||
return uu.RemoveIdentityIDs(ids...)
|
||||
}
|
||||
|
||||
// Save executes the query and returns the number of nodes affected by the update operation.
|
||||
func (uu *UserUpdate) Save(ctx context.Context) (int, error) {
|
||||
uu.defaults()
|
||||
@@ -183,57 +159,15 @@ func (uu *UserUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
||||
if value, ok := uu.mutation.Email(); ok {
|
||||
_spec.SetField(user.FieldEmail, field.TypeString, value)
|
||||
}
|
||||
if value, ok := uu.mutation.EmailVerified(); ok {
|
||||
_spec.SetField(user.FieldEmailVerified, field.TypeBool, value)
|
||||
if value, ok := uu.mutation.Iss(); ok {
|
||||
_spec.SetField(user.FieldIss, field.TypeString, value)
|
||||
}
|
||||
if value, ok := uu.mutation.Sub(); ok {
|
||||
_spec.SetField(user.FieldSub, field.TypeString, value)
|
||||
}
|
||||
if value, ok := uu.mutation.Name(); ok {
|
||||
_spec.SetField(user.FieldName, field.TypeString, value)
|
||||
}
|
||||
if uu.mutation.IdentitiesCleared() {
|
||||
edge := &sqlgraph.EdgeSpec{
|
||||
Rel: sqlgraph.O2M,
|
||||
Inverse: false,
|
||||
Table: user.IdentitiesTable,
|
||||
Columns: []string{user.IdentitiesColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: sqlgraph.NewFieldSpec(useridentity.FieldID, field.TypeUUID),
|
||||
},
|
||||
}
|
||||
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
||||
}
|
||||
if nodes := uu.mutation.RemovedIdentitiesIDs(); len(nodes) > 0 && !uu.mutation.IdentitiesCleared() {
|
||||
edge := &sqlgraph.EdgeSpec{
|
||||
Rel: sqlgraph.O2M,
|
||||
Inverse: false,
|
||||
Table: user.IdentitiesTable,
|
||||
Columns: []string{user.IdentitiesColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: sqlgraph.NewFieldSpec(useridentity.FieldID, field.TypeUUID),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
edge.Target.Nodes = append(edge.Target.Nodes, k)
|
||||
}
|
||||
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
||||
}
|
||||
if nodes := uu.mutation.IdentitiesIDs(); len(nodes) > 0 {
|
||||
edge := &sqlgraph.EdgeSpec{
|
||||
Rel: sqlgraph.O2M,
|
||||
Inverse: false,
|
||||
Table: user.IdentitiesTable,
|
||||
Columns: []string{user.IdentitiesColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: sqlgraph.NewFieldSpec(useridentity.FieldID, field.TypeUUID),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
edge.Target.Nodes = append(edge.Target.Nodes, k)
|
||||
}
|
||||
_spec.Edges.Add = append(_spec.Edges.Add, edge)
|
||||
}
|
||||
if n, err = sqlgraph.UpdateNodes(ctx, uu.driver, _spec); err != nil {
|
||||
if _, ok := err.(*sqlgraph.NotFoundError); ok {
|
||||
err = &NotFoundError{user.Label}
|
||||
@@ -274,16 +208,30 @@ func (uuo *UserUpdateOne) SetNillableEmail(s *string) *UserUpdateOne {
|
||||
return uuo
|
||||
}
|
||||
|
||||
// SetEmailVerified sets the "email_verified" field.
|
||||
func (uuo *UserUpdateOne) SetEmailVerified(b bool) *UserUpdateOne {
|
||||
uuo.mutation.SetEmailVerified(b)
|
||||
// SetIss sets the "iss" field.
|
||||
func (uuo *UserUpdateOne) SetIss(s string) *UserUpdateOne {
|
||||
uuo.mutation.SetIss(s)
|
||||
return uuo
|
||||
}
|
||||
|
||||
// SetNillableEmailVerified sets the "email_verified" field if the given value is not nil.
|
||||
func (uuo *UserUpdateOne) SetNillableEmailVerified(b *bool) *UserUpdateOne {
|
||||
if b != nil {
|
||||
uuo.SetEmailVerified(*b)
|
||||
// SetNillableIss sets the "iss" field if the given value is not nil.
|
||||
func (uuo *UserUpdateOne) SetNillableIss(s *string) *UserUpdateOne {
|
||||
if s != nil {
|
||||
uuo.SetIss(*s)
|
||||
}
|
||||
return uuo
|
||||
}
|
||||
|
||||
// SetSub sets the "sub" field.
|
||||
func (uuo *UserUpdateOne) SetSub(s string) *UserUpdateOne {
|
||||
uuo.mutation.SetSub(s)
|
||||
return uuo
|
||||
}
|
||||
|
||||
// SetNillableSub sets the "sub" field if the given value is not nil.
|
||||
func (uuo *UserUpdateOne) SetNillableSub(s *string) *UserUpdateOne {
|
||||
if s != nil {
|
||||
uuo.SetSub(*s)
|
||||
}
|
||||
return uuo
|
||||
}
|
||||
@@ -302,47 +250,11 @@ func (uuo *UserUpdateOne) SetNillableName(s *string) *UserUpdateOne {
|
||||
return uuo
|
||||
}
|
||||
|
||||
// AddIdentityIDs adds the "identities" edge to the UserIdentity entity by IDs.
|
||||
func (uuo *UserUpdateOne) AddIdentityIDs(ids ...uuid.UUID) *UserUpdateOne {
|
||||
uuo.mutation.AddIdentityIDs(ids...)
|
||||
return uuo
|
||||
}
|
||||
|
||||
// AddIdentities adds the "identities" edges to the UserIdentity entity.
|
||||
func (uuo *UserUpdateOne) AddIdentities(u ...*UserIdentity) *UserUpdateOne {
|
||||
ids := make([]uuid.UUID, len(u))
|
||||
for i := range u {
|
||||
ids[i] = u[i].ID
|
||||
}
|
||||
return uuo.AddIdentityIDs(ids...)
|
||||
}
|
||||
|
||||
// Mutation returns the UserMutation object of the builder.
|
||||
func (uuo *UserUpdateOne) Mutation() *UserMutation {
|
||||
return uuo.mutation
|
||||
}
|
||||
|
||||
// ClearIdentities clears all "identities" edges to the UserIdentity entity.
|
||||
func (uuo *UserUpdateOne) ClearIdentities() *UserUpdateOne {
|
||||
uuo.mutation.ClearIdentities()
|
||||
return uuo
|
||||
}
|
||||
|
||||
// RemoveIdentityIDs removes the "identities" edge to UserIdentity entities by IDs.
|
||||
func (uuo *UserUpdateOne) RemoveIdentityIDs(ids ...uuid.UUID) *UserUpdateOne {
|
||||
uuo.mutation.RemoveIdentityIDs(ids...)
|
||||
return uuo
|
||||
}
|
||||
|
||||
// RemoveIdentities removes "identities" edges to UserIdentity entities.
|
||||
func (uuo *UserUpdateOne) RemoveIdentities(u ...*UserIdentity) *UserUpdateOne {
|
||||
ids := make([]uuid.UUID, len(u))
|
||||
for i := range u {
|
||||
ids[i] = u[i].ID
|
||||
}
|
||||
return uuo.RemoveIdentityIDs(ids...)
|
||||
}
|
||||
|
||||
// Where appends a list predicates to the UserUpdate builder.
|
||||
func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne {
|
||||
uuo.mutation.Where(ps...)
|
||||
@@ -437,57 +349,15 @@ func (uuo *UserUpdateOne) sqlSave(ctx context.Context) (_node *User, err error)
|
||||
if value, ok := uuo.mutation.Email(); ok {
|
||||
_spec.SetField(user.FieldEmail, field.TypeString, value)
|
||||
}
|
||||
if value, ok := uuo.mutation.EmailVerified(); ok {
|
||||
_spec.SetField(user.FieldEmailVerified, field.TypeBool, value)
|
||||
if value, ok := uuo.mutation.Iss(); ok {
|
||||
_spec.SetField(user.FieldIss, field.TypeString, value)
|
||||
}
|
||||
if value, ok := uuo.mutation.Sub(); ok {
|
||||
_spec.SetField(user.FieldSub, field.TypeString, value)
|
||||
}
|
||||
if value, ok := uuo.mutation.Name(); ok {
|
||||
_spec.SetField(user.FieldName, field.TypeString, value)
|
||||
}
|
||||
if uuo.mutation.IdentitiesCleared() {
|
||||
edge := &sqlgraph.EdgeSpec{
|
||||
Rel: sqlgraph.O2M,
|
||||
Inverse: false,
|
||||
Table: user.IdentitiesTable,
|
||||
Columns: []string{user.IdentitiesColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: sqlgraph.NewFieldSpec(useridentity.FieldID, field.TypeUUID),
|
||||
},
|
||||
}
|
||||
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
||||
}
|
||||
if nodes := uuo.mutation.RemovedIdentitiesIDs(); len(nodes) > 0 && !uuo.mutation.IdentitiesCleared() {
|
||||
edge := &sqlgraph.EdgeSpec{
|
||||
Rel: sqlgraph.O2M,
|
||||
Inverse: false,
|
||||
Table: user.IdentitiesTable,
|
||||
Columns: []string{user.IdentitiesColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: sqlgraph.NewFieldSpec(useridentity.FieldID, field.TypeUUID),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
edge.Target.Nodes = append(edge.Target.Nodes, k)
|
||||
}
|
||||
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
||||
}
|
||||
if nodes := uuo.mutation.IdentitiesIDs(); len(nodes) > 0 {
|
||||
edge := &sqlgraph.EdgeSpec{
|
||||
Rel: sqlgraph.O2M,
|
||||
Inverse: false,
|
||||
Table: user.IdentitiesTable,
|
||||
Columns: []string{user.IdentitiesColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: sqlgraph.NewFieldSpec(useridentity.FieldID, field.TypeUUID),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
edge.Target.Nodes = append(edge.Target.Nodes, k)
|
||||
}
|
||||
_spec.Edges.Add = append(_spec.Edges.Add, edge)
|
||||
}
|
||||
_node = &User{config: uuo.config}
|
||||
_spec.Assign = _node.assignValues
|
||||
_spec.ScanValues = _node.scanValues
|
||||
@@ -11,10 +11,10 @@ import (
|
||||
|
||||
const Path = "/app/"
|
||||
|
||||
//go:embed all:dist
|
||||
//go:embed all:holos/dist/holos/browser
|
||||
var content embed.FS
|
||||
|
||||
//go:embed dist/app/index.html
|
||||
//go:embed holos/dist/holos/browser/index.html
|
||||
var spaIndexHtml []byte
|
||||
|
||||
// Root returns the content root subdirectory
|
||||
16
internal/frontend/holos/.editorconfig
Normal file
16
internal/frontend/holos/.editorconfig
Normal file
@@ -0,0 +1,16 @@
|
||||
# Editor configuration, see https://editorconfig.org
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.ts]
|
||||
quote_type = single
|
||||
|
||||
[*.md]
|
||||
max_line_length = off
|
||||
trim_trailing_whitespace = false
|
||||
45
internal/frontend/holos/.gitignore
vendored
Normal file
45
internal/frontend/holos/.gitignore
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
# See http://help.github.com/ignore-files/ for more about ignoring files.
|
||||
|
||||
# Compiled output
|
||||
/dist
|
||||
/tmp
|
||||
/out-tsc
|
||||
/bazel-out
|
||||
|
||||
# Node
|
||||
/node_modules
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
|
||||
# IDEs and editors
|
||||
.idea/
|
||||
.project
|
||||
.classpath
|
||||
.c9/
|
||||
*.launch
|
||||
.settings/
|
||||
*.sublime-workspace
|
||||
|
||||
# Visual Studio Code
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
.history/*
|
||||
|
||||
# Miscellaneous
|
||||
/.angular/cache
|
||||
.sass-cache/
|
||||
/connect.lock
|
||||
/coverage
|
||||
/libpeerconnection.log
|
||||
testem.log
|
||||
/typings
|
||||
|
||||
# System files
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
# Generated files
|
||||
/gen/
|
||||
27
internal/frontend/holos/README.md
Normal file
27
internal/frontend/holos/README.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# Holos
|
||||
|
||||
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 17.0.10.
|
||||
|
||||
## Development server
|
||||
|
||||
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files.
|
||||
|
||||
## Code scaffolding
|
||||
|
||||
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
|
||||
|
||||
## Build
|
||||
|
||||
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
|
||||
|
||||
## Running unit tests
|
||||
|
||||
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
|
||||
|
||||
## Running end-to-end tests
|
||||
|
||||
Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
|
||||
|
||||
## Further help
|
||||
|
||||
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
|
||||
100
internal/frontend/holos/angular.json
Normal file
100
internal/frontend/holos/angular.json
Normal file
@@ -0,0 +1,100 @@
|
||||
{
|
||||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
||||
"version": 1,
|
||||
"newProjectRoot": "projects",
|
||||
"projects": {
|
||||
"holos": {
|
||||
"projectType": "application",
|
||||
"schematics": {},
|
||||
"root": "",
|
||||
"sourceRoot": "src",
|
||||
"prefix": "app",
|
||||
"architect": {
|
||||
"build": {
|
||||
"builder": "@angular-devkit/build-angular:application",
|
||||
"options": {
|
||||
"outputPath": "dist/holos",
|
||||
"index": "src/index.html",
|
||||
"browser": "src/main.ts",
|
||||
"polyfills": [
|
||||
"zone.js"
|
||||
],
|
||||
"tsConfig": "tsconfig.app.json",
|
||||
"assets": [
|
||||
"src/favicon.ico",
|
||||
"src/assets"
|
||||
],
|
||||
"styles": [
|
||||
"src/styles.css"
|
||||
],
|
||||
"scripts": [],
|
||||
"server": "src/main.server.ts",
|
||||
"prerender": true,
|
||||
"ssr": {
|
||||
"entry": "server.ts"
|
||||
}
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"budgets": [
|
||||
{
|
||||
"type": "initial",
|
||||
"maximumWarning": "500kb",
|
||||
"maximumError": "1mb"
|
||||
},
|
||||
{
|
||||
"type": "anyComponentStyle",
|
||||
"maximumWarning": "2kb",
|
||||
"maximumError": "4kb"
|
||||
}
|
||||
],
|
||||
"outputHashing": "all"
|
||||
},
|
||||
"development": {
|
||||
"optimization": false,
|
||||
"extractLicenses": false,
|
||||
"sourceMap": true
|
||||
}
|
||||
},
|
||||
"defaultConfiguration": "production"
|
||||
},
|
||||
"serve": {
|
||||
"builder": "@angular-devkit/build-angular:dev-server",
|
||||
"configurations": {
|
||||
"production": {
|
||||
"buildTarget": "holos:build:production"
|
||||
},
|
||||
"development": {
|
||||
"buildTarget": "holos:build:development"
|
||||
}
|
||||
},
|
||||
"defaultConfiguration": "development"
|
||||
},
|
||||
"extract-i18n": {
|
||||
"builder": "@angular-devkit/build-angular:extract-i18n",
|
||||
"options": {
|
||||
"buildTarget": "holos:build"
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
"builder": "@angular-devkit/build-angular:karma",
|
||||
"options": {
|
||||
"polyfills": [
|
||||
"zone.js",
|
||||
"zone.js/testing"
|
||||
],
|
||||
"tsConfig": "tsconfig.spec.json",
|
||||
"assets": [
|
||||
"src/favicon.ico",
|
||||
"src/assets"
|
||||
],
|
||||
"styles": [
|
||||
"src/styles.css"
|
||||
],
|
||||
"scripts": []
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
12710
internal/frontend/holos/package-lock.json
generated
Normal file
12710
internal/frontend/holos/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
52
internal/frontend/holos/package.json
Normal file
52
internal/frontend/holos/package.json
Normal file
@@ -0,0 +1,52 @@
|
||||
{
|
||||
"name": "holos",
|
||||
"version": "0.0.0",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
"build": "ng build",
|
||||
"watch": "ng build --watch --configuration development",
|
||||
"test": "ng test",
|
||||
"serve:ssr:holos": "node dist/holos/server/server.mjs"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "^17.0.0",
|
||||
"@angular/common": "^17.0.0",
|
||||
"@angular/compiler": "^17.0.0",
|
||||
"@angular/core": "^17.0.0",
|
||||
"@angular/forms": "^17.0.0",
|
||||
"@angular/platform-browser": "^17.0.0",
|
||||
"@angular/platform-browser-dynamic": "^17.0.0",
|
||||
"@angular/platform-server": "^17.0.0",
|
||||
"@angular/router": "^17.0.0",
|
||||
"@angular/ssr": "^17.3.3",
|
||||
"@bufbuild/protobuf": "^1.8.0",
|
||||
"@connectrpc/connect": "^1.4.0",
|
||||
"@connectrpc/connect-query": "^1.3.1",
|
||||
"@connectrpc/connect-web": "^1.4.0",
|
||||
"express": "^4.18.2",
|
||||
"rxjs": "~7.8.0",
|
||||
"tslib": "^2.3.0",
|
||||
"zone.js": "~0.14.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "^17.0.10",
|
||||
"@angular/cli": "^17.0.10",
|
||||
"@angular/compiler-cli": "^17.0.0",
|
||||
"@bufbuild/buf": "^1.30.1",
|
||||
"@bufbuild/protoc-gen-es": "^1.8.0",
|
||||
"@connectrpc/protoc-gen-connect-es": "^1.4.0",
|
||||
"@connectrpc/protoc-gen-connect-query": "^1.3.1",
|
||||
"@types/express": "^4.17.17",
|
||||
"@types/jasmine": "~5.1.0",
|
||||
"@types/node": "^18.18.0",
|
||||
"jasmine-core": "~5.1.0",
|
||||
"karma": "~6.4.0",
|
||||
"karma-chrome-launcher": "~3.2.0",
|
||||
"karma-coverage": "~2.2.0",
|
||||
"karma-jasmine": "~5.1.0",
|
||||
"karma-jasmine-html-reporter": "~2.1.0",
|
||||
"typescript": "~5.2.2"
|
||||
}
|
||||
}
|
||||
56
internal/frontend/holos/server.ts
Normal file
56
internal/frontend/holos/server.ts
Normal file
@@ -0,0 +1,56 @@
|
||||
import { APP_BASE_HREF } from '@angular/common';
|
||||
import { CommonEngine } from '@angular/ssr';
|
||||
import express from 'express';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { dirname, join, resolve } from 'node:path';
|
||||
import bootstrap from './src/main.server';
|
||||
|
||||
// The Express app is exported so that it can be used by serverless Functions.
|
||||
export function app(): express.Express {
|
||||
const server = express();
|
||||
const serverDistFolder = dirname(fileURLToPath(import.meta.url));
|
||||
const browserDistFolder = resolve(serverDistFolder, '../browser');
|
||||
const indexHtml = join(serverDistFolder, 'index.server.html');
|
||||
|
||||
const commonEngine = new CommonEngine();
|
||||
|
||||
server.set('view engine', 'html');
|
||||
server.set('views', browserDistFolder);
|
||||
|
||||
// Example Express Rest API endpoints
|
||||
// server.get('/api/**', (req, res) => { });
|
||||
// Serve static files from /browser
|
||||
server.get('*.*', express.static(browserDistFolder, {
|
||||
maxAge: '1y'
|
||||
}));
|
||||
|
||||
// All regular routes use the Angular engine
|
||||
server.get('*', (req, res, next) => {
|
||||
const { protocol, originalUrl, baseUrl, headers } = req;
|
||||
|
||||
commonEngine
|
||||
.render({
|
||||
bootstrap,
|
||||
documentFilePath: indexHtml,
|
||||
url: `${protocol}://${headers.host}${originalUrl}`,
|
||||
publicPath: browserDistFolder,
|
||||
providers: [{ provide: APP_BASE_HREF, useValue: baseUrl }],
|
||||
})
|
||||
.then((html) => res.send(html))
|
||||
.catch((err) => next(err));
|
||||
});
|
||||
|
||||
return server;
|
||||
}
|
||||
|
||||
function run(): void {
|
||||
const port = process.env['PORT'] || 4000;
|
||||
|
||||
// Start up the Node server
|
||||
const server = app();
|
||||
server.listen(port, () => {
|
||||
console.log(`Node Express server listening on http://localhost:${port}`);
|
||||
});
|
||||
}
|
||||
|
||||
run();
|
||||
0
internal/frontend/holos/src/app/app.component.css
Normal file
0
internal/frontend/holos/src/app/app.component.css
Normal file
336
internal/frontend/holos/src/app/app.component.html
Normal file
336
internal/frontend/holos/src/app/app.component.html
Normal file
@@ -0,0 +1,336 @@
|
||||
<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->
|
||||
<!-- * * * * * * * * * * * The content below * * * * * * * * * * * -->
|
||||
<!-- * * * * * * * * * * is only a placeholder * * * * * * * * * * -->
|
||||
<!-- * * * * * * * * * * and can be replaced. * * * * * * * * * * -->
|
||||
<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->
|
||||
<!-- * * * * * * * * * Delete the template below * * * * * * * * * -->
|
||||
<!-- * * * * * * * to get started with your project! * * * * * * * -->
|
||||
<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->
|
||||
|
||||
<style>
|
||||
:host {
|
||||
--bright-blue: oklch(51.01% 0.274 263.83);
|
||||
--electric-violet: oklch(53.18% 0.28 296.97);
|
||||
--french-violet: oklch(47.66% 0.246 305.88);
|
||||
--vivid-pink: oklch(69.02% 0.277 332.77);
|
||||
--hot-red: oklch(61.42% 0.238 15.34);
|
||||
--orange-red: oklch(63.32% 0.24 31.68);
|
||||
|
||||
--gray-900: oklch(19.37% 0.006 300.98);
|
||||
--gray-700: oklch(36.98% 0.014 302.71);
|
||||
--gray-400: oklch(70.9% 0.015 304.04);
|
||||
|
||||
--red-to-pink-to-purple-vertical-gradient: linear-gradient(
|
||||
180deg,
|
||||
var(--orange-red) 0%,
|
||||
var(--vivid-pink) 50%,
|
||||
var(--electric-violet) 100%
|
||||
);
|
||||
|
||||
--red-to-pink-to-purple-horizontal-gradient: linear-gradient(
|
||||
90deg,
|
||||
var(--orange-red) 0%,
|
||||
var(--vivid-pink) 50%,
|
||||
var(--electric-violet) 100%
|
||||
);
|
||||
|
||||
--pill-accent: var(--bright-blue);
|
||||
|
||||
font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
|
||||
Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
|
||||
"Segoe UI Symbol";
|
||||
box-sizing: border-box;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 3.125rem;
|
||||
color: var(--gray-900);
|
||||
font-weight: 500;
|
||||
line-height: 100%;
|
||||
letter-spacing: -0.125rem;
|
||||
margin: 0;
|
||||
font-family: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
|
||||
Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
|
||||
"Segoe UI Symbol";
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
color: var(--gray-700);
|
||||
}
|
||||
|
||||
main {
|
||||
width: 100%;
|
||||
min-height: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 1rem;
|
||||
box-sizing: inherit;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.angular-logo {
|
||||
max-width: 9.2rem;
|
||||
}
|
||||
|
||||
.content {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
width: 100%;
|
||||
max-width: 700px;
|
||||
margin-bottom: 3rem;
|
||||
}
|
||||
|
||||
.content h1 {
|
||||
margin-top: 1.75rem;
|
||||
}
|
||||
|
||||
.content p {
|
||||
margin-top: 1.5rem;
|
||||
}
|
||||
|
||||
.divider {
|
||||
width: 1px;
|
||||
background: var(--red-to-pink-to-purple-vertical-gradient);
|
||||
margin-inline: 0.5rem;
|
||||
}
|
||||
|
||||
.pill-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: start;
|
||||
flex-wrap: wrap;
|
||||
gap: 1.25rem;
|
||||
}
|
||||
|
||||
.pill {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
--pill-accent: var(--bright-blue);
|
||||
background: color-mix(in srgb, var(--pill-accent) 5%, transparent);
|
||||
color: var(--pill-accent);
|
||||
padding-inline: 0.75rem;
|
||||
padding-block: 0.375rem;
|
||||
border-radius: 2.75rem;
|
||||
border: 0;
|
||||
transition: background 0.3s ease;
|
||||
font-family: var(--inter-font);
|
||||
font-size: 0.875rem;
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
line-height: 1.4rem;
|
||||
letter-spacing: -0.00875rem;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.pill:hover {
|
||||
background: color-mix(in srgb, var(--pill-accent) 15%, transparent);
|
||||
}
|
||||
|
||||
.pill-group .pill:nth-child(6n + 1) {
|
||||
--pill-accent: var(--bright-blue);
|
||||
}
|
||||
.pill-group .pill:nth-child(6n + 2) {
|
||||
--pill-accent: var(--french-violet);
|
||||
}
|
||||
.pill-group .pill:nth-child(6n + 3),
|
||||
.pill-group .pill:nth-child(6n + 4),
|
||||
.pill-group .pill:nth-child(6n + 5) {
|
||||
--pill-accent: var(--hot-red);
|
||||
}
|
||||
|
||||
.pill-group svg {
|
||||
margin-inline-start: 0.25rem;
|
||||
}
|
||||
|
||||
.social-links {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.73rem;
|
||||
margin-top: 1.5rem;
|
||||
}
|
||||
|
||||
.social-links path {
|
||||
transition: fill 0.3s ease;
|
||||
fill: var(--gray-400);
|
||||
}
|
||||
|
||||
.social-links a:hover svg path {
|
||||
fill: var(--gray-900);
|
||||
}
|
||||
|
||||
@media screen and (max-width: 650px) {
|
||||
.content {
|
||||
flex-direction: column;
|
||||
width: max-content;
|
||||
}
|
||||
|
||||
.divider {
|
||||
height: 1px;
|
||||
width: 100%;
|
||||
background: var(--red-to-pink-to-purple-horizontal-gradient);
|
||||
margin-block: 1.5rem;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<main class="main">
|
||||
<div class="content">
|
||||
<div class="left-side">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 982 239"
|
||||
fill="none"
|
||||
class="angular-logo"
|
||||
>
|
||||
<g clip-path="url(#a)">
|
||||
<path
|
||||
fill="url(#b)"
|
||||
d="M388.676 191.625h30.849L363.31 31.828h-35.758l-56.215 159.797h30.848l13.174-39.356h60.061l13.256 39.356Zm-65.461-62.675 21.602-64.311h1.227l21.602 64.311h-44.431Zm126.831-7.527v70.202h-28.23V71.839h27.002v20.374h1.392c2.782-6.71 7.2-12.028 13.255-15.956 6.056-3.927 13.584-5.89 22.503-5.89 8.264 0 15.465 1.8 21.684 5.318 6.137 3.518 10.964 8.673 14.319 15.382 3.437 6.71 5.074 14.81 4.992 24.383v76.175h-28.23v-71.92c0-8.019-2.046-14.237-6.219-18.819-4.173-4.5-9.819-6.791-17.102-6.791-4.91 0-9.328 1.063-13.174 3.272-3.846 2.128-6.792 5.237-9.001 9.328-2.046 4.009-3.191 8.918-3.191 14.728ZM589.233 239c-10.147 0-18.82-1.391-26.103-4.091-7.282-2.7-13.092-6.382-17.511-10.964-4.418-4.582-7.528-9.655-9.164-15.219l25.448-6.136c1.145 2.372 2.782 4.663 4.991 6.954 2.209 2.291 5.155 4.255 8.837 5.81 3.683 1.554 8.428 2.291 14.074 2.291 8.019 0 14.647-1.964 19.884-5.81 5.237-3.845 7.856-10.227 7.856-19.064v-22.665h-1.391c-1.473 2.946-3.601 5.892-6.383 9.001-2.782 3.109-6.464 5.645-10.965 7.691-4.582 2.046-10.228 3.109-17.101 3.109-9.165 0-17.511-2.209-25.039-6.545-7.446-4.337-13.42-10.883-17.757-19.474-4.418-8.673-6.628-19.473-6.628-32.565 0-13.091 2.21-24.301 6.628-33.383 4.419-9.082 10.311-15.955 17.839-20.7 7.528-4.746 15.874-7.037 25.039-7.037 7.037 0 12.846 1.145 17.347 3.518 4.582 2.373 8.182 5.236 10.883 8.51 2.7 3.272 4.746 6.382 6.137 9.327h1.554v-19.8h27.821v121.749c0 10.228-2.454 18.737-7.364 25.447-4.91 6.709-11.538 11.7-20.048 15.055-8.509 3.355-18.165 4.991-28.884 4.991Zm.245-71.266c5.974 0 11.047-1.473 15.302-4.337 4.173-2.945 7.446-7.118 9.573-12.519 2.21-5.482 3.274-12.027 3.274-19.637 0-7.609-1.064-14.155-3.274-19.8-2.127-5.646-5.318-10.064-9.491-13.255-4.174-3.11-9.329-4.746-15.384-4.746s-11.537 1.636-15.792 4.91c-4.173 3.272-7.365 7.772-9.492 13.418-2.128 5.727-3.191 12.191-3.191 19.392 0 7.2 1.063 13.745 3.273 19.228 2.127 5.482 5.318 9.736 9.573 12.764 4.174 3.027 9.41 4.582 15.629 4.582Zm141.56-26.51V71.839h28.23v119.786h-27.412v-21.273h-1.227c-2.7 6.709-7.119 12.191-13.338 16.446-6.137 4.255-13.747 6.382-22.748 6.382-7.855 0-14.81-1.718-20.783-5.237-5.974-3.518-10.72-8.591-14.075-15.382-3.355-6.709-5.073-14.891-5.073-24.464V71.839h28.312v71.921c0 7.609 2.046 13.664 6.219 18.083 4.173 4.5 9.655 6.709 16.365 6.709 4.173 0 8.183-.982 12.111-3.028 3.927-2.045 7.118-5.072 9.655-9.082 2.537-4.091 3.764-9.164 3.764-15.218Zm65.707-109.395v159.796h-28.23V31.828h28.23Zm44.841 162.169c-7.61 0-14.402-1.391-20.457-4.091-6.055-2.7-10.883-6.791-14.32-12.109-3.518-5.319-5.237-11.946-5.237-19.801 0-6.791 1.228-12.355 3.765-16.773 2.536-4.419 5.891-7.937 10.228-10.637 4.337-2.618 9.164-4.664 14.647-6.055 5.4-1.391 11.046-2.373 16.856-3.027 7.037-.737 12.683-1.391 17.102-1.964 4.337-.573 7.528-1.555 9.574-2.782 1.963-1.309 3.027-3.273 3.027-5.973v-.491c0-5.891-1.718-10.391-5.237-13.664-3.518-3.191-8.51-4.828-15.056-4.828-6.955 0-12.356 1.473-16.447 4.5-4.009 3.028-6.71 6.546-8.183 10.719l-26.348-3.764c2.046-7.282 5.483-13.336 10.31-18.328 4.746-4.909 10.638-8.59 17.511-11.045 6.955-2.455 14.565-3.682 22.912-3.682 5.809 0 11.537.654 17.265 2.045s10.965 3.6 15.711 6.71c4.746 3.109 8.51 7.282 11.455 12.6 2.864 5.318 4.337 11.946 4.337 19.883v80.184h-27.166v-16.446h-.9c-1.719 3.355-4.092 6.464-7.201 9.328-3.109 2.864-6.955 5.237-11.619 6.955-4.828 1.718-10.229 2.536-16.529 2.536Zm7.364-20.701c5.646 0 10.556-1.145 14.729-3.354 4.173-2.291 7.364-5.237 9.655-9.001 2.292-3.763 3.355-7.854 3.355-12.273v-14.155c-.9.737-2.373 1.391-4.5 2.046-2.128.654-4.419 1.145-7.037 1.636-2.619.491-5.155.9-7.692 1.227-2.537.328-4.746.655-6.628.901-4.173.572-8.019 1.472-11.292 2.781-3.355 1.31-5.973 3.11-7.855 5.401-1.964 2.291-2.864 5.318-2.864 8.918 0 5.237 1.882 9.164 5.728 11.782 3.682 2.782 8.51 4.091 14.401 4.091Zm64.643 18.328V71.839h27.412v19.965h1.227c2.21-6.955 5.974-12.274 11.292-16.038 5.319-3.763 11.456-5.645 18.329-5.645 1.555 0 3.355.082 5.237.163 1.964.164 3.601.328 4.91.573v25.938c-1.227-.41-3.109-.819-5.646-1.146a58.814 58.814 0 0 0-7.446-.49c-5.155 0-9.738 1.145-13.829 3.354-4.091 2.209-7.282 5.236-9.655 9.164-2.373 3.927-3.519 8.427-3.519 13.5v70.448h-28.312ZM222.077 39.192l-8.019 125.923L137.387 0l84.69 39.192Zm-53.105 162.825-57.933 33.056-57.934-33.056 11.783-28.556h92.301l11.783 28.556ZM111.039 62.675l30.357 73.803H80.681l30.358-73.803ZM7.937 165.115 0 39.192 84.69 0 7.937 165.115Z"
|
||||
/>
|
||||
<path
|
||||
fill="url(#c)"
|
||||
d="M388.676 191.625h30.849L363.31 31.828h-35.758l-56.215 159.797h30.848l13.174-39.356h60.061l13.256 39.356Zm-65.461-62.675 21.602-64.311h1.227l21.602 64.311h-44.431Zm126.831-7.527v70.202h-28.23V71.839h27.002v20.374h1.392c2.782-6.71 7.2-12.028 13.255-15.956 6.056-3.927 13.584-5.89 22.503-5.89 8.264 0 15.465 1.8 21.684 5.318 6.137 3.518 10.964 8.673 14.319 15.382 3.437 6.71 5.074 14.81 4.992 24.383v76.175h-28.23v-71.92c0-8.019-2.046-14.237-6.219-18.819-4.173-4.5-9.819-6.791-17.102-6.791-4.91 0-9.328 1.063-13.174 3.272-3.846 2.128-6.792 5.237-9.001 9.328-2.046 4.009-3.191 8.918-3.191 14.728ZM589.233 239c-10.147 0-18.82-1.391-26.103-4.091-7.282-2.7-13.092-6.382-17.511-10.964-4.418-4.582-7.528-9.655-9.164-15.219l25.448-6.136c1.145 2.372 2.782 4.663 4.991 6.954 2.209 2.291 5.155 4.255 8.837 5.81 3.683 1.554 8.428 2.291 14.074 2.291 8.019 0 14.647-1.964 19.884-5.81 5.237-3.845 7.856-10.227 7.856-19.064v-22.665h-1.391c-1.473 2.946-3.601 5.892-6.383 9.001-2.782 3.109-6.464 5.645-10.965 7.691-4.582 2.046-10.228 3.109-17.101 3.109-9.165 0-17.511-2.209-25.039-6.545-7.446-4.337-13.42-10.883-17.757-19.474-4.418-8.673-6.628-19.473-6.628-32.565 0-13.091 2.21-24.301 6.628-33.383 4.419-9.082 10.311-15.955 17.839-20.7 7.528-4.746 15.874-7.037 25.039-7.037 7.037 0 12.846 1.145 17.347 3.518 4.582 2.373 8.182 5.236 10.883 8.51 2.7 3.272 4.746 6.382 6.137 9.327h1.554v-19.8h27.821v121.749c0 10.228-2.454 18.737-7.364 25.447-4.91 6.709-11.538 11.7-20.048 15.055-8.509 3.355-18.165 4.991-28.884 4.991Zm.245-71.266c5.974 0 11.047-1.473 15.302-4.337 4.173-2.945 7.446-7.118 9.573-12.519 2.21-5.482 3.274-12.027 3.274-19.637 0-7.609-1.064-14.155-3.274-19.8-2.127-5.646-5.318-10.064-9.491-13.255-4.174-3.11-9.329-4.746-15.384-4.746s-11.537 1.636-15.792 4.91c-4.173 3.272-7.365 7.772-9.492 13.418-2.128 5.727-3.191 12.191-3.191 19.392 0 7.2 1.063 13.745 3.273 19.228 2.127 5.482 5.318 9.736 9.573 12.764 4.174 3.027 9.41 4.582 15.629 4.582Zm141.56-26.51V71.839h28.23v119.786h-27.412v-21.273h-1.227c-2.7 6.709-7.119 12.191-13.338 16.446-6.137 4.255-13.747 6.382-22.748 6.382-7.855 0-14.81-1.718-20.783-5.237-5.974-3.518-10.72-8.591-14.075-15.382-3.355-6.709-5.073-14.891-5.073-24.464V71.839h28.312v71.921c0 7.609 2.046 13.664 6.219 18.083 4.173 4.5 9.655 6.709 16.365 6.709 4.173 0 8.183-.982 12.111-3.028 3.927-2.045 7.118-5.072 9.655-9.082 2.537-4.091 3.764-9.164 3.764-15.218Zm65.707-109.395v159.796h-28.23V31.828h28.23Zm44.841 162.169c-7.61 0-14.402-1.391-20.457-4.091-6.055-2.7-10.883-6.791-14.32-12.109-3.518-5.319-5.237-11.946-5.237-19.801 0-6.791 1.228-12.355 3.765-16.773 2.536-4.419 5.891-7.937 10.228-10.637 4.337-2.618 9.164-4.664 14.647-6.055 5.4-1.391 11.046-2.373 16.856-3.027 7.037-.737 12.683-1.391 17.102-1.964 4.337-.573 7.528-1.555 9.574-2.782 1.963-1.309 3.027-3.273 3.027-5.973v-.491c0-5.891-1.718-10.391-5.237-13.664-3.518-3.191-8.51-4.828-15.056-4.828-6.955 0-12.356 1.473-16.447 4.5-4.009 3.028-6.71 6.546-8.183 10.719l-26.348-3.764c2.046-7.282 5.483-13.336 10.31-18.328 4.746-4.909 10.638-8.59 17.511-11.045 6.955-2.455 14.565-3.682 22.912-3.682 5.809 0 11.537.654 17.265 2.045s10.965 3.6 15.711 6.71c4.746 3.109 8.51 7.282 11.455 12.6 2.864 5.318 4.337 11.946 4.337 19.883v80.184h-27.166v-16.446h-.9c-1.719 3.355-4.092 6.464-7.201 9.328-3.109 2.864-6.955 5.237-11.619 6.955-4.828 1.718-10.229 2.536-16.529 2.536Zm7.364-20.701c5.646 0 10.556-1.145 14.729-3.354 4.173-2.291 7.364-5.237 9.655-9.001 2.292-3.763 3.355-7.854 3.355-12.273v-14.155c-.9.737-2.373 1.391-4.5 2.046-2.128.654-4.419 1.145-7.037 1.636-2.619.491-5.155.9-7.692 1.227-2.537.328-4.746.655-6.628.901-4.173.572-8.019 1.472-11.292 2.781-3.355 1.31-5.973 3.11-7.855 5.401-1.964 2.291-2.864 5.318-2.864 8.918 0 5.237 1.882 9.164 5.728 11.782 3.682 2.782 8.51 4.091 14.401 4.091Zm64.643 18.328V71.839h27.412v19.965h1.227c2.21-6.955 5.974-12.274 11.292-16.038 5.319-3.763 11.456-5.645 18.329-5.645 1.555 0 3.355.082 5.237.163 1.964.164 3.601.328 4.91.573v25.938c-1.227-.41-3.109-.819-5.646-1.146a58.814 58.814 0 0 0-7.446-.49c-5.155 0-9.738 1.145-13.829 3.354-4.091 2.209-7.282 5.236-9.655 9.164-2.373 3.927-3.519 8.427-3.519 13.5v70.448h-28.312ZM222.077 39.192l-8.019 125.923L137.387 0l84.69 39.192Zm-53.105 162.825-57.933 33.056-57.934-33.056 11.783-28.556h92.301l11.783 28.556ZM111.039 62.675l30.357 73.803H80.681l30.358-73.803ZM7.937 165.115 0 39.192 84.69 0 7.937 165.115Z"
|
||||
/>
|
||||
</g>
|
||||
<defs>
|
||||
<radialGradient
|
||||
id="c"
|
||||
cx="0"
|
||||
cy="0"
|
||||
r="1"
|
||||
gradientTransform="rotate(118.122 171.182 60.81) scale(205.794)"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
>
|
||||
<stop stop-color="#FF41F8" />
|
||||
<stop offset=".707" stop-color="#FF41F8" stop-opacity=".5" />
|
||||
<stop offset="1" stop-color="#FF41F8" stop-opacity="0" />
|
||||
</radialGradient>
|
||||
<linearGradient
|
||||
id="b"
|
||||
x1="0"
|
||||
x2="982"
|
||||
y1="192"
|
||||
y2="192"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
>
|
||||
<stop stop-color="#F0060B" />
|
||||
<stop offset="0" stop-color="#F0070C" />
|
||||
<stop offset=".526" stop-color="#CC26D5" />
|
||||
<stop offset="1" stop-color="#7702FF" />
|
||||
</linearGradient>
|
||||
<clipPath id="a"><path fill="#fff" d="M0 0h982v239H0z" /></clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
<h1>Hello, {{ title }}</h1>
|
||||
<p>Congratulations! Your app is running. 🎉</p>
|
||||
</div>
|
||||
<div class="divider" role="separator" aria-label="Divider"></div>
|
||||
<div class="right-side">
|
||||
<div class="pill-group">
|
||||
@for (item of [
|
||||
{ title: 'Explore the Docs', link: 'https://angular.dev' },
|
||||
{ title: 'Learn with Tutorials', link: 'https://angular.dev/tutorials' },
|
||||
{ title: 'CLI Docs', link: 'https://angular.dev/tools/cli' },
|
||||
{ title: 'Angular Language Service', link: 'https://angular.dev/tools/language-service' },
|
||||
{ title: 'Angular DevTools', link: 'https://angular.dev/tools/devtools' },
|
||||
]; track item.title) {
|
||||
<a
|
||||
class="pill"
|
||||
[href]="item.link"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
>
|
||||
<span>{{ item.title }}</span>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
height="14"
|
||||
viewBox="0 -960 960 960"
|
||||
width="14"
|
||||
fill="currentColor"
|
||||
>
|
||||
<path
|
||||
d="M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h280v80H200v560h560v-280h80v280q0 33-23.5 56.5T760-120H200Zm188-212-56-56 372-372H560v-80h280v280h-80v-144L388-332Z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
}
|
||||
</div>
|
||||
<div class="social-links">
|
||||
<a
|
||||
href="https://github.com/angular/angular"
|
||||
aria-label="Github"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
>
|
||||
<svg
|
||||
width="25"
|
||||
height="24"
|
||||
viewBox="0 0 25 24"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
alt="Github"
|
||||
>
|
||||
<path
|
||||
d="M12.3047 0C5.50634 0 0 5.50942 0 12.3047C0 17.7423 3.52529 22.3535 8.41332 23.9787C9.02856 24.0946 9.25414 23.7142 9.25414 23.3871C9.25414 23.0949 9.24389 22.3207 9.23876 21.2953C5.81601 22.0377 5.09414 19.6444 5.09414 19.6444C4.53427 18.2243 3.72524 17.8449 3.72524 17.8449C2.61064 17.082 3.81137 17.0973 3.81137 17.0973C5.04697 17.1835 5.69604 18.3647 5.69604 18.3647C6.79321 20.2463 8.57636 19.7029 9.27978 19.3881C9.39052 18.5924 9.70736 18.0499 10.0591 17.7423C7.32641 17.4347 4.45429 16.3765 4.45429 11.6618C4.45429 10.3185 4.9311 9.22133 5.72065 8.36C5.58222 8.04931 5.16694 6.79833 5.82831 5.10337C5.82831 5.10337 6.85883 4.77319 9.2121 6.36459C10.1965 6.09082 11.2424 5.95546 12.2883 5.94931C13.3342 5.95546 14.3801 6.09082 15.3644 6.36459C17.7023 4.77319 18.7328 5.10337 18.7328 5.10337C19.3942 6.79833 18.9789 8.04931 18.8559 8.36C19.6403 9.22133 20.1171 10.3185 20.1171 11.6618C20.1171 16.3888 17.2409 17.4296 14.5031 17.7321C14.9338 18.1012 15.3337 18.8559 15.3337 20.0084C15.3337 21.6552 15.3183 22.978 15.3183 23.3779C15.3183 23.7009 15.5336 24.0854 16.1642 23.9623C21.0871 22.3484 24.6094 17.7341 24.6094 12.3047C24.6094 5.50942 19.0999 0 12.3047 0Z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
<a
|
||||
href="https://twitter.com/angular"
|
||||
aria-label="Twitter"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
>
|
||||
<svg
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
alt="Twitter"
|
||||
>
|
||||
<path
|
||||
d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
<a
|
||||
href="https://www.youtube.com/channel/UCbn1OgGei-DV7aSRo_HaAiw"
|
||||
aria-label="Youtube"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
>
|
||||
<svg
|
||||
width="29"
|
||||
height="20"
|
||||
viewBox="0 0 29 20"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
alt="Youtube"
|
||||
>
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
d="M27.4896 1.52422C27.9301 1.96749 28.2463 2.51866 28.4068 3.12258C29.0004 5.35161 29.0004 10 29.0004 10C29.0004 10 29.0004 14.6484 28.4068 16.8774C28.2463 17.4813 27.9301 18.0325 27.4896 18.4758C27.0492 18.9191 26.5 19.2389 25.8972 19.4032C23.6778 20 14.8068 20 14.8068 20C14.8068 20 5.93586 20 3.71651 19.4032C3.11363 19.2389 2.56449 18.9191 2.12405 18.4758C1.68361 18.0325 1.36732 17.4813 1.20683 16.8774C0.613281 14.6484 0.613281 10 0.613281 10C0.613281 10 0.613281 5.35161 1.20683 3.12258C1.36732 2.51866 1.68361 1.96749 2.12405 1.52422C2.56449 1.08095 3.11363 0.76113 3.71651 0.596774C5.93586 0 14.8068 0 14.8068 0C14.8068 0 23.6778 0 25.8972 0.596774C26.5 0.76113 27.0492 1.08095 27.4896 1.52422ZM19.3229 10L11.9036 5.77905V14.221L19.3229 10Z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->
|
||||
<!-- * * * * * * * * * * * The content above * * * * * * * * * * * * -->
|
||||
<!-- * * * * * * * * * * is only a placeholder * * * * * * * * * * * -->
|
||||
<!-- * * * * * * * * * * and can be replaced. * * * * * * * * * * * -->
|
||||
<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->
|
||||
<!-- * * * * * * * * * * End of Placeholder * * * * * * * * * * * * -->
|
||||
<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->
|
||||
|
||||
|
||||
<router-outlet></router-outlet>
|
||||
29
internal/frontend/holos/src/app/app.component.spec.ts
Normal file
29
internal/frontend/holos/src/app/app.component.spec.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { AppComponent } from './app.component';
|
||||
|
||||
describe('AppComponent', () => {
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [AppComponent],
|
||||
}).compileComponents();
|
||||
});
|
||||
|
||||
it('should create the app', () => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
const app = fixture.componentInstance;
|
||||
expect(app).toBeTruthy();
|
||||
});
|
||||
|
||||
it(`should have the 'holos' title`, () => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
const app = fixture.componentInstance;
|
||||
expect(app.title).toEqual('holos');
|
||||
});
|
||||
|
||||
it('should render title', () => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
fixture.detectChanges();
|
||||
const compiled = fixture.nativeElement as HTMLElement;
|
||||
expect(compiled.querySelector('h1')?.textContent).toContain('Hello, holos');
|
||||
});
|
||||
});
|
||||
14
internal/frontend/holos/src/app/app.component.ts
Normal file
14
internal/frontend/holos/src/app/app.component.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { RouterOutlet } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
standalone: true,
|
||||
imports: [CommonModule, RouterOutlet],
|
||||
templateUrl: './app.component.html',
|
||||
styleUrl: './app.component.css'
|
||||
})
|
||||
export class AppComponent {
|
||||
title = 'holos';
|
||||
}
|
||||
11
internal/frontend/holos/src/app/app.config.server.ts
Normal file
11
internal/frontend/holos/src/app/app.config.server.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { mergeApplicationConfig, ApplicationConfig } from '@angular/core';
|
||||
import { provideServerRendering } from '@angular/platform-server';
|
||||
import { appConfig } from './app.config';
|
||||
|
||||
const serverConfig: ApplicationConfig = {
|
||||
providers: [
|
||||
provideServerRendering()
|
||||
]
|
||||
};
|
||||
|
||||
export const config = mergeApplicationConfig(appConfig, serverConfig);
|
||||
9
internal/frontend/holos/src/app/app.config.ts
Normal file
9
internal/frontend/holos/src/app/app.config.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { ApplicationConfig } from '@angular/core';
|
||||
import { provideRouter } from '@angular/router';
|
||||
|
||||
import { routes } from './app.routes';
|
||||
import { provideClientHydration } from '@angular/platform-browser';
|
||||
|
||||
export const appConfig: ApplicationConfig = {
|
||||
providers: [provideRouter(routes), provideClientHydration()]
|
||||
};
|
||||
3
internal/frontend/holos/src/app/app.routes.ts
Normal file
3
internal/frontend/holos/src/app/app.routes.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
import { Routes } from '@angular/router';
|
||||
|
||||
export const routes: Routes = [];
|
||||
0
internal/frontend/holos/src/assets/.gitkeep
Normal file
0
internal/frontend/holos/src/assets/.gitkeep
Normal file
BIN
internal/frontend/holos/src/favicon.ico
Normal file
BIN
internal/frontend/holos/src/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
13
internal/frontend/holos/src/index.html
Normal file
13
internal/frontend/holos/src/index.html
Normal file
@@ -0,0 +1,13 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Holos</title>
|
||||
<base href="/">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
||||
</head>
|
||||
<body>
|
||||
<app-root></app-root>
|
||||
</body>
|
||||
</html>
|
||||
7
internal/frontend/holos/src/main.server.ts
Normal file
7
internal/frontend/holos/src/main.server.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { bootstrapApplication } from '@angular/platform-browser';
|
||||
import { AppComponent } from './app/app.component';
|
||||
import { config } from './app/app.config.server';
|
||||
|
||||
const bootstrap = () => bootstrapApplication(AppComponent, config);
|
||||
|
||||
export default bootstrap;
|
||||
6
internal/frontend/holos/src/main.ts
Normal file
6
internal/frontend/holos/src/main.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import { bootstrapApplication } from '@angular/platform-browser';
|
||||
import { appConfig } from './app/app.config';
|
||||
import { AppComponent } from './app/app.component';
|
||||
|
||||
bootstrapApplication(AppComponent, appConfig)
|
||||
.catch((err) => console.error(err));
|
||||
1
internal/frontend/holos/src/styles.css
Normal file
1
internal/frontend/holos/src/styles.css
Normal file
@@ -0,0 +1 @@
|
||||
/* You can add global styles to this file, and also import other style files */
|
||||
18
internal/frontend/holos/tsconfig.app.json
Normal file
18
internal/frontend/holos/tsconfig.app.json
Normal file
@@ -0,0 +1,18 @@
|
||||
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./out-tsc/app",
|
||||
"types": [
|
||||
"node"
|
||||
]
|
||||
},
|
||||
"files": [
|
||||
"src/main.ts",
|
||||
"src/main.server.ts",
|
||||
"server.ts"
|
||||
],
|
||||
"include": [
|
||||
"src/**/*.d.ts"
|
||||
]
|
||||
}
|
||||
33
internal/frontend/holos/tsconfig.json
Normal file
33
internal/frontend/holos/tsconfig.json
Normal file
@@ -0,0 +1,33 @@
|
||||
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
||||
{
|
||||
"compileOnSave": false,
|
||||
"compilerOptions": {
|
||||
"outDir": "./dist/out-tsc",
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"strict": true,
|
||||
"noImplicitOverride": true,
|
||||
"noPropertyAccessFromIndexSignature": true,
|
||||
"noImplicitReturns": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"skipLibCheck": true,
|
||||
"esModuleInterop": true,
|
||||
"sourceMap": true,
|
||||
"declaration": false,
|
||||
"experimentalDecorators": true,
|
||||
"moduleResolution": "node",
|
||||
"importHelpers": true,
|
||||
"target": "ES2022",
|
||||
"module": "ES2022",
|
||||
"useDefineForClassFields": false,
|
||||
"lib": [
|
||||
"ES2022",
|
||||
"dom"
|
||||
]
|
||||
},
|
||||
"angularCompilerOptions": {
|
||||
"enableI18nLegacyMessageIdFormat": false,
|
||||
"strictInjectionParameters": true,
|
||||
"strictInputAccessModifiers": true,
|
||||
"strictTemplates": true
|
||||
}
|
||||
}
|
||||
14
internal/frontend/holos/tsconfig.spec.json
Normal file
14
internal/frontend/holos/tsconfig.spec.json
Normal file
@@ -0,0 +1,14 @@
|
||||
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./out-tsc/spec",
|
||||
"types": [
|
||||
"jasmine"
|
||||
]
|
||||
},
|
||||
"include": [
|
||||
"src/**/*.spec.ts",
|
||||
"src/**/*.d.ts"
|
||||
]
|
||||
}
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"time"
|
||||
|
||||
"entgo.io/ent/dialect"
|
||||
"github.com/holos-run/holos/internal/server/ent"
|
||||
"github.com/holos-run/holos/internal/ent"
|
||||
"github.com/holos-run/holos/pkg/errors"
|
||||
"github.com/holos-run/holos/pkg/holos"
|
||||
)
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
|
||||
"entgo.io/ent/dialect"
|
||||
entsql "entgo.io/ent/dialect/sql"
|
||||
"github.com/holos-run/holos/internal/server/ent"
|
||||
"github.com/holos-run/holos/internal/ent"
|
||||
"github.com/holos-run/holos/pkg/errors"
|
||||
"github.com/holos-run/holos/pkg/holos"
|
||||
_ "github.com/jackc/pgx/v5/stdlib"
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"log/slog"
|
||||
|
||||
esql "entgo.io/ent/dialect/sql"
|
||||
"github.com/holos-run/holos/internal/server/ent"
|
||||
"github.com/holos-run/holos/internal/ent"
|
||||
"github.com/holos-run/holos/pkg/errors"
|
||||
"github.com/holos-run/holos/pkg/holos"
|
||||
"modernc.org/sqlite"
|
||||
|
||||
@@ -22,6 +22,8 @@ func TestMemoryClientFactory(t *testing.T) {
|
||||
t.Run("CreateUser", func(t *testing.T) {
|
||||
uc := client.User.Create().
|
||||
SetName("Foo").
|
||||
SetIss("https://login.example.com").
|
||||
SetSub("1234567890").
|
||||
SetEmail("foo@example.com")
|
||||
_, err := uc.Save(context.Background())
|
||||
assert.NoError(t, err)
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package migrate
|
||||
|
||||
import (
|
||||
"entgo.io/ent/dialect/sql/schema"
|
||||
"entgo.io/ent/schema/field"
|
||||
)
|
||||
|
||||
var (
|
||||
// UsersColumns holds the columns for the "users" table.
|
||||
UsersColumns = []*schema.Column{
|
||||
{Name: "id", Type: field.TypeUUID},
|
||||
{Name: "created_at", Type: field.TypeTime},
|
||||
{Name: "updated_at", Type: field.TypeTime},
|
||||
{Name: "email", Type: field.TypeString, Unique: true},
|
||||
{Name: "email_verified", Type: field.TypeBool, Default: false},
|
||||
{Name: "name", Type: field.TypeString},
|
||||
}
|
||||
// UsersTable holds the schema information for the "users" table.
|
||||
UsersTable = &schema.Table{
|
||||
Name: "users",
|
||||
Columns: UsersColumns,
|
||||
PrimaryKey: []*schema.Column{UsersColumns[0]},
|
||||
}
|
||||
// UserIdentitiesColumns holds the columns for the "user_identities" table.
|
||||
UserIdentitiesColumns = []*schema.Column{
|
||||
{Name: "id", Type: field.TypeUUID},
|
||||
{Name: "created_at", Type: field.TypeTime},
|
||||
{Name: "updated_at", Type: field.TypeTime},
|
||||
{Name: "iss", Type: field.TypeString},
|
||||
{Name: "sub", Type: field.TypeString},
|
||||
{Name: "email", Type: field.TypeString},
|
||||
{Name: "email_verified", Type: field.TypeBool, Default: false},
|
||||
{Name: "name", Type: field.TypeString, Nullable: true},
|
||||
{Name: "user_id", Type: field.TypeUUID},
|
||||
}
|
||||
// UserIdentitiesTable holds the schema information for the "user_identities" table.
|
||||
UserIdentitiesTable = &schema.Table{
|
||||
Name: "user_identities",
|
||||
Columns: UserIdentitiesColumns,
|
||||
PrimaryKey: []*schema.Column{UserIdentitiesColumns[0]},
|
||||
ForeignKeys: []*schema.ForeignKey{
|
||||
{
|
||||
Symbol: "user_identities_users_identities",
|
||||
Columns: []*schema.Column{UserIdentitiesColumns[8]},
|
||||
RefColumns: []*schema.Column{UsersColumns[0]},
|
||||
OnDelete: schema.Cascade,
|
||||
},
|
||||
},
|
||||
Indexes: []*schema.Index{
|
||||
{
|
||||
Name: "useridentity_iss_sub",
|
||||
Unique: true,
|
||||
Columns: []*schema.Column{UserIdentitiesColumns[3], UserIdentitiesColumns[4]},
|
||||
},
|
||||
},
|
||||
}
|
||||
// Tables holds all the tables in the schema.
|
||||
Tables = []*schema.Table{
|
||||
UsersTable,
|
||||
UserIdentitiesTable,
|
||||
}
|
||||
)
|
||||
|
||||
func init() {
|
||||
UserIdentitiesTable.ForeignKeys[0].RefTable = UsersTable
|
||||
}
|
||||
@@ -1,84 +0,0 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package ent
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/gofrs/uuid"
|
||||
"github.com/holos-run/holos/internal/server/ent/schema"
|
||||
"github.com/holos-run/holos/internal/server/ent/user"
|
||||
"github.com/holos-run/holos/internal/server/ent/useridentity"
|
||||
)
|
||||
|
||||
// The init function reads all schema descriptors with runtime code
|
||||
// (default values, validators, hooks and policies) and stitches it
|
||||
// to their package variables.
|
||||
func init() {
|
||||
userMixin := schema.User{}.Mixin()
|
||||
userMixinFields0 := userMixin[0].Fields()
|
||||
_ = userMixinFields0
|
||||
userMixinFields1 := userMixin[1].Fields()
|
||||
_ = userMixinFields1
|
||||
userFields := schema.User{}.Fields()
|
||||
_ = userFields
|
||||
// userDescCreatedAt is the schema descriptor for created_at field.
|
||||
userDescCreatedAt := userMixinFields1[0].Descriptor()
|
||||
// user.DefaultCreatedAt holds the default value on creation for the created_at field.
|
||||
user.DefaultCreatedAt = userDescCreatedAt.Default.(func() time.Time)
|
||||
// userDescUpdatedAt is the schema descriptor for updated_at field.
|
||||
userDescUpdatedAt := userMixinFields1[1].Descriptor()
|
||||
// user.DefaultUpdatedAt holds the default value on creation for the updated_at field.
|
||||
user.DefaultUpdatedAt = userDescUpdatedAt.Default.(func() time.Time)
|
||||
// user.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
|
||||
user.UpdateDefaultUpdatedAt = userDescUpdatedAt.UpdateDefault.(func() time.Time)
|
||||
// userDescEmail is the schema descriptor for email field.
|
||||
userDescEmail := userFields[0].Descriptor()
|
||||
// user.EmailValidator is a validator for the "email" field. It is called by the builders before save.
|
||||
user.EmailValidator = userDescEmail.Validators[0].(func(string) error)
|
||||
// userDescEmailVerified is the schema descriptor for email_verified field.
|
||||
userDescEmailVerified := userFields[1].Descriptor()
|
||||
// user.DefaultEmailVerified holds the default value on creation for the email_verified field.
|
||||
user.DefaultEmailVerified = userDescEmailVerified.Default.(bool)
|
||||
// userDescID is the schema descriptor for id field.
|
||||
userDescID := userMixinFields0[0].Descriptor()
|
||||
// user.DefaultID holds the default value on creation for the id field.
|
||||
user.DefaultID = userDescID.Default.(func() uuid.UUID)
|
||||
useridentityMixin := schema.UserIdentity{}.Mixin()
|
||||
useridentityMixinFields0 := useridentityMixin[0].Fields()
|
||||
_ = useridentityMixinFields0
|
||||
useridentityMixinFields1 := useridentityMixin[1].Fields()
|
||||
_ = useridentityMixinFields1
|
||||
useridentityFields := schema.UserIdentity{}.Fields()
|
||||
_ = useridentityFields
|
||||
// useridentityDescCreatedAt is the schema descriptor for created_at field.
|
||||
useridentityDescCreatedAt := useridentityMixinFields1[0].Descriptor()
|
||||
// useridentity.DefaultCreatedAt holds the default value on creation for the created_at field.
|
||||
useridentity.DefaultCreatedAt = useridentityDescCreatedAt.Default.(func() time.Time)
|
||||
// useridentityDescUpdatedAt is the schema descriptor for updated_at field.
|
||||
useridentityDescUpdatedAt := useridentityMixinFields1[1].Descriptor()
|
||||
// useridentity.DefaultUpdatedAt holds the default value on creation for the updated_at field.
|
||||
useridentity.DefaultUpdatedAt = useridentityDescUpdatedAt.Default.(func() time.Time)
|
||||
// useridentity.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
|
||||
useridentity.UpdateDefaultUpdatedAt = useridentityDescUpdatedAt.UpdateDefault.(func() time.Time)
|
||||
// useridentityDescIss is the schema descriptor for iss field.
|
||||
useridentityDescIss := useridentityFields[0].Descriptor()
|
||||
// useridentity.IssValidator is a validator for the "iss" field. It is called by the builders before save.
|
||||
useridentity.IssValidator = useridentityDescIss.Validators[0].(func(string) error)
|
||||
// useridentityDescSub is the schema descriptor for sub field.
|
||||
useridentityDescSub := useridentityFields[1].Descriptor()
|
||||
// useridentity.SubValidator is a validator for the "sub" field. It is called by the builders before save.
|
||||
useridentity.SubValidator = useridentityDescSub.Validators[0].(func(string) error)
|
||||
// useridentityDescEmail is the schema descriptor for email field.
|
||||
useridentityDescEmail := useridentityFields[2].Descriptor()
|
||||
// useridentity.EmailValidator is a validator for the "email" field. It is called by the builders before save.
|
||||
useridentity.EmailValidator = useridentityDescEmail.Validators[0].(func(string) error)
|
||||
// useridentityDescEmailVerified is the schema descriptor for email_verified field.
|
||||
useridentityDescEmailVerified := useridentityFields[3].Descriptor()
|
||||
// useridentity.DefaultEmailVerified holds the default value on creation for the email_verified field.
|
||||
useridentity.DefaultEmailVerified = useridentityDescEmailVerified.Default.(bool)
|
||||
// useridentityDescID is the schema descriptor for id field.
|
||||
useridentityDescID := useridentityMixinFields0[0].Descriptor()
|
||||
// useridentity.DefaultID holds the default value on creation for the id field.
|
||||
useridentity.DefaultID = useridentityDescID.Default.(func() uuid.UUID)
|
||||
}
|
||||
@@ -1,89 +0,0 @@
|
||||
package schema
|
||||
|
||||
import (
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/dialect/entsql"
|
||||
"entgo.io/ent/schema/edge"
|
||||
"entgo.io/ent/schema/field"
|
||||
"entgo.io/ent/schema/index"
|
||||
)
|
||||
|
||||
// User holds the schema definition for the User entity, the internal
|
||||
// representation and identity of a single human user. Users are scoped
|
||||
// globally.
|
||||
type User struct {
|
||||
ent.Schema
|
||||
}
|
||||
|
||||
func (User) Mixin() []ent.Mixin {
|
||||
return []ent.Mixin{
|
||||
BaseMixin{},
|
||||
TimeMixin{},
|
||||
}
|
||||
}
|
||||
|
||||
// Fields of the User.
|
||||
func (User) Fields() []ent.Field {
|
||||
return []ent.Field{
|
||||
field.String("email").NotEmpty().Unique(),
|
||||
field.Bool("email_verified").Default(false),
|
||||
field.String("name"),
|
||||
}
|
||||
}
|
||||
|
||||
// Edges of the User.
|
||||
func (User) Edges() []ent.Edge {
|
||||
return []ent.Edge{
|
||||
edge.To("identities", UserIdentity.Type).
|
||||
StorageKey(edge.Column("user_id")).
|
||||
Annotations(entsql.OnDelete(entsql.Cascade)),
|
||||
}
|
||||
}
|
||||
|
||||
// UserIdentity holds the schema definition for the UserIdentity entity, a
|
||||
// representation of an identity from an oidc provider typically implemented as
|
||||
// an oidc id token.
|
||||
type UserIdentity struct {
|
||||
ent.Schema
|
||||
}
|
||||
|
||||
func (UserIdentity) Mixin() []ent.Mixin {
|
||||
return []ent.Mixin{
|
||||
BaseMixin{},
|
||||
TimeMixin{},
|
||||
}
|
||||
}
|
||||
|
||||
// Fields of the UserIdentity. Assumes an oidc id token is available for the user with
|
||||
// the openid scope `iss`, `aud`, `exp`, `iat`, and `at_hash` claims. Assumes
|
||||
// the profile scope as well, with claims family_name, given_name, middle_name,
|
||||
// nickname, picture, and updated_at. Claims are defined by the [standard
|
||||
// claims][1].
|
||||
//
|
||||
// [1]: https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims
|
||||
func (UserIdentity) Fields() []ent.Field {
|
||||
return []ent.Field{
|
||||
field.String("iss").NotEmpty(),
|
||||
field.String("sub").NotEmpty(),
|
||||
field.String("email").NotEmpty(),
|
||||
field.Bool("email_verified").Default(false),
|
||||
field.String("name").Optional().Nillable(),
|
||||
}
|
||||
}
|
||||
|
||||
func (UserIdentity) Indexes() []ent.Index {
|
||||
return []ent.Index{
|
||||
index.Fields("iss", "sub").Unique(),
|
||||
}
|
||||
}
|
||||
|
||||
// Edges of the UserIdentity.
|
||||
func (UserIdentity) Edges() []ent.Edge {
|
||||
return []ent.Edge{
|
||||
edge.From("user", User.Type).
|
||||
Ref("identities").
|
||||
Required().
|
||||
Immutable().
|
||||
Unique(),
|
||||
}
|
||||
}
|
||||
@@ -1,217 +0,0 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package ent
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"github.com/gofrs/uuid"
|
||||
"github.com/holos-run/holos/internal/server/ent/user"
|
||||
"github.com/holos-run/holos/internal/server/ent/useridentity"
|
||||
)
|
||||
|
||||
// UserIdentity is the model entity for the UserIdentity schema.
|
||||
type UserIdentity struct {
|
||||
config `json:"-"`
|
||||
// ID of the ent.
|
||||
ID uuid.UUID `json:"id,omitempty"`
|
||||
// CreatedAt holds the value of the "created_at" field.
|
||||
CreatedAt time.Time `json:"created_at,omitempty"`
|
||||
// UpdatedAt holds the value of the "updated_at" field.
|
||||
UpdatedAt time.Time `json:"updated_at,omitempty"`
|
||||
// Iss holds the value of the "iss" field.
|
||||
Iss string `json:"iss,omitempty"`
|
||||
// Sub holds the value of the "sub" field.
|
||||
Sub string `json:"sub,omitempty"`
|
||||
// Email holds the value of the "email" field.
|
||||
Email string `json:"email,omitempty"`
|
||||
// EmailVerified holds the value of the "email_verified" field.
|
||||
EmailVerified bool `json:"email_verified,omitempty"`
|
||||
// Name holds the value of the "name" field.
|
||||
Name *string `json:"name,omitempty"`
|
||||
// Edges holds the relations/edges for other nodes in the graph.
|
||||
// The values are being populated by the UserIdentityQuery when eager-loading is set.
|
||||
Edges UserIdentityEdges `json:"edges"`
|
||||
user_id *uuid.UUID
|
||||
selectValues sql.SelectValues
|
||||
}
|
||||
|
||||
// UserIdentityEdges holds the relations/edges for other nodes in the graph.
|
||||
type UserIdentityEdges struct {
|
||||
// User holds the value of the user edge.
|
||||
User *User `json:"user,omitempty"`
|
||||
// loadedTypes holds the information for reporting if a
|
||||
// type was loaded (or requested) in eager-loading or not.
|
||||
loadedTypes [1]bool
|
||||
}
|
||||
|
||||
// UserOrErr returns the User value or an error if the edge
|
||||
// was not loaded in eager-loading, or loaded but was not found.
|
||||
func (e UserIdentityEdges) UserOrErr() (*User, error) {
|
||||
if e.User != nil {
|
||||
return e.User, nil
|
||||
} else if e.loadedTypes[0] {
|
||||
return nil, &NotFoundError{label: user.Label}
|
||||
}
|
||||
return nil, &NotLoadedError{edge: "user"}
|
||||
}
|
||||
|
||||
// scanValues returns the types for scanning values from sql.Rows.
|
||||
func (*UserIdentity) scanValues(columns []string) ([]any, error) {
|
||||
values := make([]any, len(columns))
|
||||
for i := range columns {
|
||||
switch columns[i] {
|
||||
case useridentity.FieldEmailVerified:
|
||||
values[i] = new(sql.NullBool)
|
||||
case useridentity.FieldIss, useridentity.FieldSub, useridentity.FieldEmail, useridentity.FieldName:
|
||||
values[i] = new(sql.NullString)
|
||||
case useridentity.FieldCreatedAt, useridentity.FieldUpdatedAt:
|
||||
values[i] = new(sql.NullTime)
|
||||
case useridentity.FieldID:
|
||||
values[i] = new(uuid.UUID)
|
||||
case useridentity.ForeignKeys[0]: // user_id
|
||||
values[i] = &sql.NullScanner{S: new(uuid.UUID)}
|
||||
default:
|
||||
values[i] = new(sql.UnknownType)
|
||||
}
|
||||
}
|
||||
return values, nil
|
||||
}
|
||||
|
||||
// assignValues assigns the values that were returned from sql.Rows (after scanning)
|
||||
// to the UserIdentity fields.
|
||||
func (ui *UserIdentity) assignValues(columns []string, values []any) error {
|
||||
if m, n := len(values), len(columns); m < n {
|
||||
return fmt.Errorf("mismatch number of scan values: %d != %d", m, n)
|
||||
}
|
||||
for i := range columns {
|
||||
switch columns[i] {
|
||||
case useridentity.FieldID:
|
||||
if value, ok := values[i].(*uuid.UUID); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field id", values[i])
|
||||
} else if value != nil {
|
||||
ui.ID = *value
|
||||
}
|
||||
case useridentity.FieldCreatedAt:
|
||||
if value, ok := values[i].(*sql.NullTime); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field created_at", values[i])
|
||||
} else if value.Valid {
|
||||
ui.CreatedAt = value.Time
|
||||
}
|
||||
case useridentity.FieldUpdatedAt:
|
||||
if value, ok := values[i].(*sql.NullTime); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field updated_at", values[i])
|
||||
} else if value.Valid {
|
||||
ui.UpdatedAt = value.Time
|
||||
}
|
||||
case useridentity.FieldIss:
|
||||
if value, ok := values[i].(*sql.NullString); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field iss", values[i])
|
||||
} else if value.Valid {
|
||||
ui.Iss = value.String
|
||||
}
|
||||
case useridentity.FieldSub:
|
||||
if value, ok := values[i].(*sql.NullString); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field sub", values[i])
|
||||
} else if value.Valid {
|
||||
ui.Sub = value.String
|
||||
}
|
||||
case useridentity.FieldEmail:
|
||||
if value, ok := values[i].(*sql.NullString); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field email", values[i])
|
||||
} else if value.Valid {
|
||||
ui.Email = value.String
|
||||
}
|
||||
case useridentity.FieldEmailVerified:
|
||||
if value, ok := values[i].(*sql.NullBool); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field email_verified", values[i])
|
||||
} else if value.Valid {
|
||||
ui.EmailVerified = value.Bool
|
||||
}
|
||||
case useridentity.FieldName:
|
||||
if value, ok := values[i].(*sql.NullString); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field name", values[i])
|
||||
} else if value.Valid {
|
||||
ui.Name = new(string)
|
||||
*ui.Name = value.String
|
||||
}
|
||||
case useridentity.ForeignKeys[0]:
|
||||
if value, ok := values[i].(*sql.NullScanner); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field user_id", values[i])
|
||||
} else if value.Valid {
|
||||
ui.user_id = new(uuid.UUID)
|
||||
*ui.user_id = *value.S.(*uuid.UUID)
|
||||
}
|
||||
default:
|
||||
ui.selectValues.Set(columns[i], values[i])
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Value returns the ent.Value that was dynamically selected and assigned to the UserIdentity.
|
||||
// This includes values selected through modifiers, order, etc.
|
||||
func (ui *UserIdentity) Value(name string) (ent.Value, error) {
|
||||
return ui.selectValues.Get(name)
|
||||
}
|
||||
|
||||
// QueryUser queries the "user" edge of the UserIdentity entity.
|
||||
func (ui *UserIdentity) QueryUser() *UserQuery {
|
||||
return NewUserIdentityClient(ui.config).QueryUser(ui)
|
||||
}
|
||||
|
||||
// Update returns a builder for updating this UserIdentity.
|
||||
// Note that you need to call UserIdentity.Unwrap() before calling this method if this UserIdentity
|
||||
// was returned from a transaction, and the transaction was committed or rolled back.
|
||||
func (ui *UserIdentity) Update() *UserIdentityUpdateOne {
|
||||
return NewUserIdentityClient(ui.config).UpdateOne(ui)
|
||||
}
|
||||
|
||||
// Unwrap unwraps the UserIdentity entity that was returned from a transaction after it was closed,
|
||||
// so that all future queries will be executed through the driver which created the transaction.
|
||||
func (ui *UserIdentity) Unwrap() *UserIdentity {
|
||||
_tx, ok := ui.config.driver.(*txDriver)
|
||||
if !ok {
|
||||
panic("ent: UserIdentity is not a transactional entity")
|
||||
}
|
||||
ui.config.driver = _tx.drv
|
||||
return ui
|
||||
}
|
||||
|
||||
// String implements the fmt.Stringer.
|
||||
func (ui *UserIdentity) String() string {
|
||||
var builder strings.Builder
|
||||
builder.WriteString("UserIdentity(")
|
||||
builder.WriteString(fmt.Sprintf("id=%v, ", ui.ID))
|
||||
builder.WriteString("created_at=")
|
||||
builder.WriteString(ui.CreatedAt.Format(time.ANSIC))
|
||||
builder.WriteString(", ")
|
||||
builder.WriteString("updated_at=")
|
||||
builder.WriteString(ui.UpdatedAt.Format(time.ANSIC))
|
||||
builder.WriteString(", ")
|
||||
builder.WriteString("iss=")
|
||||
builder.WriteString(ui.Iss)
|
||||
builder.WriteString(", ")
|
||||
builder.WriteString("sub=")
|
||||
builder.WriteString(ui.Sub)
|
||||
builder.WriteString(", ")
|
||||
builder.WriteString("email=")
|
||||
builder.WriteString(ui.Email)
|
||||
builder.WriteString(", ")
|
||||
builder.WriteString("email_verified=")
|
||||
builder.WriteString(fmt.Sprintf("%v", ui.EmailVerified))
|
||||
builder.WriteString(", ")
|
||||
if v := ui.Name; v != nil {
|
||||
builder.WriteString("name=")
|
||||
builder.WriteString(*v)
|
||||
}
|
||||
builder.WriteByte(')')
|
||||
return builder.String()
|
||||
}
|
||||
|
||||
// UserIdentities is a parsable slice of UserIdentity.
|
||||
type UserIdentities []*UserIdentity
|
||||
@@ -1,152 +0,0 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package useridentity
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"github.com/gofrs/uuid"
|
||||
)
|
||||
|
||||
const (
|
||||
// Label holds the string label denoting the useridentity type in the database.
|
||||
Label = "user_identity"
|
||||
// FieldID holds the string denoting the id field in the database.
|
||||
FieldID = "id"
|
||||
// FieldCreatedAt holds the string denoting the created_at field in the database.
|
||||
FieldCreatedAt = "created_at"
|
||||
// FieldUpdatedAt holds the string denoting the updated_at field in the database.
|
||||
FieldUpdatedAt = "updated_at"
|
||||
// FieldIss holds the string denoting the iss field in the database.
|
||||
FieldIss = "iss"
|
||||
// FieldSub holds the string denoting the sub field in the database.
|
||||
FieldSub = "sub"
|
||||
// FieldEmail holds the string denoting the email field in the database.
|
||||
FieldEmail = "email"
|
||||
// FieldEmailVerified holds the string denoting the email_verified field in the database.
|
||||
FieldEmailVerified = "email_verified"
|
||||
// FieldName holds the string denoting the name field in the database.
|
||||
FieldName = "name"
|
||||
// EdgeUser holds the string denoting the user edge name in mutations.
|
||||
EdgeUser = "user"
|
||||
// Table holds the table name of the useridentity in the database.
|
||||
Table = "user_identities"
|
||||
// UserTable is the table that holds the user relation/edge.
|
||||
UserTable = "user_identities"
|
||||
// UserInverseTable is the table name for the User entity.
|
||||
// It exists in this package in order to avoid circular dependency with the "user" package.
|
||||
UserInverseTable = "users"
|
||||
// UserColumn is the table column denoting the user relation/edge.
|
||||
UserColumn = "user_id"
|
||||
)
|
||||
|
||||
// Columns holds all SQL columns for useridentity fields.
|
||||
var Columns = []string{
|
||||
FieldID,
|
||||
FieldCreatedAt,
|
||||
FieldUpdatedAt,
|
||||
FieldIss,
|
||||
FieldSub,
|
||||
FieldEmail,
|
||||
FieldEmailVerified,
|
||||
FieldName,
|
||||
}
|
||||
|
||||
// ForeignKeys holds the SQL foreign-keys that are owned by the "user_identities"
|
||||
// table and are not defined as standalone fields in the schema.
|
||||
var ForeignKeys = []string{
|
||||
"user_id",
|
||||
}
|
||||
|
||||
// ValidColumn reports if the column name is valid (part of the table columns).
|
||||
func ValidColumn(column string) bool {
|
||||
for i := range Columns {
|
||||
if column == Columns[i] {
|
||||
return true
|
||||
}
|
||||
}
|
||||
for i := range ForeignKeys {
|
||||
if column == ForeignKeys[i] {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
var (
|
||||
// DefaultCreatedAt holds the default value on creation for the "created_at" field.
|
||||
DefaultCreatedAt func() time.Time
|
||||
// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
|
||||
DefaultUpdatedAt func() time.Time
|
||||
// UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
|
||||
UpdateDefaultUpdatedAt func() time.Time
|
||||
// IssValidator is a validator for the "iss" field. It is called by the builders before save.
|
||||
IssValidator func(string) error
|
||||
// SubValidator is a validator for the "sub" field. It is called by the builders before save.
|
||||
SubValidator func(string) error
|
||||
// EmailValidator is a validator for the "email" field. It is called by the builders before save.
|
||||
EmailValidator func(string) error
|
||||
// DefaultEmailVerified holds the default value on creation for the "email_verified" field.
|
||||
DefaultEmailVerified bool
|
||||
// DefaultID holds the default value on creation for the "id" field.
|
||||
DefaultID func() uuid.UUID
|
||||
)
|
||||
|
||||
// OrderOption defines the ordering options for the UserIdentity queries.
|
||||
type OrderOption func(*sql.Selector)
|
||||
|
||||
// ByID orders the results by the id field.
|
||||
func ByID(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldID, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCreatedAt orders the results by the created_at field.
|
||||
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByUpdatedAt orders the results by the updated_at field.
|
||||
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldUpdatedAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByIss orders the results by the iss field.
|
||||
func ByIss(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldIss, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// BySub orders the results by the sub field.
|
||||
func BySub(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldSub, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByEmail orders the results by the email field.
|
||||
func ByEmail(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldEmail, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByEmailVerified orders the results by the email_verified field.
|
||||
func ByEmailVerified(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldEmailVerified, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByName orders the results by the name field.
|
||||
func ByName(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldName, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByUserField orders the results by user field.
|
||||
func ByUserField(field string, opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newUserStep(), sql.OrderByField(field, opts...))
|
||||
}
|
||||
}
|
||||
func newUserStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(UserInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2O, true, UserTable, UserColumn),
|
||||
)
|
||||
}
|
||||
@@ -1,490 +0,0 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package useridentity
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"github.com/gofrs/uuid"
|
||||
"github.com/holos-run/holos/internal/server/ent/predicate"
|
||||
)
|
||||
|
||||
// ID filters vertices based on their ID field.
|
||||
func ID(id uuid.UUID) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDEQ applies the EQ predicate on the ID field.
|
||||
func IDEQ(id uuid.UUID) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDNEQ applies the NEQ predicate on the ID field.
|
||||
func IDNEQ(id uuid.UUID) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldNEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDIn applies the In predicate on the ID field.
|
||||
func IDIn(ids ...uuid.UUID) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDNotIn applies the NotIn predicate on the ID field.
|
||||
func IDNotIn(ids ...uuid.UUID) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldNotIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDGT applies the GT predicate on the ID field.
|
||||
func IDGT(id uuid.UUID) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldGT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDGTE applies the GTE predicate on the ID field.
|
||||
func IDGTE(id uuid.UUID) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldGTE(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLT applies the LT predicate on the ID field.
|
||||
func IDLT(id uuid.UUID) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldLT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLTE applies the LTE predicate on the ID field.
|
||||
func IDLTE(id uuid.UUID) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldLTE(FieldID, id))
|
||||
}
|
||||
|
||||
// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
|
||||
func CreatedAt(v time.Time) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
|
||||
func UpdatedAt(v time.Time) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldEQ(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// Iss applies equality check predicate on the "iss" field. It's identical to IssEQ.
|
||||
func Iss(v string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldEQ(FieldIss, v))
|
||||
}
|
||||
|
||||
// Sub applies equality check predicate on the "sub" field. It's identical to SubEQ.
|
||||
func Sub(v string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldEQ(FieldSub, v))
|
||||
}
|
||||
|
||||
// Email applies equality check predicate on the "email" field. It's identical to EmailEQ.
|
||||
func Email(v string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldEQ(FieldEmail, v))
|
||||
}
|
||||
|
||||
// EmailVerified applies equality check predicate on the "email_verified" field. It's identical to EmailVerifiedEQ.
|
||||
func EmailVerified(v bool) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldEQ(FieldEmailVerified, v))
|
||||
}
|
||||
|
||||
// Name applies equality check predicate on the "name" field. It's identical to NameEQ.
|
||||
func Name(v string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldEQ(FieldName, v))
|
||||
}
|
||||
|
||||
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
|
||||
func CreatedAtEQ(v time.Time) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
|
||||
func CreatedAtNEQ(v time.Time) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldNEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtIn applies the In predicate on the "created_at" field.
|
||||
func CreatedAtIn(vs ...time.Time) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldIn(FieldCreatedAt, vs...))
|
||||
}
|
||||
|
||||
// CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
|
||||
func CreatedAtNotIn(vs ...time.Time) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldNotIn(FieldCreatedAt, vs...))
|
||||
}
|
||||
|
||||
// CreatedAtGT applies the GT predicate on the "created_at" field.
|
||||
func CreatedAtGT(v time.Time) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldGT(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtGTE applies the GTE predicate on the "created_at" field.
|
||||
func CreatedAtGTE(v time.Time) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldGTE(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtLT applies the LT predicate on the "created_at" field.
|
||||
func CreatedAtLT(v time.Time) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldLT(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtLTE applies the LTE predicate on the "created_at" field.
|
||||
func CreatedAtLTE(v time.Time) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldLTE(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
|
||||
func UpdatedAtEQ(v time.Time) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldEQ(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
|
||||
func UpdatedAtNEQ(v time.Time) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldNEQ(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtIn applies the In predicate on the "updated_at" field.
|
||||
func UpdatedAtIn(vs ...time.Time) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldIn(FieldUpdatedAt, vs...))
|
||||
}
|
||||
|
||||
// UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
|
||||
func UpdatedAtNotIn(vs ...time.Time) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldNotIn(FieldUpdatedAt, vs...))
|
||||
}
|
||||
|
||||
// UpdatedAtGT applies the GT predicate on the "updated_at" field.
|
||||
func UpdatedAtGT(v time.Time) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldGT(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
|
||||
func UpdatedAtGTE(v time.Time) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldGTE(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtLT applies the LT predicate on the "updated_at" field.
|
||||
func UpdatedAtLT(v time.Time) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldLT(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
|
||||
func UpdatedAtLTE(v time.Time) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldLTE(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// IssEQ applies the EQ predicate on the "iss" field.
|
||||
func IssEQ(v string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldEQ(FieldIss, v))
|
||||
}
|
||||
|
||||
// IssNEQ applies the NEQ predicate on the "iss" field.
|
||||
func IssNEQ(v string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldNEQ(FieldIss, v))
|
||||
}
|
||||
|
||||
// IssIn applies the In predicate on the "iss" field.
|
||||
func IssIn(vs ...string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldIn(FieldIss, vs...))
|
||||
}
|
||||
|
||||
// IssNotIn applies the NotIn predicate on the "iss" field.
|
||||
func IssNotIn(vs ...string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldNotIn(FieldIss, vs...))
|
||||
}
|
||||
|
||||
// IssGT applies the GT predicate on the "iss" field.
|
||||
func IssGT(v string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldGT(FieldIss, v))
|
||||
}
|
||||
|
||||
// IssGTE applies the GTE predicate on the "iss" field.
|
||||
func IssGTE(v string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldGTE(FieldIss, v))
|
||||
}
|
||||
|
||||
// IssLT applies the LT predicate on the "iss" field.
|
||||
func IssLT(v string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldLT(FieldIss, v))
|
||||
}
|
||||
|
||||
// IssLTE applies the LTE predicate on the "iss" field.
|
||||
func IssLTE(v string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldLTE(FieldIss, v))
|
||||
}
|
||||
|
||||
// IssContains applies the Contains predicate on the "iss" field.
|
||||
func IssContains(v string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldContains(FieldIss, v))
|
||||
}
|
||||
|
||||
// IssHasPrefix applies the HasPrefix predicate on the "iss" field.
|
||||
func IssHasPrefix(v string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldHasPrefix(FieldIss, v))
|
||||
}
|
||||
|
||||
// IssHasSuffix applies the HasSuffix predicate on the "iss" field.
|
||||
func IssHasSuffix(v string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldHasSuffix(FieldIss, v))
|
||||
}
|
||||
|
||||
// IssEqualFold applies the EqualFold predicate on the "iss" field.
|
||||
func IssEqualFold(v string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldEqualFold(FieldIss, v))
|
||||
}
|
||||
|
||||
// IssContainsFold applies the ContainsFold predicate on the "iss" field.
|
||||
func IssContainsFold(v string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldContainsFold(FieldIss, v))
|
||||
}
|
||||
|
||||
// SubEQ applies the EQ predicate on the "sub" field.
|
||||
func SubEQ(v string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldEQ(FieldSub, v))
|
||||
}
|
||||
|
||||
// SubNEQ applies the NEQ predicate on the "sub" field.
|
||||
func SubNEQ(v string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldNEQ(FieldSub, v))
|
||||
}
|
||||
|
||||
// SubIn applies the In predicate on the "sub" field.
|
||||
func SubIn(vs ...string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldIn(FieldSub, vs...))
|
||||
}
|
||||
|
||||
// SubNotIn applies the NotIn predicate on the "sub" field.
|
||||
func SubNotIn(vs ...string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldNotIn(FieldSub, vs...))
|
||||
}
|
||||
|
||||
// SubGT applies the GT predicate on the "sub" field.
|
||||
func SubGT(v string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldGT(FieldSub, v))
|
||||
}
|
||||
|
||||
// SubGTE applies the GTE predicate on the "sub" field.
|
||||
func SubGTE(v string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldGTE(FieldSub, v))
|
||||
}
|
||||
|
||||
// SubLT applies the LT predicate on the "sub" field.
|
||||
func SubLT(v string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldLT(FieldSub, v))
|
||||
}
|
||||
|
||||
// SubLTE applies the LTE predicate on the "sub" field.
|
||||
func SubLTE(v string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldLTE(FieldSub, v))
|
||||
}
|
||||
|
||||
// SubContains applies the Contains predicate on the "sub" field.
|
||||
func SubContains(v string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldContains(FieldSub, v))
|
||||
}
|
||||
|
||||
// SubHasPrefix applies the HasPrefix predicate on the "sub" field.
|
||||
func SubHasPrefix(v string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldHasPrefix(FieldSub, v))
|
||||
}
|
||||
|
||||
// SubHasSuffix applies the HasSuffix predicate on the "sub" field.
|
||||
func SubHasSuffix(v string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldHasSuffix(FieldSub, v))
|
||||
}
|
||||
|
||||
// SubEqualFold applies the EqualFold predicate on the "sub" field.
|
||||
func SubEqualFold(v string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldEqualFold(FieldSub, v))
|
||||
}
|
||||
|
||||
// SubContainsFold applies the ContainsFold predicate on the "sub" field.
|
||||
func SubContainsFold(v string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldContainsFold(FieldSub, v))
|
||||
}
|
||||
|
||||
// EmailEQ applies the EQ predicate on the "email" field.
|
||||
func EmailEQ(v string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldEQ(FieldEmail, v))
|
||||
}
|
||||
|
||||
// EmailNEQ applies the NEQ predicate on the "email" field.
|
||||
func EmailNEQ(v string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldNEQ(FieldEmail, v))
|
||||
}
|
||||
|
||||
// EmailIn applies the In predicate on the "email" field.
|
||||
func EmailIn(vs ...string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldIn(FieldEmail, vs...))
|
||||
}
|
||||
|
||||
// EmailNotIn applies the NotIn predicate on the "email" field.
|
||||
func EmailNotIn(vs ...string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldNotIn(FieldEmail, vs...))
|
||||
}
|
||||
|
||||
// EmailGT applies the GT predicate on the "email" field.
|
||||
func EmailGT(v string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldGT(FieldEmail, v))
|
||||
}
|
||||
|
||||
// EmailGTE applies the GTE predicate on the "email" field.
|
||||
func EmailGTE(v string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldGTE(FieldEmail, v))
|
||||
}
|
||||
|
||||
// EmailLT applies the LT predicate on the "email" field.
|
||||
func EmailLT(v string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldLT(FieldEmail, v))
|
||||
}
|
||||
|
||||
// EmailLTE applies the LTE predicate on the "email" field.
|
||||
func EmailLTE(v string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldLTE(FieldEmail, v))
|
||||
}
|
||||
|
||||
// EmailContains applies the Contains predicate on the "email" field.
|
||||
func EmailContains(v string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldContains(FieldEmail, v))
|
||||
}
|
||||
|
||||
// EmailHasPrefix applies the HasPrefix predicate on the "email" field.
|
||||
func EmailHasPrefix(v string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldHasPrefix(FieldEmail, v))
|
||||
}
|
||||
|
||||
// EmailHasSuffix applies the HasSuffix predicate on the "email" field.
|
||||
func EmailHasSuffix(v string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldHasSuffix(FieldEmail, v))
|
||||
}
|
||||
|
||||
// EmailEqualFold applies the EqualFold predicate on the "email" field.
|
||||
func EmailEqualFold(v string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldEqualFold(FieldEmail, v))
|
||||
}
|
||||
|
||||
// EmailContainsFold applies the ContainsFold predicate on the "email" field.
|
||||
func EmailContainsFold(v string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldContainsFold(FieldEmail, v))
|
||||
}
|
||||
|
||||
// EmailVerifiedEQ applies the EQ predicate on the "email_verified" field.
|
||||
func EmailVerifiedEQ(v bool) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldEQ(FieldEmailVerified, v))
|
||||
}
|
||||
|
||||
// EmailVerifiedNEQ applies the NEQ predicate on the "email_verified" field.
|
||||
func EmailVerifiedNEQ(v bool) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldNEQ(FieldEmailVerified, v))
|
||||
}
|
||||
|
||||
// NameEQ applies the EQ predicate on the "name" field.
|
||||
func NameEQ(v string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldEQ(FieldName, v))
|
||||
}
|
||||
|
||||
// NameNEQ applies the NEQ predicate on the "name" field.
|
||||
func NameNEQ(v string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldNEQ(FieldName, v))
|
||||
}
|
||||
|
||||
// NameIn applies the In predicate on the "name" field.
|
||||
func NameIn(vs ...string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldIn(FieldName, vs...))
|
||||
}
|
||||
|
||||
// NameNotIn applies the NotIn predicate on the "name" field.
|
||||
func NameNotIn(vs ...string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldNotIn(FieldName, vs...))
|
||||
}
|
||||
|
||||
// NameGT applies the GT predicate on the "name" field.
|
||||
func NameGT(v string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldGT(FieldName, v))
|
||||
}
|
||||
|
||||
// NameGTE applies the GTE predicate on the "name" field.
|
||||
func NameGTE(v string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldGTE(FieldName, v))
|
||||
}
|
||||
|
||||
// NameLT applies the LT predicate on the "name" field.
|
||||
func NameLT(v string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldLT(FieldName, v))
|
||||
}
|
||||
|
||||
// NameLTE applies the LTE predicate on the "name" field.
|
||||
func NameLTE(v string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldLTE(FieldName, v))
|
||||
}
|
||||
|
||||
// NameContains applies the Contains predicate on the "name" field.
|
||||
func NameContains(v string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldContains(FieldName, v))
|
||||
}
|
||||
|
||||
// NameHasPrefix applies the HasPrefix predicate on the "name" field.
|
||||
func NameHasPrefix(v string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldHasPrefix(FieldName, v))
|
||||
}
|
||||
|
||||
// NameHasSuffix applies the HasSuffix predicate on the "name" field.
|
||||
func NameHasSuffix(v string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldHasSuffix(FieldName, v))
|
||||
}
|
||||
|
||||
// NameIsNil applies the IsNil predicate on the "name" field.
|
||||
func NameIsNil() predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldIsNull(FieldName))
|
||||
}
|
||||
|
||||
// NameNotNil applies the NotNil predicate on the "name" field.
|
||||
func NameNotNil() predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldNotNull(FieldName))
|
||||
}
|
||||
|
||||
// NameEqualFold applies the EqualFold predicate on the "name" field.
|
||||
func NameEqualFold(v string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldEqualFold(FieldName, v))
|
||||
}
|
||||
|
||||
// NameContainsFold applies the ContainsFold predicate on the "name" field.
|
||||
func NameContainsFold(v string) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.FieldContainsFold(FieldName, v))
|
||||
}
|
||||
|
||||
// HasUser applies the HasEdge predicate on the "user" edge.
|
||||
func HasUser() predicate.UserIdentity {
|
||||
return predicate.UserIdentity(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2O, true, UserTable, UserColumn),
|
||||
)
|
||||
sqlgraph.HasNeighbors(s, step)
|
||||
})
|
||||
}
|
||||
|
||||
// HasUserWith applies the HasEdge predicate on the "user" edge with a given conditions (other predicates).
|
||||
func HasUserWith(preds ...predicate.User) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(func(s *sql.Selector) {
|
||||
step := newUserStep()
|
||||
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
||||
for _, p := range preds {
|
||||
p(s)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// And groups predicates with the AND operator between them.
|
||||
func And(predicates ...predicate.UserIdentity) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.AndPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Or groups predicates with the OR operator between them.
|
||||
func Or(predicates ...predicate.UserIdentity) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.OrPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Not applies the not operator on the given predicate.
|
||||
func Not(p predicate.UserIdentity) predicate.UserIdentity {
|
||||
return predicate.UserIdentity(sql.NotPredicates(p))
|
||||
}
|
||||
@@ -1,901 +0,0 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package ent
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"entgo.io/ent/dialect"
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"entgo.io/ent/schema/field"
|
||||
"github.com/gofrs/uuid"
|
||||
"github.com/holos-run/holos/internal/server/ent/user"
|
||||
"github.com/holos-run/holos/internal/server/ent/useridentity"
|
||||
)
|
||||
|
||||
// UserIdentityCreate is the builder for creating a UserIdentity entity.
|
||||
type UserIdentityCreate struct {
|
||||
config
|
||||
mutation *UserIdentityMutation
|
||||
hooks []Hook
|
||||
conflict []sql.ConflictOption
|
||||
}
|
||||
|
||||
// SetCreatedAt sets the "created_at" field.
|
||||
func (uic *UserIdentityCreate) SetCreatedAt(t time.Time) *UserIdentityCreate {
|
||||
uic.mutation.SetCreatedAt(t)
|
||||
return uic
|
||||
}
|
||||
|
||||
// SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
|
||||
func (uic *UserIdentityCreate) SetNillableCreatedAt(t *time.Time) *UserIdentityCreate {
|
||||
if t != nil {
|
||||
uic.SetCreatedAt(*t)
|
||||
}
|
||||
return uic
|
||||
}
|
||||
|
||||
// SetUpdatedAt sets the "updated_at" field.
|
||||
func (uic *UserIdentityCreate) SetUpdatedAt(t time.Time) *UserIdentityCreate {
|
||||
uic.mutation.SetUpdatedAt(t)
|
||||
return uic
|
||||
}
|
||||
|
||||
// SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
|
||||
func (uic *UserIdentityCreate) SetNillableUpdatedAt(t *time.Time) *UserIdentityCreate {
|
||||
if t != nil {
|
||||
uic.SetUpdatedAt(*t)
|
||||
}
|
||||
return uic
|
||||
}
|
||||
|
||||
// SetIss sets the "iss" field.
|
||||
func (uic *UserIdentityCreate) SetIss(s string) *UserIdentityCreate {
|
||||
uic.mutation.SetIss(s)
|
||||
return uic
|
||||
}
|
||||
|
||||
// SetSub sets the "sub" field.
|
||||
func (uic *UserIdentityCreate) SetSub(s string) *UserIdentityCreate {
|
||||
uic.mutation.SetSub(s)
|
||||
return uic
|
||||
}
|
||||
|
||||
// SetEmail sets the "email" field.
|
||||
func (uic *UserIdentityCreate) SetEmail(s string) *UserIdentityCreate {
|
||||
uic.mutation.SetEmail(s)
|
||||
return uic
|
||||
}
|
||||
|
||||
// SetEmailVerified sets the "email_verified" field.
|
||||
func (uic *UserIdentityCreate) SetEmailVerified(b bool) *UserIdentityCreate {
|
||||
uic.mutation.SetEmailVerified(b)
|
||||
return uic
|
||||
}
|
||||
|
||||
// SetNillableEmailVerified sets the "email_verified" field if the given value is not nil.
|
||||
func (uic *UserIdentityCreate) SetNillableEmailVerified(b *bool) *UserIdentityCreate {
|
||||
if b != nil {
|
||||
uic.SetEmailVerified(*b)
|
||||
}
|
||||
return uic
|
||||
}
|
||||
|
||||
// SetName sets the "name" field.
|
||||
func (uic *UserIdentityCreate) SetName(s string) *UserIdentityCreate {
|
||||
uic.mutation.SetName(s)
|
||||
return uic
|
||||
}
|
||||
|
||||
// SetNillableName sets the "name" field if the given value is not nil.
|
||||
func (uic *UserIdentityCreate) SetNillableName(s *string) *UserIdentityCreate {
|
||||
if s != nil {
|
||||
uic.SetName(*s)
|
||||
}
|
||||
return uic
|
||||
}
|
||||
|
||||
// SetID sets the "id" field.
|
||||
func (uic *UserIdentityCreate) SetID(u uuid.UUID) *UserIdentityCreate {
|
||||
uic.mutation.SetID(u)
|
||||
return uic
|
||||
}
|
||||
|
||||
// SetNillableID sets the "id" field if the given value is not nil.
|
||||
func (uic *UserIdentityCreate) SetNillableID(u *uuid.UUID) *UserIdentityCreate {
|
||||
if u != nil {
|
||||
uic.SetID(*u)
|
||||
}
|
||||
return uic
|
||||
}
|
||||
|
||||
// SetUserID sets the "user" edge to the User entity by ID.
|
||||
func (uic *UserIdentityCreate) SetUserID(id uuid.UUID) *UserIdentityCreate {
|
||||
uic.mutation.SetUserID(id)
|
||||
return uic
|
||||
}
|
||||
|
||||
// SetUser sets the "user" edge to the User entity.
|
||||
func (uic *UserIdentityCreate) SetUser(u *User) *UserIdentityCreate {
|
||||
return uic.SetUserID(u.ID)
|
||||
}
|
||||
|
||||
// Mutation returns the UserIdentityMutation object of the builder.
|
||||
func (uic *UserIdentityCreate) Mutation() *UserIdentityMutation {
|
||||
return uic.mutation
|
||||
}
|
||||
|
||||
// Save creates the UserIdentity in the database.
|
||||
func (uic *UserIdentityCreate) Save(ctx context.Context) (*UserIdentity, error) {
|
||||
uic.defaults()
|
||||
return withHooks(ctx, uic.sqlSave, uic.mutation, uic.hooks)
|
||||
}
|
||||
|
||||
// SaveX calls Save and panics if Save returns an error.
|
||||
func (uic *UserIdentityCreate) SaveX(ctx context.Context) *UserIdentity {
|
||||
v, err := uic.Save(ctx)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return v
|
||||
}
|
||||
|
||||
// Exec executes the query.
|
||||
func (uic *UserIdentityCreate) Exec(ctx context.Context) error {
|
||||
_, err := uic.Save(ctx)
|
||||
return err
|
||||
}
|
||||
|
||||
// ExecX is like Exec, but panics if an error occurs.
|
||||
func (uic *UserIdentityCreate) ExecX(ctx context.Context) {
|
||||
if err := uic.Exec(ctx); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
// defaults sets the default values of the builder before save.
|
||||
func (uic *UserIdentityCreate) defaults() {
|
||||
if _, ok := uic.mutation.CreatedAt(); !ok {
|
||||
v := useridentity.DefaultCreatedAt()
|
||||
uic.mutation.SetCreatedAt(v)
|
||||
}
|
||||
if _, ok := uic.mutation.UpdatedAt(); !ok {
|
||||
v := useridentity.DefaultUpdatedAt()
|
||||
uic.mutation.SetUpdatedAt(v)
|
||||
}
|
||||
if _, ok := uic.mutation.EmailVerified(); !ok {
|
||||
v := useridentity.DefaultEmailVerified
|
||||
uic.mutation.SetEmailVerified(v)
|
||||
}
|
||||
if _, ok := uic.mutation.ID(); !ok {
|
||||
v := useridentity.DefaultID()
|
||||
uic.mutation.SetID(v)
|
||||
}
|
||||
}
|
||||
|
||||
// check runs all checks and user-defined validators on the builder.
|
||||
func (uic *UserIdentityCreate) check() error {
|
||||
if _, ok := uic.mutation.CreatedAt(); !ok {
|
||||
return &ValidationError{Name: "created_at", err: errors.New(`ent: missing required field "UserIdentity.created_at"`)}
|
||||
}
|
||||
if _, ok := uic.mutation.UpdatedAt(); !ok {
|
||||
return &ValidationError{Name: "updated_at", err: errors.New(`ent: missing required field "UserIdentity.updated_at"`)}
|
||||
}
|
||||
if _, ok := uic.mutation.Iss(); !ok {
|
||||
return &ValidationError{Name: "iss", err: errors.New(`ent: missing required field "UserIdentity.iss"`)}
|
||||
}
|
||||
if v, ok := uic.mutation.Iss(); ok {
|
||||
if err := useridentity.IssValidator(v); err != nil {
|
||||
return &ValidationError{Name: "iss", err: fmt.Errorf(`ent: validator failed for field "UserIdentity.iss": %w`, err)}
|
||||
}
|
||||
}
|
||||
if _, ok := uic.mutation.Sub(); !ok {
|
||||
return &ValidationError{Name: "sub", err: errors.New(`ent: missing required field "UserIdentity.sub"`)}
|
||||
}
|
||||
if v, ok := uic.mutation.Sub(); ok {
|
||||
if err := useridentity.SubValidator(v); err != nil {
|
||||
return &ValidationError{Name: "sub", err: fmt.Errorf(`ent: validator failed for field "UserIdentity.sub": %w`, err)}
|
||||
}
|
||||
}
|
||||
if _, ok := uic.mutation.Email(); !ok {
|
||||
return &ValidationError{Name: "email", err: errors.New(`ent: missing required field "UserIdentity.email"`)}
|
||||
}
|
||||
if v, ok := uic.mutation.Email(); ok {
|
||||
if err := useridentity.EmailValidator(v); err != nil {
|
||||
return &ValidationError{Name: "email", err: fmt.Errorf(`ent: validator failed for field "UserIdentity.email": %w`, err)}
|
||||
}
|
||||
}
|
||||
if _, ok := uic.mutation.EmailVerified(); !ok {
|
||||
return &ValidationError{Name: "email_verified", err: errors.New(`ent: missing required field "UserIdentity.email_verified"`)}
|
||||
}
|
||||
if _, ok := uic.mutation.UserID(); !ok {
|
||||
return &ValidationError{Name: "user", err: errors.New(`ent: missing required edge "UserIdentity.user"`)}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (uic *UserIdentityCreate) sqlSave(ctx context.Context) (*UserIdentity, error) {
|
||||
if err := uic.check(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
_node, _spec := uic.createSpec()
|
||||
if err := sqlgraph.CreateNode(ctx, uic.driver, _spec); err != nil {
|
||||
if sqlgraph.IsConstraintError(err) {
|
||||
err = &ConstraintError{msg: err.Error(), wrap: err}
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
if _spec.ID.Value != nil {
|
||||
if id, ok := _spec.ID.Value.(*uuid.UUID); ok {
|
||||
_node.ID = *id
|
||||
} else if err := _node.ID.Scan(_spec.ID.Value); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
uic.mutation.id = &_node.ID
|
||||
uic.mutation.done = true
|
||||
return _node, nil
|
||||
}
|
||||
|
||||
func (uic *UserIdentityCreate) createSpec() (*UserIdentity, *sqlgraph.CreateSpec) {
|
||||
var (
|
||||
_node = &UserIdentity{config: uic.config}
|
||||
_spec = sqlgraph.NewCreateSpec(useridentity.Table, sqlgraph.NewFieldSpec(useridentity.FieldID, field.TypeUUID))
|
||||
)
|
||||
_spec.OnConflict = uic.conflict
|
||||
if id, ok := uic.mutation.ID(); ok {
|
||||
_node.ID = id
|
||||
_spec.ID.Value = &id
|
||||
}
|
||||
if value, ok := uic.mutation.CreatedAt(); ok {
|
||||
_spec.SetField(useridentity.FieldCreatedAt, field.TypeTime, value)
|
||||
_node.CreatedAt = value
|
||||
}
|
||||
if value, ok := uic.mutation.UpdatedAt(); ok {
|
||||
_spec.SetField(useridentity.FieldUpdatedAt, field.TypeTime, value)
|
||||
_node.UpdatedAt = value
|
||||
}
|
||||
if value, ok := uic.mutation.Iss(); ok {
|
||||
_spec.SetField(useridentity.FieldIss, field.TypeString, value)
|
||||
_node.Iss = value
|
||||
}
|
||||
if value, ok := uic.mutation.Sub(); ok {
|
||||
_spec.SetField(useridentity.FieldSub, field.TypeString, value)
|
||||
_node.Sub = value
|
||||
}
|
||||
if value, ok := uic.mutation.Email(); ok {
|
||||
_spec.SetField(useridentity.FieldEmail, field.TypeString, value)
|
||||
_node.Email = value
|
||||
}
|
||||
if value, ok := uic.mutation.EmailVerified(); ok {
|
||||
_spec.SetField(useridentity.FieldEmailVerified, field.TypeBool, value)
|
||||
_node.EmailVerified = value
|
||||
}
|
||||
if value, ok := uic.mutation.Name(); ok {
|
||||
_spec.SetField(useridentity.FieldName, field.TypeString, value)
|
||||
_node.Name = &value
|
||||
}
|
||||
if nodes := uic.mutation.UserIDs(); len(nodes) > 0 {
|
||||
edge := &sqlgraph.EdgeSpec{
|
||||
Rel: sqlgraph.M2O,
|
||||
Inverse: true,
|
||||
Table: useridentity.UserTable,
|
||||
Columns: []string{useridentity.UserColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: sqlgraph.NewFieldSpec(user.FieldID, field.TypeUUID),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
edge.Target.Nodes = append(edge.Target.Nodes, k)
|
||||
}
|
||||
_node.user_id = &nodes[0]
|
||||
_spec.Edges = append(_spec.Edges, edge)
|
||||
}
|
||||
return _node, _spec
|
||||
}
|
||||
|
||||
// OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause
|
||||
// of the `INSERT` statement. For example:
|
||||
//
|
||||
// client.UserIdentity.Create().
|
||||
// SetCreatedAt(v).
|
||||
// OnConflict(
|
||||
// // Update the row with the new values
|
||||
// // the was proposed for insertion.
|
||||
// sql.ResolveWithNewValues(),
|
||||
// ).
|
||||
// // Override some of the fields with custom
|
||||
// // update values.
|
||||
// Update(func(u *ent.UserIdentityUpsert) {
|
||||
// SetCreatedAt(v+v).
|
||||
// }).
|
||||
// Exec(ctx)
|
||||
func (uic *UserIdentityCreate) OnConflict(opts ...sql.ConflictOption) *UserIdentityUpsertOne {
|
||||
uic.conflict = opts
|
||||
return &UserIdentityUpsertOne{
|
||||
create: uic,
|
||||
}
|
||||
}
|
||||
|
||||
// OnConflictColumns calls `OnConflict` and configures the columns
|
||||
// as conflict target. Using this option is equivalent to using:
|
||||
//
|
||||
// client.UserIdentity.Create().
|
||||
// OnConflict(sql.ConflictColumns(columns...)).
|
||||
// Exec(ctx)
|
||||
func (uic *UserIdentityCreate) OnConflictColumns(columns ...string) *UserIdentityUpsertOne {
|
||||
uic.conflict = append(uic.conflict, sql.ConflictColumns(columns...))
|
||||
return &UserIdentityUpsertOne{
|
||||
create: uic,
|
||||
}
|
||||
}
|
||||
|
||||
type (
|
||||
// UserIdentityUpsertOne is the builder for "upsert"-ing
|
||||
// one UserIdentity node.
|
||||
UserIdentityUpsertOne struct {
|
||||
create *UserIdentityCreate
|
||||
}
|
||||
|
||||
// UserIdentityUpsert is the "OnConflict" setter.
|
||||
UserIdentityUpsert struct {
|
||||
*sql.UpdateSet
|
||||
}
|
||||
)
|
||||
|
||||
// SetUpdatedAt sets the "updated_at" field.
|
||||
func (u *UserIdentityUpsert) SetUpdatedAt(v time.Time) *UserIdentityUpsert {
|
||||
u.Set(useridentity.FieldUpdatedAt, v)
|
||||
return u
|
||||
}
|
||||
|
||||
// UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
|
||||
func (u *UserIdentityUpsert) UpdateUpdatedAt() *UserIdentityUpsert {
|
||||
u.SetExcluded(useridentity.FieldUpdatedAt)
|
||||
return u
|
||||
}
|
||||
|
||||
// SetIss sets the "iss" field.
|
||||
func (u *UserIdentityUpsert) SetIss(v string) *UserIdentityUpsert {
|
||||
u.Set(useridentity.FieldIss, v)
|
||||
return u
|
||||
}
|
||||
|
||||
// UpdateIss sets the "iss" field to the value that was provided on create.
|
||||
func (u *UserIdentityUpsert) UpdateIss() *UserIdentityUpsert {
|
||||
u.SetExcluded(useridentity.FieldIss)
|
||||
return u
|
||||
}
|
||||
|
||||
// SetSub sets the "sub" field.
|
||||
func (u *UserIdentityUpsert) SetSub(v string) *UserIdentityUpsert {
|
||||
u.Set(useridentity.FieldSub, v)
|
||||
return u
|
||||
}
|
||||
|
||||
// UpdateSub sets the "sub" field to the value that was provided on create.
|
||||
func (u *UserIdentityUpsert) UpdateSub() *UserIdentityUpsert {
|
||||
u.SetExcluded(useridentity.FieldSub)
|
||||
return u
|
||||
}
|
||||
|
||||
// SetEmail sets the "email" field.
|
||||
func (u *UserIdentityUpsert) SetEmail(v string) *UserIdentityUpsert {
|
||||
u.Set(useridentity.FieldEmail, v)
|
||||
return u
|
||||
}
|
||||
|
||||
// UpdateEmail sets the "email" field to the value that was provided on create.
|
||||
func (u *UserIdentityUpsert) UpdateEmail() *UserIdentityUpsert {
|
||||
u.SetExcluded(useridentity.FieldEmail)
|
||||
return u
|
||||
}
|
||||
|
||||
// SetEmailVerified sets the "email_verified" field.
|
||||
func (u *UserIdentityUpsert) SetEmailVerified(v bool) *UserIdentityUpsert {
|
||||
u.Set(useridentity.FieldEmailVerified, v)
|
||||
return u
|
||||
}
|
||||
|
||||
// UpdateEmailVerified sets the "email_verified" field to the value that was provided on create.
|
||||
func (u *UserIdentityUpsert) UpdateEmailVerified() *UserIdentityUpsert {
|
||||
u.SetExcluded(useridentity.FieldEmailVerified)
|
||||
return u
|
||||
}
|
||||
|
||||
// SetName sets the "name" field.
|
||||
func (u *UserIdentityUpsert) SetName(v string) *UserIdentityUpsert {
|
||||
u.Set(useridentity.FieldName, v)
|
||||
return u
|
||||
}
|
||||
|
||||
// UpdateName sets the "name" field to the value that was provided on create.
|
||||
func (u *UserIdentityUpsert) UpdateName() *UserIdentityUpsert {
|
||||
u.SetExcluded(useridentity.FieldName)
|
||||
return u
|
||||
}
|
||||
|
||||
// ClearName clears the value of the "name" field.
|
||||
func (u *UserIdentityUpsert) ClearName() *UserIdentityUpsert {
|
||||
u.SetNull(useridentity.FieldName)
|
||||
return u
|
||||
}
|
||||
|
||||
// UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field.
|
||||
// Using this option is equivalent to using:
|
||||
//
|
||||
// client.UserIdentity.Create().
|
||||
// OnConflict(
|
||||
// sql.ResolveWithNewValues(),
|
||||
// sql.ResolveWith(func(u *sql.UpdateSet) {
|
||||
// u.SetIgnore(useridentity.FieldID)
|
||||
// }),
|
||||
// ).
|
||||
// Exec(ctx)
|
||||
func (u *UserIdentityUpsertOne) UpdateNewValues() *UserIdentityUpsertOne {
|
||||
u.create.conflict = append(u.create.conflict, sql.ResolveWithNewValues())
|
||||
u.create.conflict = append(u.create.conflict, sql.ResolveWith(func(s *sql.UpdateSet) {
|
||||
if _, exists := u.create.mutation.ID(); exists {
|
||||
s.SetIgnore(useridentity.FieldID)
|
||||
}
|
||||
if _, exists := u.create.mutation.CreatedAt(); exists {
|
||||
s.SetIgnore(useridentity.FieldCreatedAt)
|
||||
}
|
||||
}))
|
||||
return u
|
||||
}
|
||||
|
||||
// Ignore sets each column to itself in case of conflict.
|
||||
// Using this option is equivalent to using:
|
||||
//
|
||||
// client.UserIdentity.Create().
|
||||
// OnConflict(sql.ResolveWithIgnore()).
|
||||
// Exec(ctx)
|
||||
func (u *UserIdentityUpsertOne) Ignore() *UserIdentityUpsertOne {
|
||||
u.create.conflict = append(u.create.conflict, sql.ResolveWithIgnore())
|
||||
return u
|
||||
}
|
||||
|
||||
// DoNothing configures the conflict_action to `DO NOTHING`.
|
||||
// Supported only by SQLite and PostgreSQL.
|
||||
func (u *UserIdentityUpsertOne) DoNothing() *UserIdentityUpsertOne {
|
||||
u.create.conflict = append(u.create.conflict, sql.DoNothing())
|
||||
return u
|
||||
}
|
||||
|
||||
// Update allows overriding fields `UPDATE` values. See the UserIdentityCreate.OnConflict
|
||||
// documentation for more info.
|
||||
func (u *UserIdentityUpsertOne) Update(set func(*UserIdentityUpsert)) *UserIdentityUpsertOne {
|
||||
u.create.conflict = append(u.create.conflict, sql.ResolveWith(func(update *sql.UpdateSet) {
|
||||
set(&UserIdentityUpsert{UpdateSet: update})
|
||||
}))
|
||||
return u
|
||||
}
|
||||
|
||||
// SetUpdatedAt sets the "updated_at" field.
|
||||
func (u *UserIdentityUpsertOne) SetUpdatedAt(v time.Time) *UserIdentityUpsertOne {
|
||||
return u.Update(func(s *UserIdentityUpsert) {
|
||||
s.SetUpdatedAt(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
|
||||
func (u *UserIdentityUpsertOne) UpdateUpdatedAt() *UserIdentityUpsertOne {
|
||||
return u.Update(func(s *UserIdentityUpsert) {
|
||||
s.UpdateUpdatedAt()
|
||||
})
|
||||
}
|
||||
|
||||
// SetIss sets the "iss" field.
|
||||
func (u *UserIdentityUpsertOne) SetIss(v string) *UserIdentityUpsertOne {
|
||||
return u.Update(func(s *UserIdentityUpsert) {
|
||||
s.SetIss(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateIss sets the "iss" field to the value that was provided on create.
|
||||
func (u *UserIdentityUpsertOne) UpdateIss() *UserIdentityUpsertOne {
|
||||
return u.Update(func(s *UserIdentityUpsert) {
|
||||
s.UpdateIss()
|
||||
})
|
||||
}
|
||||
|
||||
// SetSub sets the "sub" field.
|
||||
func (u *UserIdentityUpsertOne) SetSub(v string) *UserIdentityUpsertOne {
|
||||
return u.Update(func(s *UserIdentityUpsert) {
|
||||
s.SetSub(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateSub sets the "sub" field to the value that was provided on create.
|
||||
func (u *UserIdentityUpsertOne) UpdateSub() *UserIdentityUpsertOne {
|
||||
return u.Update(func(s *UserIdentityUpsert) {
|
||||
s.UpdateSub()
|
||||
})
|
||||
}
|
||||
|
||||
// SetEmail sets the "email" field.
|
||||
func (u *UserIdentityUpsertOne) SetEmail(v string) *UserIdentityUpsertOne {
|
||||
return u.Update(func(s *UserIdentityUpsert) {
|
||||
s.SetEmail(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateEmail sets the "email" field to the value that was provided on create.
|
||||
func (u *UserIdentityUpsertOne) UpdateEmail() *UserIdentityUpsertOne {
|
||||
return u.Update(func(s *UserIdentityUpsert) {
|
||||
s.UpdateEmail()
|
||||
})
|
||||
}
|
||||
|
||||
// SetEmailVerified sets the "email_verified" field.
|
||||
func (u *UserIdentityUpsertOne) SetEmailVerified(v bool) *UserIdentityUpsertOne {
|
||||
return u.Update(func(s *UserIdentityUpsert) {
|
||||
s.SetEmailVerified(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateEmailVerified sets the "email_verified" field to the value that was provided on create.
|
||||
func (u *UserIdentityUpsertOne) UpdateEmailVerified() *UserIdentityUpsertOne {
|
||||
return u.Update(func(s *UserIdentityUpsert) {
|
||||
s.UpdateEmailVerified()
|
||||
})
|
||||
}
|
||||
|
||||
// SetName sets the "name" field.
|
||||
func (u *UserIdentityUpsertOne) SetName(v string) *UserIdentityUpsertOne {
|
||||
return u.Update(func(s *UserIdentityUpsert) {
|
||||
s.SetName(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateName sets the "name" field to the value that was provided on create.
|
||||
func (u *UserIdentityUpsertOne) UpdateName() *UserIdentityUpsertOne {
|
||||
return u.Update(func(s *UserIdentityUpsert) {
|
||||
s.UpdateName()
|
||||
})
|
||||
}
|
||||
|
||||
// ClearName clears the value of the "name" field.
|
||||
func (u *UserIdentityUpsertOne) ClearName() *UserIdentityUpsertOne {
|
||||
return u.Update(func(s *UserIdentityUpsert) {
|
||||
s.ClearName()
|
||||
})
|
||||
}
|
||||
|
||||
// Exec executes the query.
|
||||
func (u *UserIdentityUpsertOne) Exec(ctx context.Context) error {
|
||||
if len(u.create.conflict) == 0 {
|
||||
return errors.New("ent: missing options for UserIdentityCreate.OnConflict")
|
||||
}
|
||||
return u.create.Exec(ctx)
|
||||
}
|
||||
|
||||
// ExecX is like Exec, but panics if an error occurs.
|
||||
func (u *UserIdentityUpsertOne) ExecX(ctx context.Context) {
|
||||
if err := u.create.Exec(ctx); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
// Exec executes the UPSERT query and returns the inserted/updated ID.
|
||||
func (u *UserIdentityUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error) {
|
||||
if u.create.driver.Dialect() == dialect.MySQL {
|
||||
// In case of "ON CONFLICT", there is no way to get back non-numeric ID
|
||||
// fields from the database since MySQL does not support the RETURNING clause.
|
||||
return id, errors.New("ent: UserIdentityUpsertOne.ID is not supported by MySQL driver. Use UserIdentityUpsertOne.Exec instead")
|
||||
}
|
||||
node, err := u.create.Save(ctx)
|
||||
if err != nil {
|
||||
return id, err
|
||||
}
|
||||
return node.ID, nil
|
||||
}
|
||||
|
||||
// IDX is like ID, but panics if an error occurs.
|
||||
func (u *UserIdentityUpsertOne) IDX(ctx context.Context) uuid.UUID {
|
||||
id, err := u.ID(ctx)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return id
|
||||
}
|
||||
|
||||
// UserIdentityCreateBulk is the builder for creating many UserIdentity entities in bulk.
|
||||
type UserIdentityCreateBulk struct {
|
||||
config
|
||||
err error
|
||||
builders []*UserIdentityCreate
|
||||
conflict []sql.ConflictOption
|
||||
}
|
||||
|
||||
// Save creates the UserIdentity entities in the database.
|
||||
func (uicb *UserIdentityCreateBulk) Save(ctx context.Context) ([]*UserIdentity, error) {
|
||||
if uicb.err != nil {
|
||||
return nil, uicb.err
|
||||
}
|
||||
specs := make([]*sqlgraph.CreateSpec, len(uicb.builders))
|
||||
nodes := make([]*UserIdentity, len(uicb.builders))
|
||||
mutators := make([]Mutator, len(uicb.builders))
|
||||
for i := range uicb.builders {
|
||||
func(i int, root context.Context) {
|
||||
builder := uicb.builders[i]
|
||||
builder.defaults()
|
||||
var mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {
|
||||
mutation, ok := m.(*UserIdentityMutation)
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("unexpected mutation type %T", m)
|
||||
}
|
||||
if err := builder.check(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
builder.mutation = mutation
|
||||
var err error
|
||||
nodes[i], specs[i] = builder.createSpec()
|
||||
if i < len(mutators)-1 {
|
||||
_, err = mutators[i+1].Mutate(root, uicb.builders[i+1].mutation)
|
||||
} else {
|
||||
spec := &sqlgraph.BatchCreateSpec{Nodes: specs}
|
||||
spec.OnConflict = uicb.conflict
|
||||
// Invoke the actual operation on the latest mutation in the chain.
|
||||
if err = sqlgraph.BatchCreate(ctx, uicb.driver, spec); err != nil {
|
||||
if sqlgraph.IsConstraintError(err) {
|
||||
err = &ConstraintError{msg: err.Error(), wrap: err}
|
||||
}
|
||||
}
|
||||
}
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
mutation.id = &nodes[i].ID
|
||||
mutation.done = true
|
||||
return nodes[i], nil
|
||||
})
|
||||
for i := len(builder.hooks) - 1; i >= 0; i-- {
|
||||
mut = builder.hooks[i](mut)
|
||||
}
|
||||
mutators[i] = mut
|
||||
}(i, ctx)
|
||||
}
|
||||
if len(mutators) > 0 {
|
||||
if _, err := mutators[0].Mutate(ctx, uicb.builders[0].mutation); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
return nodes, nil
|
||||
}
|
||||
|
||||
// SaveX is like Save, but panics if an error occurs.
|
||||
func (uicb *UserIdentityCreateBulk) SaveX(ctx context.Context) []*UserIdentity {
|
||||
v, err := uicb.Save(ctx)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return v
|
||||
}
|
||||
|
||||
// Exec executes the query.
|
||||
func (uicb *UserIdentityCreateBulk) Exec(ctx context.Context) error {
|
||||
_, err := uicb.Save(ctx)
|
||||
return err
|
||||
}
|
||||
|
||||
// ExecX is like Exec, but panics if an error occurs.
|
||||
func (uicb *UserIdentityCreateBulk) ExecX(ctx context.Context) {
|
||||
if err := uicb.Exec(ctx); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
// OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause
|
||||
// of the `INSERT` statement. For example:
|
||||
//
|
||||
// client.UserIdentity.CreateBulk(builders...).
|
||||
// OnConflict(
|
||||
// // Update the row with the new values
|
||||
// // the was proposed for insertion.
|
||||
// sql.ResolveWithNewValues(),
|
||||
// ).
|
||||
// // Override some of the fields with custom
|
||||
// // update values.
|
||||
// Update(func(u *ent.UserIdentityUpsert) {
|
||||
// SetCreatedAt(v+v).
|
||||
// }).
|
||||
// Exec(ctx)
|
||||
func (uicb *UserIdentityCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserIdentityUpsertBulk {
|
||||
uicb.conflict = opts
|
||||
return &UserIdentityUpsertBulk{
|
||||
create: uicb,
|
||||
}
|
||||
}
|
||||
|
||||
// OnConflictColumns calls `OnConflict` and configures the columns
|
||||
// as conflict target. Using this option is equivalent to using:
|
||||
//
|
||||
// client.UserIdentity.Create().
|
||||
// OnConflict(sql.ConflictColumns(columns...)).
|
||||
// Exec(ctx)
|
||||
func (uicb *UserIdentityCreateBulk) OnConflictColumns(columns ...string) *UserIdentityUpsertBulk {
|
||||
uicb.conflict = append(uicb.conflict, sql.ConflictColumns(columns...))
|
||||
return &UserIdentityUpsertBulk{
|
||||
create: uicb,
|
||||
}
|
||||
}
|
||||
|
||||
// UserIdentityUpsertBulk is the builder for "upsert"-ing
|
||||
// a bulk of UserIdentity nodes.
|
||||
type UserIdentityUpsertBulk struct {
|
||||
create *UserIdentityCreateBulk
|
||||
}
|
||||
|
||||
// UpdateNewValues updates the mutable fields using the new values that
|
||||
// were set on create. Using this option is equivalent to using:
|
||||
//
|
||||
// client.UserIdentity.Create().
|
||||
// OnConflict(
|
||||
// sql.ResolveWithNewValues(),
|
||||
// sql.ResolveWith(func(u *sql.UpdateSet) {
|
||||
// u.SetIgnore(useridentity.FieldID)
|
||||
// }),
|
||||
// ).
|
||||
// Exec(ctx)
|
||||
func (u *UserIdentityUpsertBulk) UpdateNewValues() *UserIdentityUpsertBulk {
|
||||
u.create.conflict = append(u.create.conflict, sql.ResolveWithNewValues())
|
||||
u.create.conflict = append(u.create.conflict, sql.ResolveWith(func(s *sql.UpdateSet) {
|
||||
for _, b := range u.create.builders {
|
||||
if _, exists := b.mutation.ID(); exists {
|
||||
s.SetIgnore(useridentity.FieldID)
|
||||
}
|
||||
if _, exists := b.mutation.CreatedAt(); exists {
|
||||
s.SetIgnore(useridentity.FieldCreatedAt)
|
||||
}
|
||||
}
|
||||
}))
|
||||
return u
|
||||
}
|
||||
|
||||
// Ignore sets each column to itself in case of conflict.
|
||||
// Using this option is equivalent to using:
|
||||
//
|
||||
// client.UserIdentity.Create().
|
||||
// OnConflict(sql.ResolveWithIgnore()).
|
||||
// Exec(ctx)
|
||||
func (u *UserIdentityUpsertBulk) Ignore() *UserIdentityUpsertBulk {
|
||||
u.create.conflict = append(u.create.conflict, sql.ResolveWithIgnore())
|
||||
return u
|
||||
}
|
||||
|
||||
// DoNothing configures the conflict_action to `DO NOTHING`.
|
||||
// Supported only by SQLite and PostgreSQL.
|
||||
func (u *UserIdentityUpsertBulk) DoNothing() *UserIdentityUpsertBulk {
|
||||
u.create.conflict = append(u.create.conflict, sql.DoNothing())
|
||||
return u
|
||||
}
|
||||
|
||||
// Update allows overriding fields `UPDATE` values. See the UserIdentityCreateBulk.OnConflict
|
||||
// documentation for more info.
|
||||
func (u *UserIdentityUpsertBulk) Update(set func(*UserIdentityUpsert)) *UserIdentityUpsertBulk {
|
||||
u.create.conflict = append(u.create.conflict, sql.ResolveWith(func(update *sql.UpdateSet) {
|
||||
set(&UserIdentityUpsert{UpdateSet: update})
|
||||
}))
|
||||
return u
|
||||
}
|
||||
|
||||
// SetUpdatedAt sets the "updated_at" field.
|
||||
func (u *UserIdentityUpsertBulk) SetUpdatedAt(v time.Time) *UserIdentityUpsertBulk {
|
||||
return u.Update(func(s *UserIdentityUpsert) {
|
||||
s.SetUpdatedAt(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
|
||||
func (u *UserIdentityUpsertBulk) UpdateUpdatedAt() *UserIdentityUpsertBulk {
|
||||
return u.Update(func(s *UserIdentityUpsert) {
|
||||
s.UpdateUpdatedAt()
|
||||
})
|
||||
}
|
||||
|
||||
// SetIss sets the "iss" field.
|
||||
func (u *UserIdentityUpsertBulk) SetIss(v string) *UserIdentityUpsertBulk {
|
||||
return u.Update(func(s *UserIdentityUpsert) {
|
||||
s.SetIss(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateIss sets the "iss" field to the value that was provided on create.
|
||||
func (u *UserIdentityUpsertBulk) UpdateIss() *UserIdentityUpsertBulk {
|
||||
return u.Update(func(s *UserIdentityUpsert) {
|
||||
s.UpdateIss()
|
||||
})
|
||||
}
|
||||
|
||||
// SetSub sets the "sub" field.
|
||||
func (u *UserIdentityUpsertBulk) SetSub(v string) *UserIdentityUpsertBulk {
|
||||
return u.Update(func(s *UserIdentityUpsert) {
|
||||
s.SetSub(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateSub sets the "sub" field to the value that was provided on create.
|
||||
func (u *UserIdentityUpsertBulk) UpdateSub() *UserIdentityUpsertBulk {
|
||||
return u.Update(func(s *UserIdentityUpsert) {
|
||||
s.UpdateSub()
|
||||
})
|
||||
}
|
||||
|
||||
// SetEmail sets the "email" field.
|
||||
func (u *UserIdentityUpsertBulk) SetEmail(v string) *UserIdentityUpsertBulk {
|
||||
return u.Update(func(s *UserIdentityUpsert) {
|
||||
s.SetEmail(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateEmail sets the "email" field to the value that was provided on create.
|
||||
func (u *UserIdentityUpsertBulk) UpdateEmail() *UserIdentityUpsertBulk {
|
||||
return u.Update(func(s *UserIdentityUpsert) {
|
||||
s.UpdateEmail()
|
||||
})
|
||||
}
|
||||
|
||||
// SetEmailVerified sets the "email_verified" field.
|
||||
func (u *UserIdentityUpsertBulk) SetEmailVerified(v bool) *UserIdentityUpsertBulk {
|
||||
return u.Update(func(s *UserIdentityUpsert) {
|
||||
s.SetEmailVerified(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateEmailVerified sets the "email_verified" field to the value that was provided on create.
|
||||
func (u *UserIdentityUpsertBulk) UpdateEmailVerified() *UserIdentityUpsertBulk {
|
||||
return u.Update(func(s *UserIdentityUpsert) {
|
||||
s.UpdateEmailVerified()
|
||||
})
|
||||
}
|
||||
|
||||
// SetName sets the "name" field.
|
||||
func (u *UserIdentityUpsertBulk) SetName(v string) *UserIdentityUpsertBulk {
|
||||
return u.Update(func(s *UserIdentityUpsert) {
|
||||
s.SetName(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateName sets the "name" field to the value that was provided on create.
|
||||
func (u *UserIdentityUpsertBulk) UpdateName() *UserIdentityUpsertBulk {
|
||||
return u.Update(func(s *UserIdentityUpsert) {
|
||||
s.UpdateName()
|
||||
})
|
||||
}
|
||||
|
||||
// ClearName clears the value of the "name" field.
|
||||
func (u *UserIdentityUpsertBulk) ClearName() *UserIdentityUpsertBulk {
|
||||
return u.Update(func(s *UserIdentityUpsert) {
|
||||
s.ClearName()
|
||||
})
|
||||
}
|
||||
|
||||
// Exec executes the query.
|
||||
func (u *UserIdentityUpsertBulk) Exec(ctx context.Context) error {
|
||||
if u.create.err != nil {
|
||||
return u.create.err
|
||||
}
|
||||
for i, b := range u.create.builders {
|
||||
if len(b.conflict) != 0 {
|
||||
return fmt.Errorf("ent: OnConflict was set for builder %d. Set it on the UserIdentityCreateBulk instead", i)
|
||||
}
|
||||
}
|
||||
if len(u.create.conflict) == 0 {
|
||||
return errors.New("ent: missing options for UserIdentityCreateBulk.OnConflict")
|
||||
}
|
||||
return u.create.Exec(ctx)
|
||||
}
|
||||
|
||||
// ExecX is like Exec, but panics if an error occurs.
|
||||
func (u *UserIdentityUpsertBulk) ExecX(ctx context.Context) {
|
||||
if err := u.create.Exec(ctx); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user