mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-02 17:31:39 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5c6303486c | ||
|
|
2ccd2cea22 | ||
|
|
d93c19c2ab | ||
|
|
4e98504813 | ||
|
|
ab0bd3a5e1 | ||
|
|
62628ed0d8 | ||
|
|
b1e5464843 | ||
|
|
8e1359f126 | ||
|
|
f84a87574c | ||
|
|
1c16d367ed | ||
|
|
dc191fdbba | ||
|
|
875c410443 | ||
|
|
bcf5dfa70c | ||
|
|
77d76938a3 | ||
|
|
1267bc426a | ||
|
|
5e74045f3d | ||
|
|
3adf42925d | ||
|
|
f95fa2c906 | ||
|
|
ac2f65844c | ||
|
|
546dd7b4ad | ||
|
|
fcf4ab5b4f | ||
|
|
c57d5e8f1a | ||
|
|
cd57226a45 | ||
|
|
f5a11061ac | ||
|
|
93a3d814d6 | ||
|
|
a0e24880c3 | ||
|
|
e63ec7f22a | ||
|
|
6910a415a2 | ||
|
|
fccb42761c | ||
|
|
f75ff0d3be | ||
|
|
931ac2308d | ||
|
|
42c5ab642e | ||
|
|
8d8935c045 | ||
|
|
3baec2745b | ||
|
|
df72b55fe3 | ||
|
|
cbc5a35bcd | ||
|
|
959562c5ff | ||
|
|
84aa1dd79e | ||
|
|
d49a579cd6 | ||
|
|
1a3641e605 | ||
|
|
a05d1bb5d2 | ||
|
|
aaea70786b | ||
|
|
3d17feef0a | ||
|
|
9e938adc29 | ||
|
|
8ef7a7eab7 | ||
|
|
03f822b117 | ||
|
|
ae56055640 | ||
|
|
75c65228fc | ||
|
|
52b9f60261 | ||
|
|
edb109b542 | ||
|
|
d62fb30eb8 | ||
|
|
c1bdcc2d93 | ||
|
|
35bedf8f65 | ||
|
|
7f54ad66f7 | ||
|
|
0b70938525 | ||
|
|
5a2ac6ae31 | ||
|
|
3aed1522cd | ||
|
|
b5ad833965 | ||
|
|
a8c48d4961 | ||
|
|
b56c98c678 | ||
|
|
cea6b77fdd | ||
|
|
5bc9ff07c0 | ||
|
|
08451a846c | ||
|
|
fa6bb93c78 | ||
|
|
f5f0578dcc | ||
|
|
ca2aa476d9 | ||
|
|
ab33d8235f | ||
|
|
730cda4390 | ||
|
|
1f5c735b31 | ||
|
|
3b93b782fe |
@@ -2,6 +2,6 @@
|
||||
name = "cz_conventional_commits"
|
||||
tag_format = "v$version"
|
||||
version_scheme = "semver"
|
||||
version = "0.4.1"
|
||||
version = "0.5.10"
|
||||
update_changelog_on_bump = true
|
||||
major_version_zero = true
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
name: Bug Report
|
||||
description: File a bug report.
|
||||
title: "ERROR: "
|
||||
labels: ["#BUG", "#HELP"]
|
||||
projects: ["onsonr/39"]
|
||||
body:
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Operating System
|
||||
description: What operating system are you using?
|
||||
placeholder: "Example: macOS Big Sur"
|
||||
value: operating system
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: Network
|
||||
description: What network are you using?
|
||||
multiple: false
|
||||
options:
|
||||
- LocalNet
|
||||
- TestNet
|
||||
- MainNet
|
||||
default: 0
|
||||
validations:
|
||||
required: true
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Code of Conduct
|
||||
description:
|
||||
The Code of Conduct helps create a safe space for everyone. We require
|
||||
that everyone agrees to it.
|
||||
options:
|
||||
- label: I agree to follow this project's [Code of Conduct](link/to/coc)
|
||||
required: true
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: "Thanks for completing our form!"
|
||||
@@ -0,0 +1,5 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Community Discussions
|
||||
url: https://github.com/orgs/onsonr/discussions
|
||||
about: Please submit ideas and suggestions here.
|
||||
@@ -0,0 +1,30 @@
|
||||
name: Tracking issue
|
||||
description: Use this template for tracking new features.
|
||||
title: "(v0.6): FEATURE NAME"
|
||||
labels: ["#TRACK", "#OKR"]
|
||||
assignees: ["prnk28"]
|
||||
projects: ["onsonr/37"]
|
||||
body:
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Is this associated with a milestone?
|
||||
description: This is a tracking issue for tracking a new feature for a given milestone.
|
||||
options:
|
||||
- label: I have confirmed this is an OKR tracking issue
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Objective
|
||||
description: Explain the objective of the feature and add any relevant links.
|
||||
render: markdown
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Task List
|
||||
description: |
|
||||
Break down the objective into a list of tasks to be completed.
|
||||
value: |
|
||||
- [ ]
|
||||
validations:
|
||||
required: false
|
||||
@@ -0,0 +1,22 @@
|
||||
---
|
||||
name: Default Todo
|
||||
about: Break down feature requirements into tasks.
|
||||
title: "Name of the new task"
|
||||
labels:
|
||||
- "#TODO"
|
||||
- "#OKR"
|
||||
assignees: "prnk28"
|
||||
projects: "onsonr/37"
|
||||
---
|
||||
|
||||
### Description
|
||||
|
||||
The expected deliverable of the task.
|
||||
|
||||
### Associated Files
|
||||
|
||||
These files will be modified by this task.
|
||||
|
||||
### References
|
||||
|
||||
Use these documents to help you complete the task.
|
||||
@@ -27,6 +27,12 @@ jobs:
|
||||
go-version: "1.22"
|
||||
check-latest: true
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Release
|
||||
uses: goreleaser/goreleaser-action@v6
|
||||
with:
|
||||
@@ -34,6 +40,9 @@ jobs:
|
||||
version: latest
|
||||
args: release --clean
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GITHUB_TOKEN: ${{ secrets.GH_RELEASER_TOKEN }}
|
||||
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
|
||||
GITHUB_PERSONAL_AUTH_TOKEN: ${{ secrets.GH_PAT_TOKEN }}
|
||||
GITHUB_PERSONAL_AUTH_TOKEN: ${{ secrets.GH_RELEASER_TOKEN }}
|
||||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
||||
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
|
||||
|
||||
+53
-14
@@ -1,3 +1,4 @@
|
||||
# yaml-language-server: $schema=https://goreleaser.com/static/schema-pro.json
|
||||
version: 2
|
||||
project_name: sonr
|
||||
|
||||
@@ -13,22 +14,22 @@ builds:
|
||||
ldflags:
|
||||
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}
|
||||
|
||||
- id: motr
|
||||
- id: hway
|
||||
goos: [linux, darwin]
|
||||
goarch: [amd64, arm64]
|
||||
main: ./cmd/motr
|
||||
binary: motr
|
||||
main: ./cmd/hway
|
||||
binary: hway
|
||||
builder: go
|
||||
gobinary: go
|
||||
command: build
|
||||
ldflags:
|
||||
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}
|
||||
|
||||
- id: dwn
|
||||
- id: motr
|
||||
goos: [js]
|
||||
goarch: [wasm]
|
||||
main: ./cmd/dwn/dwn.go
|
||||
binary: dwn
|
||||
main: ./cmd/motr/motr.go
|
||||
binary: motr
|
||||
builder: go
|
||||
gobinary: go
|
||||
command: build
|
||||
@@ -42,8 +43,8 @@ archives:
|
||||
- src: README*
|
||||
- src: CHANGELOG*
|
||||
|
||||
- id: motr
|
||||
builds: [motr]
|
||||
- id: hway
|
||||
builds: [hway]
|
||||
name_template: '{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
|
||||
format: tar.gz
|
||||
files:
|
||||
@@ -54,7 +55,7 @@ release:
|
||||
github:
|
||||
owner: onsonr
|
||||
name: sonr
|
||||
name_template: '{{.Now.Format "2006.01.02"}}'
|
||||
name_template: "Release {{.Version}}"
|
||||
draft: false
|
||||
replace_existing_draft: true
|
||||
replace_existing_artifacts: true
|
||||
@@ -62,7 +63,6 @@ release:
|
||||
- glob: ./CHANGELOG*
|
||||
- glob: ./README*
|
||||
- glob: ./LICENSE*
|
||||
- glob: ./pkl/*
|
||||
|
||||
brews:
|
||||
- name: sonr
|
||||
@@ -71,7 +71,7 @@ brews:
|
||||
name: goreleaserbot
|
||||
email: bot@goreleaser.com
|
||||
directory: Formula
|
||||
caveats: "Run a local sonr node and access it with the motr proxy"
|
||||
caveats: "Run a local sonr node and access it with the hway proxy"
|
||||
homepage: "https://sonr.io/"
|
||||
description: "Sonr is a decentralized, permissionless, and censorship-resistant identity network."
|
||||
dependencies:
|
||||
@@ -82,13 +82,13 @@ brews:
|
||||
branch: master
|
||||
token: "{{ .Env.GITHUB_PERSONAL_AUTH_TOKEN }}"
|
||||
|
||||
- name: motr
|
||||
ids: [motr]
|
||||
- name: hway
|
||||
ids: [hway]
|
||||
commit_author:
|
||||
name: goreleaserbot
|
||||
email: bot@goreleaser.com
|
||||
directory: Formula
|
||||
caveats: "Use motr to interact with the Sonr network"
|
||||
caveats: "Use hway to interact with the Sonr network"
|
||||
homepage: "https://sonr.io/"
|
||||
description: "Motr is a proxy for interacting with the Sonr network."
|
||||
dependencies:
|
||||
@@ -97,3 +97,42 @@ brews:
|
||||
owner: onsonr
|
||||
name: homebrew-tap
|
||||
branch: master
|
||||
|
||||
# .goreleaser.yaml
|
||||
dockers:
|
||||
- # Sonr Binary
|
||||
id: sonrd
|
||||
goos: linux
|
||||
goarch: amd64
|
||||
ids:
|
||||
- sonr
|
||||
image_templates:
|
||||
- "onsonr/sonrd:latest"
|
||||
- "onsonr/sonrd:{{ .Tag }}"
|
||||
dockerfile: "./deploy/sonrd.Dockerfile"
|
||||
build_flag_templates:
|
||||
- "--label=org.opencontainers.image.created={{.Date}}"
|
||||
- "--label=org.opencontainers.image.title=sonrd"
|
||||
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
|
||||
- "--label=org.opencontainers.image.version={{.Version}}"
|
||||
|
||||
- # Motr Binary
|
||||
id: hway
|
||||
goos: linux
|
||||
goarch: amd64
|
||||
ids:
|
||||
- hway
|
||||
image_templates:
|
||||
- "onsonr/hway:latest"
|
||||
- "onsonr/hway:{{ .Tag }}"
|
||||
dockerfile: "./deploy/hway.Dockerfile"
|
||||
build_flag_templates:
|
||||
- "--label=org.opencontainers.image.created={{.Date}}"
|
||||
- "--label=org.opencontainers.image.title=hway"
|
||||
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
|
||||
- "--label=org.opencontainers.image.version={{.Version}}"
|
||||
|
||||
announce:
|
||||
telegram:
|
||||
enabled: true
|
||||
chat_id: -1002222617755
|
||||
|
||||
+127
-2
@@ -1,3 +1,128 @@
|
||||
## v0.5.10 (2024-10-07)
|
||||
|
||||
### Feat
|
||||
|
||||
- **blocks**: remove button component
|
||||
|
||||
## v0.5.9 (2024-10-06)
|
||||
|
||||
### Feat
|
||||
|
||||
- add Motr support
|
||||
- update UIUX PKL to utilize optional fields
|
||||
|
||||
### Fix
|
||||
|
||||
- Update source directory for asset publishing
|
||||
|
||||
## v0.5.8 (2024-10-04)
|
||||
|
||||
### Refactor
|
||||
|
||||
- Remove unused logs configuration
|
||||
|
||||
## v0.5.7 (2024-10-04)
|
||||
|
||||
### Feat
|
||||
|
||||
- **devbox**: use process-compose for testnet services
|
||||
- remove motr.mjs dependency
|
||||
- add markdown rendering to issue templates
|
||||
- update issue templates for better clarity
|
||||
- add issue templates for tracking and task issues
|
||||
- add issue templates for bug report and tracking
|
||||
- introduce docker-compose based setup
|
||||
|
||||
### Refactor
|
||||
|
||||
- update issue template headings
|
||||
- rename bug-report issue template to bug
|
||||
|
||||
## v0.5.6 (2024-10-03)
|
||||
|
||||
### Feat
|
||||
|
||||
- add hway and sonr processes to dev environment
|
||||
|
||||
## v0.5.5 (2024-10-03)
|
||||
|
||||
### Feat
|
||||
|
||||
- add rudimentary DidController table
|
||||
- update home section with new features
|
||||
- introduce Home model and refactor views
|
||||
- **nebula**: create Home model for home page
|
||||
|
||||
### Refactor
|
||||
|
||||
- reorganize pkl files for better separation of concerns
|
||||
- rename msg_server_test.go to rpc_test.go
|
||||
|
||||
## v0.5.4 (2024-10-02)
|
||||
|
||||
## v0.5.3 (2024-10-02)
|
||||
|
||||
### Fix
|
||||
|
||||
- remove unnecessary telegram message template
|
||||
|
||||
## v0.5.2 (2024-10-02)
|
||||
|
||||
### Feat
|
||||
|
||||
- **service**: integrate group module (#1104)
|
||||
|
||||
### Refactor
|
||||
|
||||
- revert version bump to 0.5.1
|
||||
|
||||
## v0.5.1 (2024-10-02)
|
||||
|
||||
### Refactor
|
||||
|
||||
- move Motr API to state package
|
||||
|
||||
## v0.5.0 (2024-10-02)
|
||||
|
||||
### Feat
|
||||
|
||||
- allow multiple macaroons with the same id
|
||||
|
||||
## v0.4.5 (2024-10-02)
|
||||
|
||||
### Fix
|
||||
|
||||
- use correct secret for docker login
|
||||
|
||||
## v0.4.4 (2024-10-02)
|
||||
|
||||
## v0.4.3 (2024-10-02)
|
||||
|
||||
### Feat
|
||||
|
||||
- **release**: add docker images for sonrd and motr
|
||||
- update homepage with new visual design
|
||||
- add DID to vault genesis schema
|
||||
- add video component
|
||||
- add video component
|
||||
- add hx-get attribute to primary button in hero section
|
||||
|
||||
### Fix
|
||||
|
||||
- **layout**: add missing favicon
|
||||
- **hero**: Use hx-swap for primary button to prevent flicker
|
||||
|
||||
### Refactor
|
||||
|
||||
- use single GITHUB_TOKEN for release workflow
|
||||
- update workflow variables
|
||||
|
||||
## v0.4.2 (2024-10-01)
|
||||
|
||||
### Refactor
|
||||
|
||||
- use single GITHUB_TOKEN for release workflow
|
||||
|
||||
## v0.4.1 (2024-10-01)
|
||||
|
||||
### Feat
|
||||
@@ -24,7 +149,7 @@
|
||||
- **cta**: Fix typo in CTA title
|
||||
- change bento section title to reflect security focus
|
||||
- adjust hero image dimensions
|
||||
- **Input**: Change type from to
|
||||
- **Input**: Change type from to
|
||||
- update hero image height in config.pkl
|
||||
|
||||
### Refactor
|
||||
@@ -34,7 +159,7 @@
|
||||
- update hero image dimensions
|
||||
- move nebula configuration to static file
|
||||
- rename buf-publish.yml to publish-assets.yml
|
||||
- remove unused field from
|
||||
- remove unused field from
|
||||
|
||||
## v0.4.0 (2024-09-30)
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ endif
|
||||
|
||||
install: go.sum
|
||||
go install -mod=readonly $(BUILD_FLAGS) ./cmd/sonrd
|
||||
go install -mod=readonly $(BUILD_FLAGS) ./cmd/motr
|
||||
go install -mod=readonly $(BUILD_FLAGS) ./cmd/hway
|
||||
|
||||
########################################
|
||||
### Tools & dependencies
|
||||
@@ -295,19 +295,19 @@ sh-testnet: mod-tidy
|
||||
### templ & vault ###
|
||||
###############################################################################
|
||||
|
||||
.PHONY: dwn motr templ pkl nebula
|
||||
.PHONY: motr hway templ pkl nebula
|
||||
|
||||
hway:
|
||||
@echo "(motr) Building Highway gateway"
|
||||
templ generate
|
||||
go build -o ./build/hway ./cmd/hway
|
||||
|
||||
motr:
|
||||
@echo "(motr) Building motr gateway"
|
||||
go build -o ./build/motr ./cmd/motr
|
||||
|
||||
dwn:
|
||||
@echo "(dwn) Building dwn.wasm -> IPFS Vault"
|
||||
GOOS=js GOARCH=wasm go build -o ./pkg/dwn/app.wasm ./cmd/dwn/dwn.go
|
||||
@echo "(dwn) Building motr.wasm -> Service Worker IPFS Vault"
|
||||
GOOS=js GOARCH=wasm go build -o ./pkg/dwn/app.wasm ./cmd/motr/motr.go
|
||||
|
||||
templ:
|
||||
@echo "(templ) Generating templ files"
|
||||
go install github.com/a-h/templ/cmd/templ@latest
|
||||
templ generate
|
||||
|
||||
nebula:
|
||||
@@ -316,18 +316,18 @@ nebula:
|
||||
|
||||
pkl:
|
||||
@echo "(pkl) Building PKL"
|
||||
go run github.com/apple/pkl-go/cmd/pkl-gen-go ./pkl/dwn.pkl
|
||||
go run github.com/apple/pkl-go/cmd/pkl-gen-go ./pkl/orm.pkl
|
||||
go run github.com/apple/pkl-go/cmd/pkl-gen-go ./pkl/txns.pkl
|
||||
go run github.com/apple/pkl-go/cmd/pkl-gen-go ./pkl/uiux.pkl
|
||||
go run github.com/apple/pkl-go/cmd/pkl-gen-go ./pkl/DWN.pkl
|
||||
go run github.com/apple/pkl-go/cmd/pkl-gen-go ./pkl/ORM.pkl
|
||||
go run github.com/apple/pkl-go/cmd/pkl-gen-go ./pkl/Txns.pkl
|
||||
go run github.com/apple/pkl-go/cmd/pkl-gen-go ./pkl/UIUX.pkl
|
||||
|
||||
start-caddy:
|
||||
@echo "(start-caddy) Starting caddy"
|
||||
./build/caddy run --config ./config/caddy/Caddyfile
|
||||
|
||||
start-motr: motr
|
||||
start-hway: hway
|
||||
@echo "(start-proxy) Starting proxy server"
|
||||
./build/motr start
|
||||
./build/hway start
|
||||
|
||||
###############################################################################
|
||||
### help ###
|
||||
|
||||
+435
-150
@@ -1042,61 +1042,63 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods {
|
||||
}
|
||||
}
|
||||
|
||||
var _ protoreflect.List = (*_Methods_1_list)(nil)
|
||||
var _ protoreflect.List = (*_Methods_2_list)(nil)
|
||||
|
||||
type _Methods_1_list struct {
|
||||
type _Methods_2_list struct {
|
||||
list *[]string
|
||||
}
|
||||
|
||||
func (x *_Methods_1_list) Len() int {
|
||||
func (x *_Methods_2_list) Len() int {
|
||||
if x.list == nil {
|
||||
return 0
|
||||
}
|
||||
return len(*x.list)
|
||||
}
|
||||
|
||||
func (x *_Methods_1_list) Get(i int) protoreflect.Value {
|
||||
func (x *_Methods_2_list) Get(i int) protoreflect.Value {
|
||||
return protoreflect.ValueOfString((*x.list)[i])
|
||||
}
|
||||
|
||||
func (x *_Methods_1_list) Set(i int, value protoreflect.Value) {
|
||||
func (x *_Methods_2_list) Set(i int, value protoreflect.Value) {
|
||||
valueUnwrapped := value.String()
|
||||
concreteValue := valueUnwrapped
|
||||
(*x.list)[i] = concreteValue
|
||||
}
|
||||
|
||||
func (x *_Methods_1_list) Append(value protoreflect.Value) {
|
||||
func (x *_Methods_2_list) Append(value protoreflect.Value) {
|
||||
valueUnwrapped := value.String()
|
||||
concreteValue := valueUnwrapped
|
||||
*x.list = append(*x.list, concreteValue)
|
||||
}
|
||||
|
||||
func (x *_Methods_1_list) AppendMutable() protoreflect.Value {
|
||||
panic(fmt.Errorf("AppendMutable can not be called on message Methods at list field Methods as it is not of Message kind"))
|
||||
func (x *_Methods_2_list) AppendMutable() protoreflect.Value {
|
||||
panic(fmt.Errorf("AppendMutable can not be called on message Methods at list field Supported as it is not of Message kind"))
|
||||
}
|
||||
|
||||
func (x *_Methods_1_list) Truncate(n int) {
|
||||
func (x *_Methods_2_list) Truncate(n int) {
|
||||
*x.list = (*x.list)[:n]
|
||||
}
|
||||
|
||||
func (x *_Methods_1_list) NewElement() protoreflect.Value {
|
||||
func (x *_Methods_2_list) NewElement() protoreflect.Value {
|
||||
v := ""
|
||||
return protoreflect.ValueOfString(v)
|
||||
}
|
||||
|
||||
func (x *_Methods_1_list) IsValid() bool {
|
||||
func (x *_Methods_2_list) IsValid() bool {
|
||||
return x.list != nil
|
||||
}
|
||||
|
||||
var (
|
||||
md_Methods protoreflect.MessageDescriptor
|
||||
fd_Methods_methods protoreflect.FieldDescriptor
|
||||
md_Methods protoreflect.MessageDescriptor
|
||||
fd_Methods_default protoreflect.FieldDescriptor
|
||||
fd_Methods_supported protoreflect.FieldDescriptor
|
||||
)
|
||||
|
||||
func init() {
|
||||
file_macaroon_v1_genesis_proto_init()
|
||||
md_Methods = File_macaroon_v1_genesis_proto.Messages().ByName("Methods")
|
||||
fd_Methods_methods = md_Methods.Fields().ByName("methods")
|
||||
fd_Methods_default = md_Methods.Fields().ByName("default")
|
||||
fd_Methods_supported = md_Methods.Fields().ByName("supported")
|
||||
}
|
||||
|
||||
var _ protoreflect.Message = (*fastReflection_Methods)(nil)
|
||||
@@ -1164,9 +1166,15 @@ func (x *fastReflection_Methods) Interface() protoreflect.ProtoMessage {
|
||||
// While iterating, mutating operations may only be performed
|
||||
// on the current field descriptor.
|
||||
func (x *fastReflection_Methods) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
|
||||
if len(x.Methods) != 0 {
|
||||
value := protoreflect.ValueOfList(&_Methods_1_list{list: &x.Methods})
|
||||
if !f(fd_Methods_methods, value) {
|
||||
if x.Default != "" {
|
||||
value := protoreflect.ValueOfString(x.Default)
|
||||
if !f(fd_Methods_default, value) {
|
||||
return
|
||||
}
|
||||
}
|
||||
if len(x.Supported) != 0 {
|
||||
value := protoreflect.ValueOfList(&_Methods_2_list{list: &x.Supported})
|
||||
if !f(fd_Methods_supported, value) {
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -1185,8 +1193,10 @@ func (x *fastReflection_Methods) Range(f func(protoreflect.FieldDescriptor, prot
|
||||
// a repeated field is populated if it is non-empty.
|
||||
func (x *fastReflection_Methods) Has(fd protoreflect.FieldDescriptor) bool {
|
||||
switch fd.FullName() {
|
||||
case "macaroon.v1.Methods.methods":
|
||||
return len(x.Methods) != 0
|
||||
case "macaroon.v1.Methods.default":
|
||||
return x.Default != ""
|
||||
case "macaroon.v1.Methods.supported":
|
||||
return len(x.Supported) != 0
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.v1.Methods"))
|
||||
@@ -1203,8 +1213,10 @@ func (x *fastReflection_Methods) Has(fd protoreflect.FieldDescriptor) bool {
|
||||
// Clear is a mutating operation and unsafe for concurrent use.
|
||||
func (x *fastReflection_Methods) Clear(fd protoreflect.FieldDescriptor) {
|
||||
switch fd.FullName() {
|
||||
case "macaroon.v1.Methods.methods":
|
||||
x.Methods = nil
|
||||
case "macaroon.v1.Methods.default":
|
||||
x.Default = ""
|
||||
case "macaroon.v1.Methods.supported":
|
||||
x.Supported = nil
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.v1.Methods"))
|
||||
@@ -1221,11 +1233,14 @@ func (x *fastReflection_Methods) Clear(fd protoreflect.FieldDescriptor) {
|
||||
// of the value; to obtain a mutable reference, use Mutable.
|
||||
func (x *fastReflection_Methods) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch descriptor.FullName() {
|
||||
case "macaroon.v1.Methods.methods":
|
||||
if len(x.Methods) == 0 {
|
||||
return protoreflect.ValueOfList(&_Methods_1_list{})
|
||||
case "macaroon.v1.Methods.default":
|
||||
value := x.Default
|
||||
return protoreflect.ValueOfString(value)
|
||||
case "macaroon.v1.Methods.supported":
|
||||
if len(x.Supported) == 0 {
|
||||
return protoreflect.ValueOfList(&_Methods_2_list{})
|
||||
}
|
||||
listValue := &_Methods_1_list{list: &x.Methods}
|
||||
listValue := &_Methods_2_list{list: &x.Supported}
|
||||
return protoreflect.ValueOfList(listValue)
|
||||
default:
|
||||
if descriptor.IsExtension() {
|
||||
@@ -1247,10 +1262,12 @@ func (x *fastReflection_Methods) Get(descriptor protoreflect.FieldDescriptor) pr
|
||||
// Set is a mutating operation and unsafe for concurrent use.
|
||||
func (x *fastReflection_Methods) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
|
||||
switch fd.FullName() {
|
||||
case "macaroon.v1.Methods.methods":
|
||||
case "macaroon.v1.Methods.default":
|
||||
x.Default = value.Interface().(string)
|
||||
case "macaroon.v1.Methods.supported":
|
||||
lv := value.List()
|
||||
clv := lv.(*_Methods_1_list)
|
||||
x.Methods = *clv.list
|
||||
clv := lv.(*_Methods_2_list)
|
||||
x.Supported = *clv.list
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.v1.Methods"))
|
||||
@@ -1271,12 +1288,14 @@ func (x *fastReflection_Methods) Set(fd protoreflect.FieldDescriptor, value prot
|
||||
// Mutable is a mutating operation and unsafe for concurrent use.
|
||||
func (x *fastReflection_Methods) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch fd.FullName() {
|
||||
case "macaroon.v1.Methods.methods":
|
||||
if x.Methods == nil {
|
||||
x.Methods = []string{}
|
||||
case "macaroon.v1.Methods.supported":
|
||||
if x.Supported == nil {
|
||||
x.Supported = []string{}
|
||||
}
|
||||
value := &_Methods_1_list{list: &x.Methods}
|
||||
value := &_Methods_2_list{list: &x.Supported}
|
||||
return protoreflect.ValueOfList(value)
|
||||
case "macaroon.v1.Methods.default":
|
||||
panic(fmt.Errorf("field default of message macaroon.v1.Methods is not mutable"))
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.v1.Methods"))
|
||||
@@ -1290,9 +1309,11 @@ func (x *fastReflection_Methods) Mutable(fd protoreflect.FieldDescriptor) protor
|
||||
// For lists, maps, and messages, this returns a new, empty, mutable value.
|
||||
func (x *fastReflection_Methods) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch fd.FullName() {
|
||||
case "macaroon.v1.Methods.methods":
|
||||
case "macaroon.v1.Methods.default":
|
||||
return protoreflect.ValueOfString("")
|
||||
case "macaroon.v1.Methods.supported":
|
||||
list := []string{}
|
||||
return protoreflect.ValueOfList(&_Methods_1_list{list: &list})
|
||||
return protoreflect.ValueOfList(&_Methods_2_list{list: &list})
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.v1.Methods"))
|
||||
@@ -1362,8 +1383,12 @@ func (x *fastReflection_Methods) ProtoMethods() *protoiface.Methods {
|
||||
var n int
|
||||
var l int
|
||||
_ = l
|
||||
if len(x.Methods) > 0 {
|
||||
for _, s := range x.Methods {
|
||||
l = len(x.Default)
|
||||
if l > 0 {
|
||||
n += 1 + l + runtime.Sov(uint64(l))
|
||||
}
|
||||
if len(x.Supported) > 0 {
|
||||
for _, s := range x.Supported {
|
||||
l = len(s)
|
||||
n += 1 + l + runtime.Sov(uint64(l))
|
||||
}
|
||||
@@ -1397,15 +1422,22 @@ func (x *fastReflection_Methods) ProtoMethods() *protoiface.Methods {
|
||||
i -= len(x.unknownFields)
|
||||
copy(dAtA[i:], x.unknownFields)
|
||||
}
|
||||
if len(x.Methods) > 0 {
|
||||
for iNdEx := len(x.Methods) - 1; iNdEx >= 0; iNdEx-- {
|
||||
i -= len(x.Methods[iNdEx])
|
||||
copy(dAtA[i:], x.Methods[iNdEx])
|
||||
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Methods[iNdEx])))
|
||||
if len(x.Supported) > 0 {
|
||||
for iNdEx := len(x.Supported) - 1; iNdEx >= 0; iNdEx-- {
|
||||
i -= len(x.Supported[iNdEx])
|
||||
copy(dAtA[i:], x.Supported[iNdEx])
|
||||
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Supported[iNdEx])))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
dAtA[i] = 0x12
|
||||
}
|
||||
}
|
||||
if len(x.Default) > 0 {
|
||||
i -= len(x.Default)
|
||||
copy(dAtA[i:], x.Default)
|
||||
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Default)))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
if input.Buf != nil {
|
||||
input.Buf = append(input.Buf, dAtA...)
|
||||
} else {
|
||||
@@ -1457,7 +1489,7 @@ func (x *fastReflection_Methods) ProtoMethods() *protoiface.Methods {
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Methods", wireType)
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Default", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
@@ -1485,7 +1517,39 @@ func (x *fastReflection_Methods) ProtoMethods() *protoiface.Methods {
|
||||
if postIndex > l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
x.Methods = append(x.Methods, string(dAtA[iNdEx:postIndex]))
|
||||
x.Default = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Supported", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||
}
|
||||
if postIndex > l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
x.Supported = append(x.Supported, string(dAtA[iNdEx:postIndex]))
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
@@ -1522,61 +1586,63 @@ func (x *fastReflection_Methods) ProtoMethods() *protoiface.Methods {
|
||||
}
|
||||
}
|
||||
|
||||
var _ protoreflect.List = (*_Scopes_1_list)(nil)
|
||||
var _ protoreflect.List = (*_Scopes_2_list)(nil)
|
||||
|
||||
type _Scopes_1_list struct {
|
||||
type _Scopes_2_list struct {
|
||||
list *[]string
|
||||
}
|
||||
|
||||
func (x *_Scopes_1_list) Len() int {
|
||||
func (x *_Scopes_2_list) Len() int {
|
||||
if x.list == nil {
|
||||
return 0
|
||||
}
|
||||
return len(*x.list)
|
||||
}
|
||||
|
||||
func (x *_Scopes_1_list) Get(i int) protoreflect.Value {
|
||||
func (x *_Scopes_2_list) Get(i int) protoreflect.Value {
|
||||
return protoreflect.ValueOfString((*x.list)[i])
|
||||
}
|
||||
|
||||
func (x *_Scopes_1_list) Set(i int, value protoreflect.Value) {
|
||||
func (x *_Scopes_2_list) Set(i int, value protoreflect.Value) {
|
||||
valueUnwrapped := value.String()
|
||||
concreteValue := valueUnwrapped
|
||||
(*x.list)[i] = concreteValue
|
||||
}
|
||||
|
||||
func (x *_Scopes_1_list) Append(value protoreflect.Value) {
|
||||
func (x *_Scopes_2_list) Append(value protoreflect.Value) {
|
||||
valueUnwrapped := value.String()
|
||||
concreteValue := valueUnwrapped
|
||||
*x.list = append(*x.list, concreteValue)
|
||||
}
|
||||
|
||||
func (x *_Scopes_1_list) AppendMutable() protoreflect.Value {
|
||||
panic(fmt.Errorf("AppendMutable can not be called on message Scopes at list field Scopes as it is not of Message kind"))
|
||||
func (x *_Scopes_2_list) AppendMutable() protoreflect.Value {
|
||||
panic(fmt.Errorf("AppendMutable can not be called on message Scopes at list field Supported as it is not of Message kind"))
|
||||
}
|
||||
|
||||
func (x *_Scopes_1_list) Truncate(n int) {
|
||||
func (x *_Scopes_2_list) Truncate(n int) {
|
||||
*x.list = (*x.list)[:n]
|
||||
}
|
||||
|
||||
func (x *_Scopes_1_list) NewElement() protoreflect.Value {
|
||||
func (x *_Scopes_2_list) NewElement() protoreflect.Value {
|
||||
v := ""
|
||||
return protoreflect.ValueOfString(v)
|
||||
}
|
||||
|
||||
func (x *_Scopes_1_list) IsValid() bool {
|
||||
func (x *_Scopes_2_list) IsValid() bool {
|
||||
return x.list != nil
|
||||
}
|
||||
|
||||
var (
|
||||
md_Scopes protoreflect.MessageDescriptor
|
||||
fd_Scopes_scopes protoreflect.FieldDescriptor
|
||||
md_Scopes protoreflect.MessageDescriptor
|
||||
fd_Scopes_base protoreflect.FieldDescriptor
|
||||
fd_Scopes_supported protoreflect.FieldDescriptor
|
||||
)
|
||||
|
||||
func init() {
|
||||
file_macaroon_v1_genesis_proto_init()
|
||||
md_Scopes = File_macaroon_v1_genesis_proto.Messages().ByName("Scopes")
|
||||
fd_Scopes_scopes = md_Scopes.Fields().ByName("scopes")
|
||||
fd_Scopes_base = md_Scopes.Fields().ByName("base")
|
||||
fd_Scopes_supported = md_Scopes.Fields().ByName("supported")
|
||||
}
|
||||
|
||||
var _ protoreflect.Message = (*fastReflection_Scopes)(nil)
|
||||
@@ -1644,9 +1710,15 @@ func (x *fastReflection_Scopes) Interface() protoreflect.ProtoMessage {
|
||||
// While iterating, mutating operations may only be performed
|
||||
// on the current field descriptor.
|
||||
func (x *fastReflection_Scopes) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
|
||||
if len(x.Scopes) != 0 {
|
||||
value := protoreflect.ValueOfList(&_Scopes_1_list{list: &x.Scopes})
|
||||
if !f(fd_Scopes_scopes, value) {
|
||||
if x.Base != "" {
|
||||
value := protoreflect.ValueOfString(x.Base)
|
||||
if !f(fd_Scopes_base, value) {
|
||||
return
|
||||
}
|
||||
}
|
||||
if len(x.Supported) != 0 {
|
||||
value := protoreflect.ValueOfList(&_Scopes_2_list{list: &x.Supported})
|
||||
if !f(fd_Scopes_supported, value) {
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -1665,8 +1737,10 @@ func (x *fastReflection_Scopes) Range(f func(protoreflect.FieldDescriptor, proto
|
||||
// a repeated field is populated if it is non-empty.
|
||||
func (x *fastReflection_Scopes) Has(fd protoreflect.FieldDescriptor) bool {
|
||||
switch fd.FullName() {
|
||||
case "macaroon.v1.Scopes.scopes":
|
||||
return len(x.Scopes) != 0
|
||||
case "macaroon.v1.Scopes.base":
|
||||
return x.Base != ""
|
||||
case "macaroon.v1.Scopes.supported":
|
||||
return len(x.Supported) != 0
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.v1.Scopes"))
|
||||
@@ -1683,8 +1757,10 @@ func (x *fastReflection_Scopes) Has(fd protoreflect.FieldDescriptor) bool {
|
||||
// Clear is a mutating operation and unsafe for concurrent use.
|
||||
func (x *fastReflection_Scopes) Clear(fd protoreflect.FieldDescriptor) {
|
||||
switch fd.FullName() {
|
||||
case "macaroon.v1.Scopes.scopes":
|
||||
x.Scopes = nil
|
||||
case "macaroon.v1.Scopes.base":
|
||||
x.Base = ""
|
||||
case "macaroon.v1.Scopes.supported":
|
||||
x.Supported = nil
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.v1.Scopes"))
|
||||
@@ -1701,11 +1777,14 @@ func (x *fastReflection_Scopes) Clear(fd protoreflect.FieldDescriptor) {
|
||||
// of the value; to obtain a mutable reference, use Mutable.
|
||||
func (x *fastReflection_Scopes) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch descriptor.FullName() {
|
||||
case "macaroon.v1.Scopes.scopes":
|
||||
if len(x.Scopes) == 0 {
|
||||
return protoreflect.ValueOfList(&_Scopes_1_list{})
|
||||
case "macaroon.v1.Scopes.base":
|
||||
value := x.Base
|
||||
return protoreflect.ValueOfString(value)
|
||||
case "macaroon.v1.Scopes.supported":
|
||||
if len(x.Supported) == 0 {
|
||||
return protoreflect.ValueOfList(&_Scopes_2_list{})
|
||||
}
|
||||
listValue := &_Scopes_1_list{list: &x.Scopes}
|
||||
listValue := &_Scopes_2_list{list: &x.Supported}
|
||||
return protoreflect.ValueOfList(listValue)
|
||||
default:
|
||||
if descriptor.IsExtension() {
|
||||
@@ -1727,10 +1806,12 @@ func (x *fastReflection_Scopes) Get(descriptor protoreflect.FieldDescriptor) pro
|
||||
// Set is a mutating operation and unsafe for concurrent use.
|
||||
func (x *fastReflection_Scopes) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
|
||||
switch fd.FullName() {
|
||||
case "macaroon.v1.Scopes.scopes":
|
||||
case "macaroon.v1.Scopes.base":
|
||||
x.Base = value.Interface().(string)
|
||||
case "macaroon.v1.Scopes.supported":
|
||||
lv := value.List()
|
||||
clv := lv.(*_Scopes_1_list)
|
||||
x.Scopes = *clv.list
|
||||
clv := lv.(*_Scopes_2_list)
|
||||
x.Supported = *clv.list
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.v1.Scopes"))
|
||||
@@ -1751,12 +1832,14 @@ func (x *fastReflection_Scopes) Set(fd protoreflect.FieldDescriptor, value proto
|
||||
// Mutable is a mutating operation and unsafe for concurrent use.
|
||||
func (x *fastReflection_Scopes) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch fd.FullName() {
|
||||
case "macaroon.v1.Scopes.scopes":
|
||||
if x.Scopes == nil {
|
||||
x.Scopes = []string{}
|
||||
case "macaroon.v1.Scopes.supported":
|
||||
if x.Supported == nil {
|
||||
x.Supported = []string{}
|
||||
}
|
||||
value := &_Scopes_1_list{list: &x.Scopes}
|
||||
value := &_Scopes_2_list{list: &x.Supported}
|
||||
return protoreflect.ValueOfList(value)
|
||||
case "macaroon.v1.Scopes.base":
|
||||
panic(fmt.Errorf("field base of message macaroon.v1.Scopes is not mutable"))
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.v1.Scopes"))
|
||||
@@ -1770,9 +1853,11 @@ func (x *fastReflection_Scopes) Mutable(fd protoreflect.FieldDescriptor) protore
|
||||
// For lists, maps, and messages, this returns a new, empty, mutable value.
|
||||
func (x *fastReflection_Scopes) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch fd.FullName() {
|
||||
case "macaroon.v1.Scopes.scopes":
|
||||
case "macaroon.v1.Scopes.base":
|
||||
return protoreflect.ValueOfString("")
|
||||
case "macaroon.v1.Scopes.supported":
|
||||
list := []string{}
|
||||
return protoreflect.ValueOfList(&_Scopes_1_list{list: &list})
|
||||
return protoreflect.ValueOfList(&_Scopes_2_list{list: &list})
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.v1.Scopes"))
|
||||
@@ -1842,8 +1927,12 @@ func (x *fastReflection_Scopes) ProtoMethods() *protoiface.Methods {
|
||||
var n int
|
||||
var l int
|
||||
_ = l
|
||||
if len(x.Scopes) > 0 {
|
||||
for _, s := range x.Scopes {
|
||||
l = len(x.Base)
|
||||
if l > 0 {
|
||||
n += 1 + l + runtime.Sov(uint64(l))
|
||||
}
|
||||
if len(x.Supported) > 0 {
|
||||
for _, s := range x.Supported {
|
||||
l = len(s)
|
||||
n += 1 + l + runtime.Sov(uint64(l))
|
||||
}
|
||||
@@ -1877,15 +1966,22 @@ func (x *fastReflection_Scopes) ProtoMethods() *protoiface.Methods {
|
||||
i -= len(x.unknownFields)
|
||||
copy(dAtA[i:], x.unknownFields)
|
||||
}
|
||||
if len(x.Scopes) > 0 {
|
||||
for iNdEx := len(x.Scopes) - 1; iNdEx >= 0; iNdEx-- {
|
||||
i -= len(x.Scopes[iNdEx])
|
||||
copy(dAtA[i:], x.Scopes[iNdEx])
|
||||
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Scopes[iNdEx])))
|
||||
if len(x.Supported) > 0 {
|
||||
for iNdEx := len(x.Supported) - 1; iNdEx >= 0; iNdEx-- {
|
||||
i -= len(x.Supported[iNdEx])
|
||||
copy(dAtA[i:], x.Supported[iNdEx])
|
||||
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Supported[iNdEx])))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
dAtA[i] = 0x12
|
||||
}
|
||||
}
|
||||
if len(x.Base) > 0 {
|
||||
i -= len(x.Base)
|
||||
copy(dAtA[i:], x.Base)
|
||||
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Base)))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
if input.Buf != nil {
|
||||
input.Buf = append(input.Buf, dAtA...)
|
||||
} else {
|
||||
@@ -1937,7 +2033,7 @@ func (x *fastReflection_Scopes) ProtoMethods() *protoiface.Methods {
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Scopes", wireType)
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Base", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
@@ -1965,7 +2061,39 @@ func (x *fastReflection_Scopes) ProtoMethods() *protoiface.Methods {
|
||||
if postIndex > l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
x.Scopes = append(x.Scopes, string(dAtA[iNdEx:postIndex]))
|
||||
x.Base = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Supported", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||
}
|
||||
if postIndex > l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
x.Supported = append(x.Supported, string(dAtA[iNdEx:postIndex]))
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
@@ -2032,7 +2160,7 @@ func (x *_Caveats_1_list) Append(value protoreflect.Value) {
|
||||
}
|
||||
|
||||
func (x *_Caveats_1_list) AppendMutable() protoreflect.Value {
|
||||
panic(fmt.Errorf("AppendMutable can not be called on message Caveats at list field Caveats as it is not of Message kind"))
|
||||
panic(fmt.Errorf("AppendMutable can not be called on message Caveats at list field SupportedFirstParty as it is not of Message kind"))
|
||||
}
|
||||
|
||||
func (x *_Caveats_1_list) Truncate(n int) {
|
||||
@@ -2048,15 +2176,63 @@ func (x *_Caveats_1_list) IsValid() bool {
|
||||
return x.list != nil
|
||||
}
|
||||
|
||||
var _ protoreflect.List = (*_Caveats_2_list)(nil)
|
||||
|
||||
type _Caveats_2_list struct {
|
||||
list *[]string
|
||||
}
|
||||
|
||||
func (x *_Caveats_2_list) Len() int {
|
||||
if x.list == nil {
|
||||
return 0
|
||||
}
|
||||
return len(*x.list)
|
||||
}
|
||||
|
||||
func (x *_Caveats_2_list) Get(i int) protoreflect.Value {
|
||||
return protoreflect.ValueOfString((*x.list)[i])
|
||||
}
|
||||
|
||||
func (x *_Caveats_2_list) Set(i int, value protoreflect.Value) {
|
||||
valueUnwrapped := value.String()
|
||||
concreteValue := valueUnwrapped
|
||||
(*x.list)[i] = concreteValue
|
||||
}
|
||||
|
||||
func (x *_Caveats_2_list) Append(value protoreflect.Value) {
|
||||
valueUnwrapped := value.String()
|
||||
concreteValue := valueUnwrapped
|
||||
*x.list = append(*x.list, concreteValue)
|
||||
}
|
||||
|
||||
func (x *_Caveats_2_list) AppendMutable() protoreflect.Value {
|
||||
panic(fmt.Errorf("AppendMutable can not be called on message Caveats at list field SupportedThirdParty as it is not of Message kind"))
|
||||
}
|
||||
|
||||
func (x *_Caveats_2_list) Truncate(n int) {
|
||||
*x.list = (*x.list)[:n]
|
||||
}
|
||||
|
||||
func (x *_Caveats_2_list) NewElement() protoreflect.Value {
|
||||
v := ""
|
||||
return protoreflect.ValueOfString(v)
|
||||
}
|
||||
|
||||
func (x *_Caveats_2_list) IsValid() bool {
|
||||
return x.list != nil
|
||||
}
|
||||
|
||||
var (
|
||||
md_Caveats protoreflect.MessageDescriptor
|
||||
fd_Caveats_caveats protoreflect.FieldDescriptor
|
||||
md_Caveats protoreflect.MessageDescriptor
|
||||
fd_Caveats_supported_first_party protoreflect.FieldDescriptor
|
||||
fd_Caveats_supported_third_party protoreflect.FieldDescriptor
|
||||
)
|
||||
|
||||
func init() {
|
||||
file_macaroon_v1_genesis_proto_init()
|
||||
md_Caveats = File_macaroon_v1_genesis_proto.Messages().ByName("Caveats")
|
||||
fd_Caveats_caveats = md_Caveats.Fields().ByName("caveats")
|
||||
fd_Caveats_supported_first_party = md_Caveats.Fields().ByName("supported_first_party")
|
||||
fd_Caveats_supported_third_party = md_Caveats.Fields().ByName("supported_third_party")
|
||||
}
|
||||
|
||||
var _ protoreflect.Message = (*fastReflection_Caveats)(nil)
|
||||
@@ -2124,9 +2300,15 @@ func (x *fastReflection_Caveats) Interface() protoreflect.ProtoMessage {
|
||||
// While iterating, mutating operations may only be performed
|
||||
// on the current field descriptor.
|
||||
func (x *fastReflection_Caveats) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
|
||||
if len(x.Caveats) != 0 {
|
||||
value := protoreflect.ValueOfList(&_Caveats_1_list{list: &x.Caveats})
|
||||
if !f(fd_Caveats_caveats, value) {
|
||||
if len(x.SupportedFirstParty) != 0 {
|
||||
value := protoreflect.ValueOfList(&_Caveats_1_list{list: &x.SupportedFirstParty})
|
||||
if !f(fd_Caveats_supported_first_party, value) {
|
||||
return
|
||||
}
|
||||
}
|
||||
if len(x.SupportedThirdParty) != 0 {
|
||||
value := protoreflect.ValueOfList(&_Caveats_2_list{list: &x.SupportedThirdParty})
|
||||
if !f(fd_Caveats_supported_third_party, value) {
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -2145,8 +2327,10 @@ func (x *fastReflection_Caveats) Range(f func(protoreflect.FieldDescriptor, prot
|
||||
// a repeated field is populated if it is non-empty.
|
||||
func (x *fastReflection_Caveats) Has(fd protoreflect.FieldDescriptor) bool {
|
||||
switch fd.FullName() {
|
||||
case "macaroon.v1.Caveats.caveats":
|
||||
return len(x.Caveats) != 0
|
||||
case "macaroon.v1.Caveats.supported_first_party":
|
||||
return len(x.SupportedFirstParty) != 0
|
||||
case "macaroon.v1.Caveats.supported_third_party":
|
||||
return len(x.SupportedThirdParty) != 0
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.v1.Caveats"))
|
||||
@@ -2163,8 +2347,10 @@ func (x *fastReflection_Caveats) Has(fd protoreflect.FieldDescriptor) bool {
|
||||
// Clear is a mutating operation and unsafe for concurrent use.
|
||||
func (x *fastReflection_Caveats) Clear(fd protoreflect.FieldDescriptor) {
|
||||
switch fd.FullName() {
|
||||
case "macaroon.v1.Caveats.caveats":
|
||||
x.Caveats = nil
|
||||
case "macaroon.v1.Caveats.supported_first_party":
|
||||
x.SupportedFirstParty = nil
|
||||
case "macaroon.v1.Caveats.supported_third_party":
|
||||
x.SupportedThirdParty = nil
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.v1.Caveats"))
|
||||
@@ -2181,11 +2367,17 @@ func (x *fastReflection_Caveats) Clear(fd protoreflect.FieldDescriptor) {
|
||||
// of the value; to obtain a mutable reference, use Mutable.
|
||||
func (x *fastReflection_Caveats) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch descriptor.FullName() {
|
||||
case "macaroon.v1.Caveats.caveats":
|
||||
if len(x.Caveats) == 0 {
|
||||
case "macaroon.v1.Caveats.supported_first_party":
|
||||
if len(x.SupportedFirstParty) == 0 {
|
||||
return protoreflect.ValueOfList(&_Caveats_1_list{})
|
||||
}
|
||||
listValue := &_Caveats_1_list{list: &x.Caveats}
|
||||
listValue := &_Caveats_1_list{list: &x.SupportedFirstParty}
|
||||
return protoreflect.ValueOfList(listValue)
|
||||
case "macaroon.v1.Caveats.supported_third_party":
|
||||
if len(x.SupportedThirdParty) == 0 {
|
||||
return protoreflect.ValueOfList(&_Caveats_2_list{})
|
||||
}
|
||||
listValue := &_Caveats_2_list{list: &x.SupportedThirdParty}
|
||||
return protoreflect.ValueOfList(listValue)
|
||||
default:
|
||||
if descriptor.IsExtension() {
|
||||
@@ -2207,10 +2399,14 @@ func (x *fastReflection_Caveats) Get(descriptor protoreflect.FieldDescriptor) pr
|
||||
// Set is a mutating operation and unsafe for concurrent use.
|
||||
func (x *fastReflection_Caveats) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
|
||||
switch fd.FullName() {
|
||||
case "macaroon.v1.Caveats.caveats":
|
||||
case "macaroon.v1.Caveats.supported_first_party":
|
||||
lv := value.List()
|
||||
clv := lv.(*_Caveats_1_list)
|
||||
x.Caveats = *clv.list
|
||||
x.SupportedFirstParty = *clv.list
|
||||
case "macaroon.v1.Caveats.supported_third_party":
|
||||
lv := value.List()
|
||||
clv := lv.(*_Caveats_2_list)
|
||||
x.SupportedThirdParty = *clv.list
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.v1.Caveats"))
|
||||
@@ -2231,11 +2427,17 @@ func (x *fastReflection_Caveats) Set(fd protoreflect.FieldDescriptor, value prot
|
||||
// Mutable is a mutating operation and unsafe for concurrent use.
|
||||
func (x *fastReflection_Caveats) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch fd.FullName() {
|
||||
case "macaroon.v1.Caveats.caveats":
|
||||
if x.Caveats == nil {
|
||||
x.Caveats = []string{}
|
||||
case "macaroon.v1.Caveats.supported_first_party":
|
||||
if x.SupportedFirstParty == nil {
|
||||
x.SupportedFirstParty = []string{}
|
||||
}
|
||||
value := &_Caveats_1_list{list: &x.Caveats}
|
||||
value := &_Caveats_1_list{list: &x.SupportedFirstParty}
|
||||
return protoreflect.ValueOfList(value)
|
||||
case "macaroon.v1.Caveats.supported_third_party":
|
||||
if x.SupportedThirdParty == nil {
|
||||
x.SupportedThirdParty = []string{}
|
||||
}
|
||||
value := &_Caveats_2_list{list: &x.SupportedThirdParty}
|
||||
return protoreflect.ValueOfList(value)
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
@@ -2250,9 +2452,12 @@ func (x *fastReflection_Caveats) Mutable(fd protoreflect.FieldDescriptor) protor
|
||||
// For lists, maps, and messages, this returns a new, empty, mutable value.
|
||||
func (x *fastReflection_Caveats) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch fd.FullName() {
|
||||
case "macaroon.v1.Caveats.caveats":
|
||||
case "macaroon.v1.Caveats.supported_first_party":
|
||||
list := []string{}
|
||||
return protoreflect.ValueOfList(&_Caveats_1_list{list: &list})
|
||||
case "macaroon.v1.Caveats.supported_third_party":
|
||||
list := []string{}
|
||||
return protoreflect.ValueOfList(&_Caveats_2_list{list: &list})
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.v1.Caveats"))
|
||||
@@ -2322,8 +2527,14 @@ func (x *fastReflection_Caveats) ProtoMethods() *protoiface.Methods {
|
||||
var n int
|
||||
var l int
|
||||
_ = l
|
||||
if len(x.Caveats) > 0 {
|
||||
for _, s := range x.Caveats {
|
||||
if len(x.SupportedFirstParty) > 0 {
|
||||
for _, s := range x.SupportedFirstParty {
|
||||
l = len(s)
|
||||
n += 1 + l + runtime.Sov(uint64(l))
|
||||
}
|
||||
}
|
||||
if len(x.SupportedThirdParty) > 0 {
|
||||
for _, s := range x.SupportedThirdParty {
|
||||
l = len(s)
|
||||
n += 1 + l + runtime.Sov(uint64(l))
|
||||
}
|
||||
@@ -2357,11 +2568,20 @@ func (x *fastReflection_Caveats) ProtoMethods() *protoiface.Methods {
|
||||
i -= len(x.unknownFields)
|
||||
copy(dAtA[i:], x.unknownFields)
|
||||
}
|
||||
if len(x.Caveats) > 0 {
|
||||
for iNdEx := len(x.Caveats) - 1; iNdEx >= 0; iNdEx-- {
|
||||
i -= len(x.Caveats[iNdEx])
|
||||
copy(dAtA[i:], x.Caveats[iNdEx])
|
||||
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Caveats[iNdEx])))
|
||||
if len(x.SupportedThirdParty) > 0 {
|
||||
for iNdEx := len(x.SupportedThirdParty) - 1; iNdEx >= 0; iNdEx-- {
|
||||
i -= len(x.SupportedThirdParty[iNdEx])
|
||||
copy(dAtA[i:], x.SupportedThirdParty[iNdEx])
|
||||
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SupportedThirdParty[iNdEx])))
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
}
|
||||
}
|
||||
if len(x.SupportedFirstParty) > 0 {
|
||||
for iNdEx := len(x.SupportedFirstParty) - 1; iNdEx >= 0; iNdEx-- {
|
||||
i -= len(x.SupportedFirstParty[iNdEx])
|
||||
copy(dAtA[i:], x.SupportedFirstParty[iNdEx])
|
||||
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SupportedFirstParty[iNdEx])))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
@@ -2417,7 +2637,7 @@ func (x *fastReflection_Caveats) ProtoMethods() *protoiface.Methods {
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Caveats", wireType)
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SupportedFirstParty", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
@@ -2445,7 +2665,39 @@ func (x *fastReflection_Caveats) ProtoMethods() *protoiface.Methods {
|
||||
if postIndex > l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
x.Caveats = append(x.Caveats, string(dAtA[iNdEx:postIndex]))
|
||||
x.SupportedFirstParty = append(x.SupportedFirstParty, string(dAtA[iNdEx:postIndex]))
|
||||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SupportedThirdParty", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||
}
|
||||
if postIndex > l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
x.SupportedThirdParty = append(x.SupportedThirdParty, string(dAtA[iNdEx:postIndex]))
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
@@ -2593,7 +2845,8 @@ type Methods struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Methods []string `protobuf:"bytes,1,rep,name=methods,proto3" json:"methods,omitempty"`
|
||||
Default string `protobuf:"bytes,1,opt,name=default,proto3" json:"default,omitempty"`
|
||||
Supported []string `protobuf:"bytes,2,rep,name=supported,proto3" json:"supported,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Methods) Reset() {
|
||||
@@ -2616,9 +2869,16 @@ func (*Methods) Descriptor() ([]byte, []int) {
|
||||
return file_macaroon_v1_genesis_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *Methods) GetMethods() []string {
|
||||
func (x *Methods) GetDefault() string {
|
||||
if x != nil {
|
||||
return x.Methods
|
||||
return x.Default
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Methods) GetSupported() []string {
|
||||
if x != nil {
|
||||
return x.Supported
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -2629,7 +2889,8 @@ type Scopes struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Scopes []string `protobuf:"bytes,1,rep,name=scopes,proto3" json:"scopes,omitempty"`
|
||||
Base string `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"`
|
||||
Supported []string `protobuf:"bytes,2,rep,name=supported,proto3" json:"supported,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Scopes) Reset() {
|
||||
@@ -2652,9 +2913,16 @@ func (*Scopes) Descriptor() ([]byte, []int) {
|
||||
return file_macaroon_v1_genesis_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *Scopes) GetScopes() []string {
|
||||
func (x *Scopes) GetBase() string {
|
||||
if x != nil {
|
||||
return x.Scopes
|
||||
return x.Base
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Scopes) GetSupported() []string {
|
||||
if x != nil {
|
||||
return x.Supported
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -2665,7 +2933,8 @@ type Caveats struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Caveats []string `protobuf:"bytes,1,rep,name=caveats,proto3" json:"caveats,omitempty"`
|
||||
SupportedFirstParty []string `protobuf:"bytes,1,rep,name=supported_first_party,json=supportedFirstParty,proto3" json:"supported_first_party,omitempty"`
|
||||
SupportedThirdParty []string `protobuf:"bytes,2,rep,name=supported_third_party,json=supportedThirdParty,proto3" json:"supported_third_party,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Caveats) Reset() {
|
||||
@@ -2688,9 +2957,16 @@ func (*Caveats) Descriptor() ([]byte, []int) {
|
||||
return file_macaroon_v1_genesis_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *Caveats) GetCaveats() []string {
|
||||
func (x *Caveats) GetSupportedFirstParty() []string {
|
||||
if x != nil {
|
||||
return x.Caveats
|
||||
return x.SupportedFirstParty
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Caveats) GetSupportedThirdParty() []string {
|
||||
if x != nil {
|
||||
return x.SupportedThirdParty
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -2718,29 +2994,38 @@ var file_macaroon_v1_genesis_proto_rawDesc = []byte{
|
||||
0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x76, 0x65,
|
||||
0x61, 0x74, 0x73, 0x52, 0x07, 0x63, 0x61, 0x76, 0x65, 0x61, 0x74, 0x73, 0x3a, 0x1c, 0x98, 0xa0,
|
||||
0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0f, 0x6d, 0x61, 0x63, 0x61, 0x72,
|
||||
0x6f, 0x6f, 0x6e, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x3e, 0x0a, 0x07, 0x4d, 0x65,
|
||||
0x74, 0x68, 0x6f, 0x64, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73,
|
||||
0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x3a,
|
||||
0x19, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x10, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f,
|
||||
0x6f, 0x6e, 0x2f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x22, 0x3a, 0x0a, 0x06, 0x53, 0x63,
|
||||
0x6f, 0x70, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x01,
|
||||
0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x3a, 0x18, 0xe8, 0xa0,
|
||||
0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0f, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2f,
|
||||
0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x22, 0x3d, 0x0a, 0x07, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74,
|
||||
0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x61, 0x76, 0x65, 0x61, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03,
|
||||
0x28, 0x09, 0x52, 0x07, 0x63, 0x61, 0x76, 0x65, 0x61, 0x74, 0x73, 0x3a, 0x18, 0xe8, 0xa0, 0x1f,
|
||||
0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0f, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2f, 0x63,
|
||||
0x61, 0x76, 0x65, 0x61, 0x74, 0x42, 0x9f, 0x01, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61,
|
||||
0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73,
|
||||
0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75,
|
||||
0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e,
|
||||
0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2f, 0x76,
|
||||
0x31, 0x3b, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d,
|
||||
0x58, 0x58, 0xaa, 0x02, 0x0b, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2e, 0x56, 0x31,
|
||||
0xca, 0x02, 0x0b, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0xe2, 0x02,
|
||||
0x17, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42,
|
||||
0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0c, 0x4d, 0x61, 0x63, 0x61, 0x72,
|
||||
0x6f, 0x6f, 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x6f, 0x6f, 0x6e, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x5c, 0x0a, 0x07, 0x4d, 0x65,
|
||||
0x74, 0x68, 0x6f, 0x64, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12,
|
||||
0x1c, 0x0a, 0x09, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x03,
|
||||
0x28, 0x09, 0x52, 0x09, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x3a, 0x19, 0xe8,
|
||||
0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x10, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e,
|
||||
0x2f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x22, 0x54, 0x0a, 0x06, 0x53, 0x63, 0x6f, 0x70,
|
||||
0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x04, 0x62, 0x61, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72,
|
||||
0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x73, 0x75, 0x70, 0x70, 0x6f,
|
||||
0x72, 0x74, 0x65, 0x64, 0x3a, 0x18, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0f, 0x6d,
|
||||
0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x22, 0x8b,
|
||||
0x01, 0x0a, 0x07, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x73, 0x75,
|
||||
0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x70, 0x61,
|
||||
0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x13, 0x73, 0x75, 0x70, 0x70, 0x6f,
|
||||
0x72, 0x74, 0x65, 0x64, 0x46, 0x69, 0x72, 0x73, 0x74, 0x50, 0x61, 0x72, 0x74, 0x79, 0x12, 0x32,
|
||||
0x0a, 0x15, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x68, 0x69, 0x72,
|
||||
0x64, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x13, 0x73,
|
||||
0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x54, 0x68, 0x69, 0x72, 0x64, 0x50, 0x61, 0x72,
|
||||
0x74, 0x79, 0x3a, 0x18, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0f, 0x6d, 0x61, 0x63,
|
||||
0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2f, 0x63, 0x61, 0x76, 0x65, 0x61, 0x74, 0x42, 0x9f, 0x01, 0x0a,
|
||||
0x0f, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2e, 0x76, 0x31,
|
||||
0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01,
|
||||
0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73,
|
||||
0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x63,
|
||||
0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f,
|
||||
0x6e, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x0b, 0x4d, 0x61, 0x63, 0x61,
|
||||
0x72, 0x6f, 0x6f, 0x6e, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0b, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f,
|
||||
0x6f, 0x6e, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x17, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e,
|
||||
0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea,
|
||||
0x02, 0x0c, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
@@ -176,20 +176,193 @@ func NewGrantTable(db ormtable.Schema) (GrantTable, error) {
|
||||
return grantTable{table.(ormtable.AutoIncrementTable)}, nil
|
||||
}
|
||||
|
||||
type MacaroonTable interface {
|
||||
Insert(ctx context.Context, macaroon *Macaroon) error
|
||||
InsertReturningId(ctx context.Context, macaroon *Macaroon) (uint64, error)
|
||||
LastInsertedSequence(ctx context.Context) (uint64, error)
|
||||
Update(ctx context.Context, macaroon *Macaroon) error
|
||||
Save(ctx context.Context, macaroon *Macaroon) error
|
||||
Delete(ctx context.Context, macaroon *Macaroon) error
|
||||
Has(ctx context.Context, id uint64) (found bool, err error)
|
||||
// Get returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
||||
Get(ctx context.Context, id uint64) (*Macaroon, error)
|
||||
HasBySubjectOrigin(ctx context.Context, subject string, origin string) (found bool, err error)
|
||||
// GetBySubjectOrigin returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
||||
GetBySubjectOrigin(ctx context.Context, subject string, origin string) (*Macaroon, error)
|
||||
List(ctx context.Context, prefixKey MacaroonIndexKey, opts ...ormlist.Option) (MacaroonIterator, error)
|
||||
ListRange(ctx context.Context, from, to MacaroonIndexKey, opts ...ormlist.Option) (MacaroonIterator, error)
|
||||
DeleteBy(ctx context.Context, prefixKey MacaroonIndexKey) error
|
||||
DeleteRange(ctx context.Context, from, to MacaroonIndexKey) error
|
||||
|
||||
doNotImplement()
|
||||
}
|
||||
|
||||
type MacaroonIterator struct {
|
||||
ormtable.Iterator
|
||||
}
|
||||
|
||||
func (i MacaroonIterator) Value() (*Macaroon, error) {
|
||||
var macaroon Macaroon
|
||||
err := i.UnmarshalMessage(&macaroon)
|
||||
return &macaroon, err
|
||||
}
|
||||
|
||||
type MacaroonIndexKey interface {
|
||||
id() uint32
|
||||
values() []interface{}
|
||||
macaroonIndexKey()
|
||||
}
|
||||
|
||||
// primary key starting index..
|
||||
type MacaroonPrimaryKey = MacaroonIdIndexKey
|
||||
|
||||
type MacaroonIdIndexKey struct {
|
||||
vs []interface{}
|
||||
}
|
||||
|
||||
func (x MacaroonIdIndexKey) id() uint32 { return 0 }
|
||||
func (x MacaroonIdIndexKey) values() []interface{} { return x.vs }
|
||||
func (x MacaroonIdIndexKey) macaroonIndexKey() {}
|
||||
|
||||
func (this MacaroonIdIndexKey) WithId(id uint64) MacaroonIdIndexKey {
|
||||
this.vs = []interface{}{id}
|
||||
return this
|
||||
}
|
||||
|
||||
type MacaroonSubjectOriginIndexKey struct {
|
||||
vs []interface{}
|
||||
}
|
||||
|
||||
func (x MacaroonSubjectOriginIndexKey) id() uint32 { return 1 }
|
||||
func (x MacaroonSubjectOriginIndexKey) values() []interface{} { return x.vs }
|
||||
func (x MacaroonSubjectOriginIndexKey) macaroonIndexKey() {}
|
||||
|
||||
func (this MacaroonSubjectOriginIndexKey) WithSubject(subject string) MacaroonSubjectOriginIndexKey {
|
||||
this.vs = []interface{}{subject}
|
||||
return this
|
||||
}
|
||||
|
||||
func (this MacaroonSubjectOriginIndexKey) WithSubjectOrigin(subject string, origin string) MacaroonSubjectOriginIndexKey {
|
||||
this.vs = []interface{}{subject, origin}
|
||||
return this
|
||||
}
|
||||
|
||||
type macaroonTable struct {
|
||||
table ormtable.AutoIncrementTable
|
||||
}
|
||||
|
||||
func (this macaroonTable) Insert(ctx context.Context, macaroon *Macaroon) error {
|
||||
return this.table.Insert(ctx, macaroon)
|
||||
}
|
||||
|
||||
func (this macaroonTable) Update(ctx context.Context, macaroon *Macaroon) error {
|
||||
return this.table.Update(ctx, macaroon)
|
||||
}
|
||||
|
||||
func (this macaroonTable) Save(ctx context.Context, macaroon *Macaroon) error {
|
||||
return this.table.Save(ctx, macaroon)
|
||||
}
|
||||
|
||||
func (this macaroonTable) Delete(ctx context.Context, macaroon *Macaroon) error {
|
||||
return this.table.Delete(ctx, macaroon)
|
||||
}
|
||||
|
||||
func (this macaroonTable) InsertReturningId(ctx context.Context, macaroon *Macaroon) (uint64, error) {
|
||||
return this.table.InsertReturningPKey(ctx, macaroon)
|
||||
}
|
||||
|
||||
func (this macaroonTable) LastInsertedSequence(ctx context.Context) (uint64, error) {
|
||||
return this.table.LastInsertedSequence(ctx)
|
||||
}
|
||||
|
||||
func (this macaroonTable) Has(ctx context.Context, id uint64) (found bool, err error) {
|
||||
return this.table.PrimaryKey().Has(ctx, id)
|
||||
}
|
||||
|
||||
func (this macaroonTable) Get(ctx context.Context, id uint64) (*Macaroon, error) {
|
||||
var macaroon Macaroon
|
||||
found, err := this.table.PrimaryKey().Get(ctx, &macaroon, id)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !found {
|
||||
return nil, ormerrors.NotFound
|
||||
}
|
||||
return &macaroon, nil
|
||||
}
|
||||
|
||||
func (this macaroonTable) HasBySubjectOrigin(ctx context.Context, subject string, origin string) (found bool, err error) {
|
||||
return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx,
|
||||
subject,
|
||||
origin,
|
||||
)
|
||||
}
|
||||
|
||||
func (this macaroonTable) GetBySubjectOrigin(ctx context.Context, subject string, origin string) (*Macaroon, error) {
|
||||
var macaroon Macaroon
|
||||
found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &macaroon,
|
||||
subject,
|
||||
origin,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !found {
|
||||
return nil, ormerrors.NotFound
|
||||
}
|
||||
return &macaroon, nil
|
||||
}
|
||||
|
||||
func (this macaroonTable) List(ctx context.Context, prefixKey MacaroonIndexKey, opts ...ormlist.Option) (MacaroonIterator, error) {
|
||||
it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...)
|
||||
return MacaroonIterator{it}, err
|
||||
}
|
||||
|
||||
func (this macaroonTable) ListRange(ctx context.Context, from, to MacaroonIndexKey, opts ...ormlist.Option) (MacaroonIterator, error) {
|
||||
it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...)
|
||||
return MacaroonIterator{it}, err
|
||||
}
|
||||
|
||||
func (this macaroonTable) DeleteBy(ctx context.Context, prefixKey MacaroonIndexKey) error {
|
||||
return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...)
|
||||
}
|
||||
|
||||
func (this macaroonTable) DeleteRange(ctx context.Context, from, to MacaroonIndexKey) error {
|
||||
return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values())
|
||||
}
|
||||
|
||||
func (this macaroonTable) doNotImplement() {}
|
||||
|
||||
var _ MacaroonTable = macaroonTable{}
|
||||
|
||||
func NewMacaroonTable(db ormtable.Schema) (MacaroonTable, error) {
|
||||
table := db.GetTable(&Macaroon{})
|
||||
if table == nil {
|
||||
return nil, ormerrors.TableNotFound.Wrap(string((&Macaroon{}).ProtoReflect().Descriptor().FullName()))
|
||||
}
|
||||
return macaroonTable{table.(ormtable.AutoIncrementTable)}, nil
|
||||
}
|
||||
|
||||
type StateStore interface {
|
||||
GrantTable() GrantTable
|
||||
MacaroonTable() MacaroonTable
|
||||
|
||||
doNotImplement()
|
||||
}
|
||||
|
||||
type stateStore struct {
|
||||
grant GrantTable
|
||||
grant GrantTable
|
||||
macaroon MacaroonTable
|
||||
}
|
||||
|
||||
func (x stateStore) GrantTable() GrantTable {
|
||||
return x.grant
|
||||
}
|
||||
|
||||
func (x stateStore) MacaroonTable() MacaroonTable {
|
||||
return x.macaroon
|
||||
}
|
||||
|
||||
func (stateStore) doNotImplement() {}
|
||||
|
||||
var _ StateStore = stateStore{}
|
||||
@@ -200,7 +373,13 @@ func NewStateStore(db ormtable.Schema) (StateStore, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
macaroonTable, err := NewMacaroonTable(db)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return stateStore{
|
||||
grantTable,
|
||||
macaroonTable,
|
||||
}, nil
|
||||
}
|
||||
|
||||
+824
-14
@@ -657,6 +657,714 @@ func (x *fastReflection_Grant) ProtoMethods() *protoiface.Methods {
|
||||
}
|
||||
}
|
||||
|
||||
var (
|
||||
md_Macaroon protoreflect.MessageDescriptor
|
||||
fd_Macaroon_id protoreflect.FieldDescriptor
|
||||
fd_Macaroon_controller protoreflect.FieldDescriptor
|
||||
fd_Macaroon_subject protoreflect.FieldDescriptor
|
||||
fd_Macaroon_origin protoreflect.FieldDescriptor
|
||||
fd_Macaroon_expiry_height protoreflect.FieldDescriptor
|
||||
fd_Macaroon_macaroon protoreflect.FieldDescriptor
|
||||
)
|
||||
|
||||
func init() {
|
||||
file_macaroon_v1_state_proto_init()
|
||||
md_Macaroon = File_macaroon_v1_state_proto.Messages().ByName("Macaroon")
|
||||
fd_Macaroon_id = md_Macaroon.Fields().ByName("id")
|
||||
fd_Macaroon_controller = md_Macaroon.Fields().ByName("controller")
|
||||
fd_Macaroon_subject = md_Macaroon.Fields().ByName("subject")
|
||||
fd_Macaroon_origin = md_Macaroon.Fields().ByName("origin")
|
||||
fd_Macaroon_expiry_height = md_Macaroon.Fields().ByName("expiry_height")
|
||||
fd_Macaroon_macaroon = md_Macaroon.Fields().ByName("macaroon")
|
||||
}
|
||||
|
||||
var _ protoreflect.Message = (*fastReflection_Macaroon)(nil)
|
||||
|
||||
type fastReflection_Macaroon Macaroon
|
||||
|
||||
func (x *Macaroon) ProtoReflect() protoreflect.Message {
|
||||
return (*fastReflection_Macaroon)(x)
|
||||
}
|
||||
|
||||
func (x *Macaroon) slowProtoReflect() protoreflect.Message {
|
||||
mi := &file_macaroon_v1_state_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
var _fastReflection_Macaroon_messageType fastReflection_Macaroon_messageType
|
||||
var _ protoreflect.MessageType = fastReflection_Macaroon_messageType{}
|
||||
|
||||
type fastReflection_Macaroon_messageType struct{}
|
||||
|
||||
func (x fastReflection_Macaroon_messageType) Zero() protoreflect.Message {
|
||||
return (*fastReflection_Macaroon)(nil)
|
||||
}
|
||||
func (x fastReflection_Macaroon_messageType) New() protoreflect.Message {
|
||||
return new(fastReflection_Macaroon)
|
||||
}
|
||||
func (x fastReflection_Macaroon_messageType) Descriptor() protoreflect.MessageDescriptor {
|
||||
return md_Macaroon
|
||||
}
|
||||
|
||||
// Descriptor returns message descriptor, which contains only the protobuf
|
||||
// type information for the message.
|
||||
func (x *fastReflection_Macaroon) Descriptor() protoreflect.MessageDescriptor {
|
||||
return md_Macaroon
|
||||
}
|
||||
|
||||
// Type returns the message type, which encapsulates both Go and protobuf
|
||||
// type information. If the Go type information is not needed,
|
||||
// it is recommended that the message descriptor be used instead.
|
||||
func (x *fastReflection_Macaroon) Type() protoreflect.MessageType {
|
||||
return _fastReflection_Macaroon_messageType
|
||||
}
|
||||
|
||||
// New returns a newly allocated and mutable empty message.
|
||||
func (x *fastReflection_Macaroon) New() protoreflect.Message {
|
||||
return new(fastReflection_Macaroon)
|
||||
}
|
||||
|
||||
// Interface unwraps the message reflection interface and
|
||||
// returns the underlying ProtoMessage interface.
|
||||
func (x *fastReflection_Macaroon) Interface() protoreflect.ProtoMessage {
|
||||
return (*Macaroon)(x)
|
||||
}
|
||||
|
||||
// Range iterates over every populated field in an undefined order,
|
||||
// calling f for each field descriptor and value encountered.
|
||||
// Range returns immediately if f returns false.
|
||||
// While iterating, mutating operations may only be performed
|
||||
// on the current field descriptor.
|
||||
func (x *fastReflection_Macaroon) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
|
||||
if x.Id != uint64(0) {
|
||||
value := protoreflect.ValueOfUint64(x.Id)
|
||||
if !f(fd_Macaroon_id, value) {
|
||||
return
|
||||
}
|
||||
}
|
||||
if x.Controller != "" {
|
||||
value := protoreflect.ValueOfString(x.Controller)
|
||||
if !f(fd_Macaroon_controller, value) {
|
||||
return
|
||||
}
|
||||
}
|
||||
if x.Subject != "" {
|
||||
value := protoreflect.ValueOfString(x.Subject)
|
||||
if !f(fd_Macaroon_subject, value) {
|
||||
return
|
||||
}
|
||||
}
|
||||
if x.Origin != "" {
|
||||
value := protoreflect.ValueOfString(x.Origin)
|
||||
if !f(fd_Macaroon_origin, value) {
|
||||
return
|
||||
}
|
||||
}
|
||||
if x.ExpiryHeight != int64(0) {
|
||||
value := protoreflect.ValueOfInt64(x.ExpiryHeight)
|
||||
if !f(fd_Macaroon_expiry_height, value) {
|
||||
return
|
||||
}
|
||||
}
|
||||
if x.Macaroon != "" {
|
||||
value := protoreflect.ValueOfString(x.Macaroon)
|
||||
if !f(fd_Macaroon_macaroon, value) {
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Has reports whether a field is populated.
|
||||
//
|
||||
// Some fields have the property of nullability where it is possible to
|
||||
// distinguish between the default value of a field and whether the field
|
||||
// was explicitly populated with the default value. Singular message fields,
|
||||
// member fields of a oneof, and proto2 scalar fields are nullable. Such
|
||||
// fields are populated only if explicitly set.
|
||||
//
|
||||
// In other cases (aside from the nullable cases above),
|
||||
// a proto3 scalar field is populated if it contains a non-zero value, and
|
||||
// a repeated field is populated if it is non-empty.
|
||||
func (x *fastReflection_Macaroon) Has(fd protoreflect.FieldDescriptor) bool {
|
||||
switch fd.FullName() {
|
||||
case "macaroon.v1.Macaroon.id":
|
||||
return x.Id != uint64(0)
|
||||
case "macaroon.v1.Macaroon.controller":
|
||||
return x.Controller != ""
|
||||
case "macaroon.v1.Macaroon.subject":
|
||||
return x.Subject != ""
|
||||
case "macaroon.v1.Macaroon.origin":
|
||||
return x.Origin != ""
|
||||
case "macaroon.v1.Macaroon.expiry_height":
|
||||
return x.ExpiryHeight != int64(0)
|
||||
case "macaroon.v1.Macaroon.macaroon":
|
||||
return x.Macaroon != ""
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.v1.Macaroon"))
|
||||
}
|
||||
panic(fmt.Errorf("message macaroon.v1.Macaroon does not contain field %s", fd.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
// Clear clears the field such that a subsequent Has call reports false.
|
||||
//
|
||||
// Clearing an extension field clears both the extension type and value
|
||||
// associated with the given field number.
|
||||
//
|
||||
// Clear is a mutating operation and unsafe for concurrent use.
|
||||
func (x *fastReflection_Macaroon) Clear(fd protoreflect.FieldDescriptor) {
|
||||
switch fd.FullName() {
|
||||
case "macaroon.v1.Macaroon.id":
|
||||
x.Id = uint64(0)
|
||||
case "macaroon.v1.Macaroon.controller":
|
||||
x.Controller = ""
|
||||
case "macaroon.v1.Macaroon.subject":
|
||||
x.Subject = ""
|
||||
case "macaroon.v1.Macaroon.origin":
|
||||
x.Origin = ""
|
||||
case "macaroon.v1.Macaroon.expiry_height":
|
||||
x.ExpiryHeight = int64(0)
|
||||
case "macaroon.v1.Macaroon.macaroon":
|
||||
x.Macaroon = ""
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.v1.Macaroon"))
|
||||
}
|
||||
panic(fmt.Errorf("message macaroon.v1.Macaroon does not contain field %s", fd.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
// Get retrieves the value for a field.
|
||||
//
|
||||
// For unpopulated scalars, it returns the default value, where
|
||||
// the default value of a bytes scalar is guaranteed to be a copy.
|
||||
// For unpopulated composite types, it returns an empty, read-only view
|
||||
// of the value; to obtain a mutable reference, use Mutable.
|
||||
func (x *fastReflection_Macaroon) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch descriptor.FullName() {
|
||||
case "macaroon.v1.Macaroon.id":
|
||||
value := x.Id
|
||||
return protoreflect.ValueOfUint64(value)
|
||||
case "macaroon.v1.Macaroon.controller":
|
||||
value := x.Controller
|
||||
return protoreflect.ValueOfString(value)
|
||||
case "macaroon.v1.Macaroon.subject":
|
||||
value := x.Subject
|
||||
return protoreflect.ValueOfString(value)
|
||||
case "macaroon.v1.Macaroon.origin":
|
||||
value := x.Origin
|
||||
return protoreflect.ValueOfString(value)
|
||||
case "macaroon.v1.Macaroon.expiry_height":
|
||||
value := x.ExpiryHeight
|
||||
return protoreflect.ValueOfInt64(value)
|
||||
case "macaroon.v1.Macaroon.macaroon":
|
||||
value := x.Macaroon
|
||||
return protoreflect.ValueOfString(value)
|
||||
default:
|
||||
if descriptor.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.v1.Macaroon"))
|
||||
}
|
||||
panic(fmt.Errorf("message macaroon.v1.Macaroon does not contain field %s", descriptor.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
// Set stores the value for a field.
|
||||
//
|
||||
// For a field belonging to a oneof, it implicitly clears any other field
|
||||
// that may be currently set within the same oneof.
|
||||
// For extension fields, it implicitly stores the provided ExtensionType.
|
||||
// When setting a composite type, it is unspecified whether the stored value
|
||||
// aliases the source's memory in any way. If the composite value is an
|
||||
// empty, read-only value, then it panics.
|
||||
//
|
||||
// Set is a mutating operation and unsafe for concurrent use.
|
||||
func (x *fastReflection_Macaroon) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
|
||||
switch fd.FullName() {
|
||||
case "macaroon.v1.Macaroon.id":
|
||||
x.Id = value.Uint()
|
||||
case "macaroon.v1.Macaroon.controller":
|
||||
x.Controller = value.Interface().(string)
|
||||
case "macaroon.v1.Macaroon.subject":
|
||||
x.Subject = value.Interface().(string)
|
||||
case "macaroon.v1.Macaroon.origin":
|
||||
x.Origin = value.Interface().(string)
|
||||
case "macaroon.v1.Macaroon.expiry_height":
|
||||
x.ExpiryHeight = value.Int()
|
||||
case "macaroon.v1.Macaroon.macaroon":
|
||||
x.Macaroon = value.Interface().(string)
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.v1.Macaroon"))
|
||||
}
|
||||
panic(fmt.Errorf("message macaroon.v1.Macaroon does not contain field %s", fd.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
// Mutable returns a mutable reference to a composite type.
|
||||
//
|
||||
// If the field is unpopulated, it may allocate a composite value.
|
||||
// For a field belonging to a oneof, it implicitly clears any other field
|
||||
// that may be currently set within the same oneof.
|
||||
// For extension fields, it implicitly stores the provided ExtensionType
|
||||
// if not already stored.
|
||||
// It panics if the field does not contain a composite type.
|
||||
//
|
||||
// Mutable is a mutating operation and unsafe for concurrent use.
|
||||
func (x *fastReflection_Macaroon) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch fd.FullName() {
|
||||
case "macaroon.v1.Macaroon.id":
|
||||
panic(fmt.Errorf("field id of message macaroon.v1.Macaroon is not mutable"))
|
||||
case "macaroon.v1.Macaroon.controller":
|
||||
panic(fmt.Errorf("field controller of message macaroon.v1.Macaroon is not mutable"))
|
||||
case "macaroon.v1.Macaroon.subject":
|
||||
panic(fmt.Errorf("field subject of message macaroon.v1.Macaroon is not mutable"))
|
||||
case "macaroon.v1.Macaroon.origin":
|
||||
panic(fmt.Errorf("field origin of message macaroon.v1.Macaroon is not mutable"))
|
||||
case "macaroon.v1.Macaroon.expiry_height":
|
||||
panic(fmt.Errorf("field expiry_height of message macaroon.v1.Macaroon is not mutable"))
|
||||
case "macaroon.v1.Macaroon.macaroon":
|
||||
panic(fmt.Errorf("field macaroon of message macaroon.v1.Macaroon is not mutable"))
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.v1.Macaroon"))
|
||||
}
|
||||
panic(fmt.Errorf("message macaroon.v1.Macaroon does not contain field %s", fd.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
// NewField returns a new value that is assignable to the field
|
||||
// for the given descriptor. For scalars, this returns the default value.
|
||||
// For lists, maps, and messages, this returns a new, empty, mutable value.
|
||||
func (x *fastReflection_Macaroon) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch fd.FullName() {
|
||||
case "macaroon.v1.Macaroon.id":
|
||||
return protoreflect.ValueOfUint64(uint64(0))
|
||||
case "macaroon.v1.Macaroon.controller":
|
||||
return protoreflect.ValueOfString("")
|
||||
case "macaroon.v1.Macaroon.subject":
|
||||
return protoreflect.ValueOfString("")
|
||||
case "macaroon.v1.Macaroon.origin":
|
||||
return protoreflect.ValueOfString("")
|
||||
case "macaroon.v1.Macaroon.expiry_height":
|
||||
return protoreflect.ValueOfInt64(int64(0))
|
||||
case "macaroon.v1.Macaroon.macaroon":
|
||||
return protoreflect.ValueOfString("")
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.v1.Macaroon"))
|
||||
}
|
||||
panic(fmt.Errorf("message macaroon.v1.Macaroon does not contain field %s", fd.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
// WhichOneof reports which field within the oneof is populated,
|
||||
// returning nil if none are populated.
|
||||
// It panics if the oneof descriptor does not belong to this message.
|
||||
func (x *fastReflection_Macaroon) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
||||
switch d.FullName() {
|
||||
default:
|
||||
panic(fmt.Errorf("%s is not a oneof field in macaroon.v1.Macaroon", d.FullName()))
|
||||
}
|
||||
panic("unreachable")
|
||||
}
|
||||
|
||||
// GetUnknown retrieves the entire list of unknown fields.
|
||||
// The caller may only mutate the contents of the RawFields
|
||||
// if the mutated bytes are stored back into the message with SetUnknown.
|
||||
func (x *fastReflection_Macaroon) GetUnknown() protoreflect.RawFields {
|
||||
return x.unknownFields
|
||||
}
|
||||
|
||||
// SetUnknown stores an entire list of unknown fields.
|
||||
// The raw fields must be syntactically valid according to the wire format.
|
||||
// An implementation may panic if this is not the case.
|
||||
// Once stored, the caller must not mutate the content of the RawFields.
|
||||
// An empty RawFields may be passed to clear the fields.
|
||||
//
|
||||
// SetUnknown is a mutating operation and unsafe for concurrent use.
|
||||
func (x *fastReflection_Macaroon) SetUnknown(fields protoreflect.RawFields) {
|
||||
x.unknownFields = fields
|
||||
}
|
||||
|
||||
// IsValid reports whether the message is valid.
|
||||
//
|
||||
// An invalid message is an empty, read-only value.
|
||||
//
|
||||
// An invalid message often corresponds to a nil pointer of the concrete
|
||||
// message type, but the details are implementation dependent.
|
||||
// Validity is not part of the protobuf data model, and may not
|
||||
// be preserved in marshaling or other operations.
|
||||
func (x *fastReflection_Macaroon) IsValid() bool {
|
||||
return x != nil
|
||||
}
|
||||
|
||||
// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations.
|
||||
// This method may return nil.
|
||||
//
|
||||
// The returned methods type is identical to
|
||||
// "google.golang.org/protobuf/runtime/protoiface".Methods.
|
||||
// Consult the protoiface package documentation for details.
|
||||
func (x *fastReflection_Macaroon) ProtoMethods() *protoiface.Methods {
|
||||
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
|
||||
x := input.Message.Interface().(*Macaroon)
|
||||
if x == nil {
|
||||
return protoiface.SizeOutput{
|
||||
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
||||
Size: 0,
|
||||
}
|
||||
}
|
||||
options := runtime.SizeInputToOptions(input)
|
||||
_ = options
|
||||
var n int
|
||||
var l int
|
||||
_ = l
|
||||
if x.Id != 0 {
|
||||
n += 1 + runtime.Sov(uint64(x.Id))
|
||||
}
|
||||
l = len(x.Controller)
|
||||
if l > 0 {
|
||||
n += 1 + l + runtime.Sov(uint64(l))
|
||||
}
|
||||
l = len(x.Subject)
|
||||
if l > 0 {
|
||||
n += 1 + l + runtime.Sov(uint64(l))
|
||||
}
|
||||
l = len(x.Origin)
|
||||
if l > 0 {
|
||||
n += 1 + l + runtime.Sov(uint64(l))
|
||||
}
|
||||
if x.ExpiryHeight != 0 {
|
||||
n += 1 + runtime.Sov(uint64(x.ExpiryHeight))
|
||||
}
|
||||
l = len(x.Macaroon)
|
||||
if l > 0 {
|
||||
n += 1 + l + runtime.Sov(uint64(l))
|
||||
}
|
||||
if x.unknownFields != nil {
|
||||
n += len(x.unknownFields)
|
||||
}
|
||||
return protoiface.SizeOutput{
|
||||
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
||||
Size: n,
|
||||
}
|
||||
}
|
||||
|
||||
marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) {
|
||||
x := input.Message.Interface().(*Macaroon)
|
||||
if x == nil {
|
||||
return protoiface.MarshalOutput{
|
||||
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
||||
Buf: input.Buf,
|
||||
}, nil
|
||||
}
|
||||
options := runtime.MarshalInputToOptions(input)
|
||||
_ = options
|
||||
size := options.Size(x)
|
||||
dAtA := make([]byte, size)
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if x.unknownFields != nil {
|
||||
i -= len(x.unknownFields)
|
||||
copy(dAtA[i:], x.unknownFields)
|
||||
}
|
||||
if len(x.Macaroon) > 0 {
|
||||
i -= len(x.Macaroon)
|
||||
copy(dAtA[i:], x.Macaroon)
|
||||
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Macaroon)))
|
||||
i--
|
||||
dAtA[i] = 0x32
|
||||
}
|
||||
if x.ExpiryHeight != 0 {
|
||||
i = runtime.EncodeVarint(dAtA, i, uint64(x.ExpiryHeight))
|
||||
i--
|
||||
dAtA[i] = 0x28
|
||||
}
|
||||
if len(x.Origin) > 0 {
|
||||
i -= len(x.Origin)
|
||||
copy(dAtA[i:], x.Origin)
|
||||
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Origin)))
|
||||
i--
|
||||
dAtA[i] = 0x22
|
||||
}
|
||||
if len(x.Subject) > 0 {
|
||||
i -= len(x.Subject)
|
||||
copy(dAtA[i:], x.Subject)
|
||||
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Subject)))
|
||||
i--
|
||||
dAtA[i] = 0x1a
|
||||
}
|
||||
if len(x.Controller) > 0 {
|
||||
i -= len(x.Controller)
|
||||
copy(dAtA[i:], x.Controller)
|
||||
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Controller)))
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
}
|
||||
if x.Id != 0 {
|
||||
i = runtime.EncodeVarint(dAtA, i, uint64(x.Id))
|
||||
i--
|
||||
dAtA[i] = 0x8
|
||||
}
|
||||
if input.Buf != nil {
|
||||
input.Buf = append(input.Buf, dAtA...)
|
||||
} else {
|
||||
input.Buf = dAtA
|
||||
}
|
||||
return protoiface.MarshalOutput{
|
||||
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
||||
Buf: input.Buf,
|
||||
}, nil
|
||||
}
|
||||
unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) {
|
||||
x := input.Message.Interface().(*Macaroon)
|
||||
if x == nil {
|
||||
return protoiface.UnmarshalOutput{
|
||||
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
||||
Flags: input.Flags,
|
||||
}, nil
|
||||
}
|
||||
options := runtime.UnmarshalInputToOptions(input)
|
||||
_ = options
|
||||
dAtA := input.Buf
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Macaroon: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Macaroon: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
|
||||
}
|
||||
x.Id = 0
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
x.Id |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||
}
|
||||
if postIndex > l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
x.Controller = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 3:
|
||||
if wireType != 2 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||
}
|
||||
if postIndex > l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
x.Subject = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 4:
|
||||
if wireType != 2 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||
}
|
||||
if postIndex > l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
x.Origin = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 5:
|
||||
if wireType != 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ExpiryHeight", wireType)
|
||||
}
|
||||
x.ExpiryHeight = 0
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
x.ExpiryHeight |= int64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
case 6:
|
||||
if wireType != 2 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Macaroon", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||
}
|
||||
if postIndex > l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
x.Macaroon = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := runtime.Skip(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
if !options.DiscardUnknown {
|
||||
x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil
|
||||
}
|
||||
return &protoiface.Methods{
|
||||
NoUnkeyedLiterals: struct{}{},
|
||||
Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown,
|
||||
Size: size,
|
||||
Marshal: marshal,
|
||||
Unmarshal: unmarshal,
|
||||
Merge: nil,
|
||||
CheckInitialized: nil,
|
||||
}
|
||||
}
|
||||
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.27.0
|
||||
@@ -737,6 +1445,81 @@ func (x *Grant) GetExpiryHeight() int64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
type Macaroon struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"`
|
||||
Subject string `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"`
|
||||
Origin string `protobuf:"bytes,4,opt,name=origin,proto3" json:"origin,omitempty"`
|
||||
ExpiryHeight int64 `protobuf:"varint,5,opt,name=expiry_height,json=expiryHeight,proto3" json:"expiry_height,omitempty"`
|
||||
Macaroon string `protobuf:"bytes,6,opt,name=macaroon,proto3" json:"macaroon,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Macaroon) Reset() {
|
||||
*x = Macaroon{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_macaroon_v1_state_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Macaroon) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Macaroon) ProtoMessage() {}
|
||||
|
||||
// Deprecated: Use Macaroon.ProtoReflect.Descriptor instead.
|
||||
func (*Macaroon) Descriptor() ([]byte, []int) {
|
||||
return file_macaroon_v1_state_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *Macaroon) GetId() uint64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Macaroon) GetController() string {
|
||||
if x != nil {
|
||||
return x.Controller
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Macaroon) GetSubject() string {
|
||||
if x != nil {
|
||||
return x.Subject
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Macaroon) GetOrigin() string {
|
||||
if x != nil {
|
||||
return x.Origin
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Macaroon) GetExpiryHeight() int64 {
|
||||
if x != nil {
|
||||
return x.ExpiryHeight
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Macaroon) GetMacaroon() string {
|
||||
if x != nil {
|
||||
return x.Macaroon
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_macaroon_v1_state_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_macaroon_v1_state_proto_rawDesc = []byte{
|
||||
@@ -755,17 +1538,31 @@ var file_macaroon_v1_state_proto_rawDesc = []byte{
|
||||
0x28, 0x03, 0x52, 0x0c, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74,
|
||||
0x3a, 0x26, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x20, 0x0a, 0x06, 0x0a, 0x02, 0x69, 0x64, 0x10, 0x01,
|
||||
0x12, 0x14, 0x0a, 0x0e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x6f, 0x72, 0x69, 0x67,
|
||||
0x69, 0x6e, 0x10, 0x01, 0x18, 0x01, 0x18, 0x01, 0x42, 0x9d, 0x01, 0x0a, 0x0f, 0x63, 0x6f, 0x6d,
|
||||
0x2e, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x53, 0x74,
|
||||
0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68,
|
||||
0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f,
|
||||
0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2f,
|
||||
0x76, 0x31, 0x3b, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x76, 0x31, 0xa2, 0x02, 0x03,
|
||||
0x4d, 0x58, 0x58, 0xaa, 0x02, 0x0b, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2e, 0x56,
|
||||
0x31, 0xca, 0x02, 0x0b, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0xe2,
|
||||
0x02, 0x17, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50,
|
||||
0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0c, 0x4d, 0x61, 0x63, 0x61,
|
||||
0x72, 0x6f, 0x6f, 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x69, 0x6e, 0x10, 0x01, 0x18, 0x01, 0x18, 0x01, 0x22, 0xd5, 0x01, 0x0a, 0x08, 0x4d, 0x61, 0x63,
|
||||
0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c,
|
||||
0x6c, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72,
|
||||
0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12,
|
||||
0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x78, 0x70, 0x69, 0x72,
|
||||
0x79, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c,
|
||||
0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1a, 0x0a, 0x08,
|
||||
0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
|
||||
0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x3a, 0x26, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x20,
|
||||
0x0a, 0x06, 0x0a, 0x02, 0x69, 0x64, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x0e, 0x73, 0x75, 0x62, 0x6a,
|
||||
0x65, 0x63, 0x74, 0x2c, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x10, 0x01, 0x18, 0x01, 0x18, 0x02,
|
||||
0x42, 0x9d, 0x01, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f,
|
||||
0x6e, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x50, 0x01, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f,
|
||||
0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d,
|
||||
0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x61, 0x63, 0x61, 0x72,
|
||||
0x6f, 0x6f, 0x6e, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x0b, 0x4d, 0x61,
|
||||
0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0b, 0x4d, 0x61, 0x63, 0x61,
|
||||
0x72, 0x6f, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x17, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f,
|
||||
0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
|
||||
0x61, 0xea, 0x02, 0x0c, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x3a, 0x3a, 0x56, 0x31,
|
||||
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@@ -780,9 +1577,10 @@ func file_macaroon_v1_state_proto_rawDescGZIP() []byte {
|
||||
return file_macaroon_v1_state_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_macaroon_v1_state_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_macaroon_v1_state_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_macaroon_v1_state_proto_goTypes = []interface{}{
|
||||
(*Grant)(nil), // 0: macaroon.v1.Grant
|
||||
(*Grant)(nil), // 0: macaroon.v1.Grant
|
||||
(*Macaroon)(nil), // 1: macaroon.v1.Macaroon
|
||||
}
|
||||
var file_macaroon_v1_state_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
@@ -810,6 +1608,18 @@ func file_macaroon_v1_state_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_macaroon_v1_state_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Macaroon); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
@@ -817,7 +1627,7 @@ func file_macaroon_v1_state_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_macaroon_v1_state_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
|
||||
+100
-27
@@ -999,6 +999,7 @@ var (
|
||||
fd_Schema_asset protoreflect.FieldDescriptor
|
||||
fd_Schema_chain protoreflect.FieldDescriptor
|
||||
fd_Schema_credential protoreflect.FieldDescriptor
|
||||
fd_Schema_did protoreflect.FieldDescriptor
|
||||
fd_Schema_jwk protoreflect.FieldDescriptor
|
||||
fd_Schema_grant protoreflect.FieldDescriptor
|
||||
fd_Schema_keyshare protoreflect.FieldDescriptor
|
||||
@@ -1013,6 +1014,7 @@ func init() {
|
||||
fd_Schema_asset = md_Schema.Fields().ByName("asset")
|
||||
fd_Schema_chain = md_Schema.Fields().ByName("chain")
|
||||
fd_Schema_credential = md_Schema.Fields().ByName("credential")
|
||||
fd_Schema_did = md_Schema.Fields().ByName("did")
|
||||
fd_Schema_jwk = md_Schema.Fields().ByName("jwk")
|
||||
fd_Schema_grant = md_Schema.Fields().ByName("grant")
|
||||
fd_Schema_keyshare = md_Schema.Fields().ByName("keyshare")
|
||||
@@ -1114,6 +1116,12 @@ func (x *fastReflection_Schema) Range(f func(protoreflect.FieldDescriptor, proto
|
||||
return
|
||||
}
|
||||
}
|
||||
if x.Did != "" {
|
||||
value := protoreflect.ValueOfString(x.Did)
|
||||
if !f(fd_Schema_did, value) {
|
||||
return
|
||||
}
|
||||
}
|
||||
if x.Jwk != "" {
|
||||
value := protoreflect.ValueOfString(x.Jwk)
|
||||
if !f(fd_Schema_jwk, value) {
|
||||
@@ -1163,6 +1171,8 @@ func (x *fastReflection_Schema) Has(fd protoreflect.FieldDescriptor) bool {
|
||||
return x.Chain != ""
|
||||
case "vault.v1.Schema.credential":
|
||||
return x.Credential != ""
|
||||
case "vault.v1.Schema.did":
|
||||
return x.Did != ""
|
||||
case "vault.v1.Schema.jwk":
|
||||
return x.Jwk != ""
|
||||
case "vault.v1.Schema.grant":
|
||||
@@ -1197,6 +1207,8 @@ func (x *fastReflection_Schema) Clear(fd protoreflect.FieldDescriptor) {
|
||||
x.Chain = ""
|
||||
case "vault.v1.Schema.credential":
|
||||
x.Credential = ""
|
||||
case "vault.v1.Schema.did":
|
||||
x.Did = ""
|
||||
case "vault.v1.Schema.jwk":
|
||||
x.Jwk = ""
|
||||
case "vault.v1.Schema.grant":
|
||||
@@ -1236,6 +1248,9 @@ func (x *fastReflection_Schema) Get(descriptor protoreflect.FieldDescriptor) pro
|
||||
case "vault.v1.Schema.credential":
|
||||
value := x.Credential
|
||||
return protoreflect.ValueOfString(value)
|
||||
case "vault.v1.Schema.did":
|
||||
value := x.Did
|
||||
return protoreflect.ValueOfString(value)
|
||||
case "vault.v1.Schema.jwk":
|
||||
value := x.Jwk
|
||||
return protoreflect.ValueOfString(value)
|
||||
@@ -1278,6 +1293,8 @@ func (x *fastReflection_Schema) Set(fd protoreflect.FieldDescriptor, value proto
|
||||
x.Chain = value.Interface().(string)
|
||||
case "vault.v1.Schema.credential":
|
||||
x.Credential = value.Interface().(string)
|
||||
case "vault.v1.Schema.did":
|
||||
x.Did = value.Interface().(string)
|
||||
case "vault.v1.Schema.jwk":
|
||||
x.Jwk = value.Interface().(string)
|
||||
case "vault.v1.Schema.grant":
|
||||
@@ -1316,6 +1333,8 @@ func (x *fastReflection_Schema) Mutable(fd protoreflect.FieldDescriptor) protore
|
||||
panic(fmt.Errorf("field chain of message vault.v1.Schema is not mutable"))
|
||||
case "vault.v1.Schema.credential":
|
||||
panic(fmt.Errorf("field credential of message vault.v1.Schema is not mutable"))
|
||||
case "vault.v1.Schema.did":
|
||||
panic(fmt.Errorf("field did of message vault.v1.Schema is not mutable"))
|
||||
case "vault.v1.Schema.jwk":
|
||||
panic(fmt.Errorf("field jwk of message vault.v1.Schema is not mutable"))
|
||||
case "vault.v1.Schema.grant":
|
||||
@@ -1347,6 +1366,8 @@ func (x *fastReflection_Schema) NewField(fd protoreflect.FieldDescriptor) protor
|
||||
return protoreflect.ValueOfString("")
|
||||
case "vault.v1.Schema.credential":
|
||||
return protoreflect.ValueOfString("")
|
||||
case "vault.v1.Schema.did":
|
||||
return protoreflect.ValueOfString("")
|
||||
case "vault.v1.Schema.jwk":
|
||||
return protoreflect.ValueOfString("")
|
||||
case "vault.v1.Schema.grant":
|
||||
@@ -1443,6 +1464,10 @@ func (x *fastReflection_Schema) ProtoMethods() *protoiface.Methods {
|
||||
if l > 0 {
|
||||
n += 1 + l + runtime.Sov(uint64(l))
|
||||
}
|
||||
l = len(x.Did)
|
||||
if l > 0 {
|
||||
n += 1 + l + runtime.Sov(uint64(l))
|
||||
}
|
||||
l = len(x.Jwk)
|
||||
if l > 0 {
|
||||
n += 1 + l + runtime.Sov(uint64(l))
|
||||
@@ -1493,27 +1518,34 @@ func (x *fastReflection_Schema) ProtoMethods() *protoiface.Methods {
|
||||
copy(dAtA[i:], x.Profile)
|
||||
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Profile)))
|
||||
i--
|
||||
dAtA[i] = 0x4a
|
||||
dAtA[i] = 0x52
|
||||
}
|
||||
if len(x.Keyshare) > 0 {
|
||||
i -= len(x.Keyshare)
|
||||
copy(dAtA[i:], x.Keyshare)
|
||||
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Keyshare)))
|
||||
i--
|
||||
dAtA[i] = 0x42
|
||||
dAtA[i] = 0x4a
|
||||
}
|
||||
if len(x.Grant) > 0 {
|
||||
i -= len(x.Grant)
|
||||
copy(dAtA[i:], x.Grant)
|
||||
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Grant)))
|
||||
i--
|
||||
dAtA[i] = 0x3a
|
||||
dAtA[i] = 0x42
|
||||
}
|
||||
if len(x.Jwk) > 0 {
|
||||
i -= len(x.Jwk)
|
||||
copy(dAtA[i:], x.Jwk)
|
||||
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Jwk)))
|
||||
i--
|
||||
dAtA[i] = 0x3a
|
||||
}
|
||||
if len(x.Did) > 0 {
|
||||
i -= len(x.Did)
|
||||
copy(dAtA[i:], x.Did)
|
||||
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Did)))
|
||||
i--
|
||||
dAtA[i] = 0x32
|
||||
}
|
||||
if len(x.Credential) > 0 {
|
||||
@@ -1746,6 +1778,38 @@ func (x *fastReflection_Schema) ProtoMethods() *protoiface.Methods {
|
||||
x.Credential = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 6:
|
||||
if wireType != 2 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Did", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||
}
|
||||
if postIndex > l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
x.Did = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 7:
|
||||
if wireType != 2 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Jwk", wireType)
|
||||
}
|
||||
@@ -1777,7 +1841,7 @@ func (x *fastReflection_Schema) ProtoMethods() *protoiface.Methods {
|
||||
}
|
||||
x.Jwk = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 7:
|
||||
case 8:
|
||||
if wireType != 2 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Grant", wireType)
|
||||
}
|
||||
@@ -1809,7 +1873,7 @@ func (x *fastReflection_Schema) ProtoMethods() *protoiface.Methods {
|
||||
}
|
||||
x.Grant = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 8:
|
||||
case 9:
|
||||
if wireType != 2 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Keyshare", wireType)
|
||||
}
|
||||
@@ -1841,7 +1905,7 @@ func (x *fastReflection_Schema) ProtoMethods() *protoiface.Methods {
|
||||
}
|
||||
x.Keyshare = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 9:
|
||||
case 10:
|
||||
if wireType != 2 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Profile", wireType)
|
||||
}
|
||||
@@ -2020,10 +2084,11 @@ type Schema struct {
|
||||
Asset string `protobuf:"bytes,3,opt,name=asset,proto3" json:"asset,omitempty"`
|
||||
Chain string `protobuf:"bytes,4,opt,name=chain,proto3" json:"chain,omitempty"`
|
||||
Credential string `protobuf:"bytes,5,opt,name=credential,proto3" json:"credential,omitempty"`
|
||||
Jwk string `protobuf:"bytes,6,opt,name=jwk,proto3" json:"jwk,omitempty"`
|
||||
Grant string `protobuf:"bytes,7,opt,name=grant,proto3" json:"grant,omitempty"`
|
||||
Keyshare string `protobuf:"bytes,8,opt,name=keyshare,proto3" json:"keyshare,omitempty"`
|
||||
Profile string `protobuf:"bytes,9,opt,name=profile,proto3" json:"profile,omitempty"`
|
||||
Did string `protobuf:"bytes,6,opt,name=did,proto3" json:"did,omitempty"`
|
||||
Jwk string `protobuf:"bytes,7,opt,name=jwk,proto3" json:"jwk,omitempty"`
|
||||
Grant string `protobuf:"bytes,8,opt,name=grant,proto3" json:"grant,omitempty"`
|
||||
Keyshare string `protobuf:"bytes,9,opt,name=keyshare,proto3" json:"keyshare,omitempty"`
|
||||
Profile string `protobuf:"bytes,10,opt,name=profile,proto3" json:"profile,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Schema) Reset() {
|
||||
@@ -2081,6 +2146,13 @@ func (x *Schema) GetCredential() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Schema) GetDid() string {
|
||||
if x != nil {
|
||||
return x.Did
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Schema) GetJwk() string {
|
||||
if x != nil {
|
||||
return x.Jwk
|
||||
@@ -2131,7 +2203,7 @@ var file_vault_v1_genesis_proto_rawDesc = []byte{
|
||||
0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31,
|
||||
0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x3a,
|
||||
0x19, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0c, 0x76, 0x61,
|
||||
0x75, 0x6c, 0x74, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0xe6, 0x01, 0x0a, 0x06, 0x53,
|
||||
0x75, 0x6c, 0x74, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0xf8, 0x01, 0x0a, 0x06, 0x53,
|
||||
0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12,
|
||||
0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||
@@ -2140,22 +2212,23 @@ var file_vault_v1_genesis_proto_rawDesc = []byte{
|
||||
0x14, 0x0a, 0x05, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
|
||||
0x63, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74,
|
||||
0x69, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65,
|
||||
0x6e, 0x74, 0x69, 0x61, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x6a, 0x77, 0x6b, 0x18, 0x06, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x03, 0x6a, 0x77, 0x6b, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74,
|
||||
0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x12, 0x1a, 0x0a,
|
||||
0x08, 0x6b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x08, 0x6b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x6f,
|
||||
0x66, 0x69, 0x6c, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x66,
|
||||
0x69, 0x6c, 0x65, 0x42, 0x8a, 0x01, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x61, 0x75, 0x6c,
|
||||
0x74, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
|
||||
0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69,
|
||||
0x2f, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x76,
|
||||
0x31, 0xa2, 0x02, 0x03, 0x56, 0x58, 0x58, 0xaa, 0x02, 0x08, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x2e,
|
||||
0x56, 0x31, 0xca, 0x02, 0x08, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x14,
|
||||
0x56, 0x61, 0x75, 0x6c, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61,
|
||||
0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x09, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x3a, 0x3a, 0x56, 0x31,
|
||||
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x6e, 0x74, 0x69, 0x61, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6a, 0x77, 0x6b, 0x18, 0x07,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6a, 0x77, 0x6b, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x61,
|
||||
0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x12,
|
||||
0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70,
|
||||
0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x72,
|
||||
0x6f, 0x66, 0x69, 0x6c, 0x65, 0x42, 0x8a, 0x01, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x61,
|
||||
0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63,
|
||||
0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61,
|
||||
0x70, 0x69, 0x2f, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x61, 0x75, 0x6c,
|
||||
0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x56, 0x58, 0x58, 0xaa, 0x02, 0x08, 0x56, 0x61, 0x75, 0x6c,
|
||||
0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x08, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x5c, 0x56, 0x31, 0xe2,
|
||||
0x02, 0x14, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65,
|
||||
0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x09, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x3a, 0x3a,
|
||||
0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
+30
-24
@@ -626,28 +626,15 @@ func NewChainApp(
|
||||
// If evidence needs to be handled for the app, set routes in router here and seal
|
||||
app.EvidenceKeeper = *evidenceKeeper
|
||||
|
||||
// Create the oracle Keeper
|
||||
app.OracleKeeper = oraclekeeper.NewKeeper(
|
||||
// Create the did Keeper
|
||||
app.DidKeeper = didkeeper.NewKeeper(
|
||||
appCodec,
|
||||
sdkruntime.NewKVStoreService(keys[oracletypes.StoreKey]),
|
||||
logger,
|
||||
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
|
||||
)
|
||||
|
||||
// Create the service Keeper
|
||||
app.ServiceKeeper = servicekeeper.NewKeeper(
|
||||
appCodec,
|
||||
sdkruntime.NewKVStoreService(keys[servicetypes.StoreKey]),
|
||||
logger,
|
||||
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
|
||||
)
|
||||
|
||||
// Create the macaroon Keeper
|
||||
app.MacaroonKeeper = macaroonkeeper.NewKeeper(
|
||||
appCodec,
|
||||
sdkruntime.NewKVStoreService(keys[macaroontypes.StoreKey]),
|
||||
sdkruntime.NewKVStoreService(keys[didtypes.StoreKey]),
|
||||
logger,
|
||||
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
|
||||
app.AccountKeeper,
|
||||
app.NFTKeeper,
|
||||
app.StakingKeeper,
|
||||
)
|
||||
|
||||
// Create the vault Keeper
|
||||
@@ -656,16 +643,35 @@ func NewChainApp(
|
||||
sdkruntime.NewKVStoreService(keys[vaulttypes.StoreKey]),
|
||||
logger,
|
||||
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
|
||||
app.AccountKeeper,
|
||||
app.DidKeeper,
|
||||
)
|
||||
// Create the macaroon Keeper
|
||||
app.MacaroonKeeper = macaroonkeeper.NewKeeper(
|
||||
appCodec,
|
||||
sdkruntime.NewKVStoreService(keys[macaroontypes.StoreKey]),
|
||||
logger,
|
||||
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
|
||||
app.AccountKeeper,
|
||||
app.DidKeeper,
|
||||
)
|
||||
|
||||
// Create the did Keeper
|
||||
app.DidKeeper = didkeeper.NewKeeper(
|
||||
// Create the service Keeper
|
||||
app.ServiceKeeper = servicekeeper.NewKeeper(
|
||||
appCodec,
|
||||
sdkruntime.NewKVStoreService(keys[didtypes.StoreKey]),
|
||||
app.AccountKeeper,
|
||||
sdkruntime.NewKVStoreService(keys[servicetypes.StoreKey]),
|
||||
logger,
|
||||
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
|
||||
app.DidKeeper,
|
||||
app.GroupKeeper,
|
||||
app.MacaroonKeeper,
|
||||
app.NFTKeeper,
|
||||
app.StakingKeeper,
|
||||
)
|
||||
|
||||
// Create the oracle Keeper
|
||||
app.OracleKeeper = oraclekeeper.NewKeeper(
|
||||
appCodec,
|
||||
sdkruntime.NewKVStoreService(keys[oracletypes.StoreKey]),
|
||||
logger,
|
||||
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
|
||||
)
|
||||
|
||||
+3
-9
@@ -5,10 +5,8 @@ import (
|
||||
"fmt"
|
||||
"log"
|
||||
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
|
||||
storetypes "cosmossdk.io/store/types"
|
||||
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
servertypes "github.com/cosmos/cosmos-sdk/server/types"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types"
|
||||
@@ -45,7 +43,7 @@ func (app *SonrApp) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedA
|
||||
AppState: appState,
|
||||
Validators: validators,
|
||||
Height: height,
|
||||
ConsensusParams: app.BaseApp.GetConsensusParams(ctx),
|
||||
ConsensusParams: app.GetConsensusParams(ctx),
|
||||
}, err
|
||||
}
|
||||
|
||||
@@ -54,13 +52,9 @@ func (app *SonrApp) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedA
|
||||
//
|
||||
// in favor of export at a block height
|
||||
func (app *SonrApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs []string) {
|
||||
applyAllowedAddrs := false
|
||||
applyAllowedAddrs := len(jailAllowedAddrs) > 0
|
||||
|
||||
// check if there is a allowed address list
|
||||
if len(jailAllowedAddrs) > 0 {
|
||||
applyAllowedAddrs = true
|
||||
}
|
||||
|
||||
allowedAddrsMap := make(map[string]bool)
|
||||
|
||||
for _, addr := range jailAllowedAddrs {
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/onsonr/sonr/pkg/nebula"
|
||||
"github.com/onsonr/sonr/pkg/nebula/pages"
|
||||
"github.com/onsonr/sonr/pkg/nebula/router"
|
||||
)
|
||||
|
||||
func NewProxyCmd() *cobra.Command {
|
||||
@@ -29,8 +29,8 @@ func NewProxyCmd() *cobra.Command {
|
||||
e.Logger.Fatal(err)
|
||||
}
|
||||
|
||||
e.GET("/", pages.Home)
|
||||
e.GET("/allocate", pages.Profile)
|
||||
e.GET("/", router.Home)
|
||||
e.GET("/allocate", router.Profile)
|
||||
|
||||
// Start server
|
||||
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package main
|
||||
package commands
|
||||
|
||||
import "github.com/spf13/cobra"
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package commands
|
||||
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/onsonr/sonr/cmd/hway/server"
|
||||
)
|
||||
|
||||
func NewStartCmd() *cobra.Command {
|
||||
return &cobra.Command{
|
||||
Use: "start",
|
||||
Short: "Starts the DWN proxy server for the local IPFS node",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
s := server.New()
|
||||
s.Start()
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/onsonr/sonr/cmd/hway/commands"
|
||||
)
|
||||
|
||||
func main() {
|
||||
rootCmd := commands.NewRootCmd()
|
||||
rootCmd.AddCommand(commands.NewStartCmd())
|
||||
if err := rootCmd.Execute(); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
package handlers
|
||||
@@ -0,0 +1 @@
|
||||
package handlers
|
||||
@@ -0,0 +1 @@
|
||||
package handlers
|
||||
@@ -0,0 +1 @@
|
||||
package handlers
|
||||
@@ -0,0 +1,40 @@
|
||||
package server
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/labstack/gommon/log"
|
||||
|
||||
"github.com/onsonr/sonr/internal/session"
|
||||
"github.com/onsonr/sonr/pkg/nebula"
|
||||
"github.com/onsonr/sonr/pkg/nebula/router"
|
||||
)
|
||||
|
||||
type Server struct {
|
||||
*echo.Echo
|
||||
}
|
||||
|
||||
func New() *Server {
|
||||
s := &Server{Echo: echo.New()}
|
||||
s.Logger.SetLevel(log.INFO)
|
||||
s.Use(session.UseSession)
|
||||
|
||||
// Configure the server
|
||||
if err := nebula.UseAssets(s.Echo); err != nil {
|
||||
s.Logger.Fatal(err)
|
||||
}
|
||||
|
||||
s.GET("/", router.Home)
|
||||
s.GET("/login", router.Login)
|
||||
s.GET("/register", router.Register)
|
||||
s.GET("/profile", router.Profile)
|
||||
s.GET("/authorize", router.Authorize)
|
||||
return s
|
||||
}
|
||||
|
||||
func (s *Server) Start() {
|
||||
if err := s.Echo.Start(":1323"); err != http.ErrServerClosed {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
package main
|
||||
|
||||
func main() {
|
||||
rootCmd := NewRootCmd()
|
||||
rootCmd.AddCommand(NewProxyCmd())
|
||||
if err := rootCmd.Execute(); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
@@ -15,14 +15,14 @@ import (
|
||||
"github.com/labstack/echo/v4"
|
||||
promise "github.com/nlepage/go-js-promise"
|
||||
|
||||
"github.com/onsonr/sonr/cmd/dwn/middleware"
|
||||
"github.com/onsonr/sonr/cmd/dwn/state"
|
||||
"github.com/onsonr/sonr/cmd/motr/state"
|
||||
"github.com/onsonr/sonr/internal/session"
|
||||
"github.com/onsonr/sonr/pkg/nebula/pages"
|
||||
)
|
||||
|
||||
func main() {
|
||||
e := echo.New()
|
||||
e.Use(middleware.UseSession)
|
||||
e.Use(session.UseSession)
|
||||
registerViews(e)
|
||||
registerState(e)
|
||||
Serve(e)
|
||||
@@ -1,39 +0,0 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/labstack/gommon/log"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/onsonr/sonr/pkg/nebula"
|
||||
"github.com/onsonr/sonr/pkg/nebula/pages"
|
||||
)
|
||||
|
||||
func NewProxyCmd() *cobra.Command {
|
||||
return &cobra.Command{
|
||||
Use: "start",
|
||||
Short: "Starts the DWN proxy server for the local IPFS node",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
// Echo instance
|
||||
e := echo.New()
|
||||
e.Logger.SetLevel(log.INFO)
|
||||
|
||||
// Configure the server
|
||||
if err := nebula.UseAssets(e); err != nil {
|
||||
e.Logger.Fatal(err)
|
||||
}
|
||||
|
||||
e.GET("/", pages.Home)
|
||||
e.GET("/login", pages.Login)
|
||||
e.GET("/register", pages.Register)
|
||||
e.GET("/profile", pages.Profile)
|
||||
e.GET("/allocate", pages.Profile)
|
||||
|
||||
if err := e.Start(":1323"); err != http.ErrServerClosed {
|
||||
log.Fatal(err)
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
{}
|
||||
@@ -0,0 +1,3 @@
|
||||
FROM scratch
|
||||
ENTRYPOINT ["/hway"]
|
||||
COPY hway /
|
||||
@@ -13,13 +13,14 @@ processes:
|
||||
namespace: testnet
|
||||
command: "devbox run start:testnet"
|
||||
restart: on_failure
|
||||
env:
|
||||
max_restarts: 1
|
||||
depends:
|
||||
- ipfs
|
||||
|
||||
motr:
|
||||
hway:
|
||||
namespace: testnet
|
||||
command: "devbox run start:motr"
|
||||
command: "devbox run start:hway"
|
||||
restart: on_failure
|
||||
max_restarts: 1
|
||||
depends:
|
||||
@@ -31,5 +32,3 @@ processes:
|
||||
command: "cloudflared tunnel run --token $TUNNEL_TOKEN"
|
||||
restart: on_failure
|
||||
max_restarts: 1
|
||||
depends:
|
||||
- caddy
|
||||
@@ -0,0 +1,3 @@
|
||||
FROM scratch
|
||||
ENTRYPOINT ["/sonrd"]
|
||||
COPY sonrd /
|
||||
+20
-31
@@ -4,14 +4,17 @@
|
||||
"go@1.22",
|
||||
"air@latest",
|
||||
"bun@latest",
|
||||
"gum@latest",
|
||||
"ipfs@latest",
|
||||
"mprocs@latest",
|
||||
"skate@latest",
|
||||
"templ@latest",
|
||||
"cloudflared@latest",
|
||||
"process-compose@latest"
|
||||
],
|
||||
"env": {
|
||||
"GOPATH": "$HOME/go",
|
||||
"PATH": "$HOME/go/bin:$PATH",
|
||||
"PATH": "./build:$HOME/go/bin:$PATH",
|
||||
"CHAIN_ID": "sonr-testnet-1",
|
||||
"DENOM": "usnr",
|
||||
"KEYRING": "test",
|
||||
@@ -28,27 +31,27 @@
|
||||
},
|
||||
"shell": {
|
||||
"scripts": {
|
||||
"dev": [
|
||||
"air"
|
||||
],
|
||||
"build:docker": [
|
||||
"make local-image"
|
||||
],
|
||||
"build:motr": [
|
||||
"build:hway": [
|
||||
"make nebula",
|
||||
"make motr"
|
||||
"make hway"
|
||||
],
|
||||
"build:nebula": [
|
||||
"make nebula"
|
||||
],
|
||||
"build:motr": [
|
||||
"make motr"
|
||||
],
|
||||
"build:sonrd": [
|
||||
"make dwn",
|
||||
"make motr",
|
||||
"make build"
|
||||
],
|
||||
"build": [
|
||||
"make dwn",
|
||||
"make motr",
|
||||
"make build",
|
||||
"make motr"
|
||||
"make hway"
|
||||
],
|
||||
"gen:proto": [
|
||||
"make proto-gen"
|
||||
@@ -59,33 +62,19 @@
|
||||
"gen:templ": [
|
||||
"make templ"
|
||||
],
|
||||
"start:motr": [
|
||||
"make templ",
|
||||
"make motr",
|
||||
"make start-motr"
|
||||
],
|
||||
"start:testnet": [
|
||||
"make templ",
|
||||
"make install",
|
||||
"make sh-testnet"
|
||||
],
|
||||
"start": [
|
||||
"process-compose up -d"
|
||||
"process-compose up -f ./deploy/process-compose.yaml"
|
||||
],
|
||||
"stop": [
|
||||
"process-compose down"
|
||||
"process-compose down -f ./deploy/process-compose.yaml"
|
||||
],
|
||||
"test:e2e": [
|
||||
"make templ",
|
||||
"make test-e2e"
|
||||
"start:testnet": [
|
||||
"make sh-testnet"
|
||||
],
|
||||
"test:unit": [
|
||||
"make templ",
|
||||
"make test-unit"
|
||||
],
|
||||
"test": [
|
||||
"make templ",
|
||||
"make test"
|
||||
"start:hway": [
|
||||
"make nebula",
|
||||
"make hway",
|
||||
"./build/hway start"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
+144
@@ -193,12 +193,108 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"gum@latest": {
|
||||
"last_modified": "2024-09-10T15:01:03Z",
|
||||
"resolved": "github:NixOS/nixpkgs/5ed627539ac84809c78b2dd6d26a5cebeb5ae269#gum",
|
||||
"source": "devbox-search",
|
||||
"version": "0.14.5",
|
||||
"systems": {
|
||||
"aarch64-darwin": {
|
||||
"outputs": [
|
||||
{
|
||||
"name": "out",
|
||||
"path": "/nix/store/n1gqffrwdzr3vpsmwmwx3hmw814c1k6g-gum-0.14.5",
|
||||
"default": true
|
||||
}
|
||||
],
|
||||
"store_path": "/nix/store/n1gqffrwdzr3vpsmwmwx3hmw814c1k6g-gum-0.14.5"
|
||||
},
|
||||
"aarch64-linux": {
|
||||
"outputs": [
|
||||
{
|
||||
"name": "out",
|
||||
"path": "/nix/store/ggp10jr3l6higs0gqibp6ypjlf7yakpc-gum-0.14.5",
|
||||
"default": true
|
||||
}
|
||||
],
|
||||
"store_path": "/nix/store/ggp10jr3l6higs0gqibp6ypjlf7yakpc-gum-0.14.5"
|
||||
},
|
||||
"x86_64-darwin": {
|
||||
"outputs": [
|
||||
{
|
||||
"name": "out",
|
||||
"path": "/nix/store/jq8shghha81s1wg67fcjrfnf4hbliimn-gum-0.14.5",
|
||||
"default": true
|
||||
}
|
||||
],
|
||||
"store_path": "/nix/store/jq8shghha81s1wg67fcjrfnf4hbliimn-gum-0.14.5"
|
||||
},
|
||||
"x86_64-linux": {
|
||||
"outputs": [
|
||||
{
|
||||
"name": "out",
|
||||
"path": "/nix/store/f199acwir08z47f3d5kf1fhmhajmd1ig-gum-0.14.5",
|
||||
"default": true
|
||||
}
|
||||
],
|
||||
"store_path": "/nix/store/f199acwir08z47f3d5kf1fhmhajmd1ig-gum-0.14.5"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ipfs@latest": {
|
||||
"last_modified": "2023-02-24T09:01:09Z",
|
||||
"resolved": "github:NixOS/nixpkgs/7d0ed7f2e5aea07ab22ccb338d27fbe347ed2f11#ipfs",
|
||||
"source": "devbox-search",
|
||||
"version": "0.17.0"
|
||||
},
|
||||
"mprocs@latest": {
|
||||
"last_modified": "2024-09-10T15:01:03Z",
|
||||
"resolved": "github:NixOS/nixpkgs/5ed627539ac84809c78b2dd6d26a5cebeb5ae269#mprocs",
|
||||
"source": "devbox-search",
|
||||
"version": "0.7.1",
|
||||
"systems": {
|
||||
"aarch64-darwin": {
|
||||
"outputs": [
|
||||
{
|
||||
"name": "out",
|
||||
"path": "/nix/store/sri1rv6phxhcvgwknd3zv98km6s1740b-mprocs-0.7.1",
|
||||
"default": true
|
||||
}
|
||||
],
|
||||
"store_path": "/nix/store/sri1rv6phxhcvgwknd3zv98km6s1740b-mprocs-0.7.1"
|
||||
},
|
||||
"aarch64-linux": {
|
||||
"outputs": [
|
||||
{
|
||||
"name": "out",
|
||||
"path": "/nix/store/7q84qjs24xd9jf2wvn7f39gvxsn5n33q-mprocs-0.7.1",
|
||||
"default": true
|
||||
}
|
||||
],
|
||||
"store_path": "/nix/store/7q84qjs24xd9jf2wvn7f39gvxsn5n33q-mprocs-0.7.1"
|
||||
},
|
||||
"x86_64-darwin": {
|
||||
"outputs": [
|
||||
{
|
||||
"name": "out",
|
||||
"path": "/nix/store/47j50bgr6mxlvdjddh0li810wkld34qb-mprocs-0.7.1",
|
||||
"default": true
|
||||
}
|
||||
],
|
||||
"store_path": "/nix/store/47j50bgr6mxlvdjddh0li810wkld34qb-mprocs-0.7.1"
|
||||
},
|
||||
"x86_64-linux": {
|
||||
"outputs": [
|
||||
{
|
||||
"name": "out",
|
||||
"path": "/nix/store/6vrvg4jhv2yg8y326dmrxsz3yddkqgzq-mprocs-0.7.1",
|
||||
"default": true
|
||||
}
|
||||
],
|
||||
"store_path": "/nix/store/6vrvg4jhv2yg8y326dmrxsz3yddkqgzq-mprocs-0.7.1"
|
||||
}
|
||||
}
|
||||
},
|
||||
"process-compose@latest": {
|
||||
"last_modified": "2024-09-15T21:49:16Z",
|
||||
"resolved": "github:NixOS/nixpkgs/039b72d0c738c934e2e36d7fc5520d1b425287a6#process-compose",
|
||||
@@ -294,6 +390,54 @@
|
||||
"store_path": "/nix/store/6zbyhj72wh0645lj6b9c392aqqg11a84-skate-1.0.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"templ@latest": {
|
||||
"last_modified": "2024-09-10T15:01:03Z",
|
||||
"resolved": "github:NixOS/nixpkgs/5ed627539ac84809c78b2dd6d26a5cebeb5ae269#templ",
|
||||
"source": "devbox-search",
|
||||
"version": "0.2.778",
|
||||
"systems": {
|
||||
"aarch64-darwin": {
|
||||
"outputs": [
|
||||
{
|
||||
"name": "out",
|
||||
"path": "/nix/store/n3yqslisz9v81k4w4vhci1v2bl1sqf9s-templ-0.2.778",
|
||||
"default": true
|
||||
}
|
||||
],
|
||||
"store_path": "/nix/store/n3yqslisz9v81k4w4vhci1v2bl1sqf9s-templ-0.2.778"
|
||||
},
|
||||
"aarch64-linux": {
|
||||
"outputs": [
|
||||
{
|
||||
"name": "out",
|
||||
"path": "/nix/store/i4xjiw0vc25qpr3g01q0x401351w28hr-templ-0.2.778",
|
||||
"default": true
|
||||
}
|
||||
],
|
||||
"store_path": "/nix/store/i4xjiw0vc25qpr3g01q0x401351w28hr-templ-0.2.778"
|
||||
},
|
||||
"x86_64-darwin": {
|
||||
"outputs": [
|
||||
{
|
||||
"name": "out",
|
||||
"path": "/nix/store/77w522agb5fgsr36jkifcccr9x4xwkf9-templ-0.2.778",
|
||||
"default": true
|
||||
}
|
||||
],
|
||||
"store_path": "/nix/store/77w522agb5fgsr36jkifcccr9x4xwkf9-templ-0.2.778"
|
||||
},
|
||||
"x86_64-linux": {
|
||||
"outputs": [
|
||||
{
|
||||
"name": "out",
|
||||
"path": "/nix/store/1g5ji5930j03cycpcjy12z6lr24l9c65-templ-0.2.778",
|
||||
"default": true
|
||||
}
|
||||
],
|
||||
"store_path": "/nix/store/1g5ji5930j03cycpcjy12z6lr24l9c65-templ-0.2.778"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package middleware
|
||||
package auth
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
@@ -1,4 +1,4 @@
|
||||
package middleware
|
||||
package auth
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
@@ -7,21 +7,6 @@ import (
|
||||
"gopkg.in/macaroon.v2"
|
||||
)
|
||||
|
||||
// GetSession returns the current Session
|
||||
func GetSession(c echo.Context) *Session {
|
||||
return c.(*Session)
|
||||
}
|
||||
|
||||
// UseSession establishes a Session Cookie.
|
||||
func UseSession(next echo.HandlerFunc) echo.HandlerFunc {
|
||||
return func(c echo.Context) error {
|
||||
sc := initSession(c)
|
||||
headers := new(RequestHeaders)
|
||||
sc.Bind(headers)
|
||||
return next(sc)
|
||||
}
|
||||
}
|
||||
|
||||
func MacaroonMiddleware(secretKeyStr string, location string) echo.MiddlewareFunc {
|
||||
secretKey := []byte(secretKeyStr)
|
||||
return func(next echo.HandlerFunc) echo.HandlerFunc {
|
||||
@@ -0,0 +1,31 @@
|
||||
package headers
|
||||
|
||||
type RequestHeaders struct {
|
||||
CacheControl *string `header:"Cache-Control"`
|
||||
DeviceMemory *string `header:"Device-Memory"`
|
||||
From *string `header:"From"`
|
||||
Host *string `header:"Host"`
|
||||
Referer *string `header:"Referer"`
|
||||
UserAgent *string `header:"User-Agent"`
|
||||
ViewportWidth *string `header:"Viewport-Width"`
|
||||
Width *string `header:"Width"`
|
||||
|
||||
// HTMX Specific
|
||||
HXBoosted *string `header:"HX-Boosted"`
|
||||
HXCurrentURL *string `header:"HX-Current-URL"`
|
||||
HXHistoryRestoreRequest *string `header:"HX-History-Restore-Request"`
|
||||
HXPrompt *string `header:"HX-Prompt"`
|
||||
HXRequest *string `header:"HX-Request"`
|
||||
HXTarget *string `header:"HX-Target"`
|
||||
HXTriggerName *string `header:"HX-Trigger-Name"`
|
||||
HXTrigger *string `header:"HX-Trigger"`
|
||||
}
|
||||
|
||||
type ProtectedRequestHeaders struct {
|
||||
Authorization *string `header:"Authorization"`
|
||||
Forwarded *string `header:"Forwarded"`
|
||||
Link *string `header:"Link"`
|
||||
PermissionsPolicy *string `header:"Permissions-Policy"`
|
||||
ProxyAuthorization *string `header:"Proxy-Authorization"`
|
||||
WWWAuthenticate *string `header:"WWW-Authenticate"`
|
||||
}
|
||||
@@ -1,45 +1,6 @@
|
||||
package middleware
|
||||
|
||||
type RequestHeaders struct {
|
||||
Authorization *string `header:"Authorization"`
|
||||
CacheControl *string `header:"Cache-Control"`
|
||||
DeviceMemory *string `header:"Device-Memory"`
|
||||
Forwarded *string `header:"Forwarded"`
|
||||
From *string `header:"From"`
|
||||
Host *string `header:"Host"`
|
||||
Link *string `header:"Link"`
|
||||
PermissionsPolicy *string `header:"Permissions-Policy"`
|
||||
ProxyAuthorization *string `header:"Proxy-Authorization"`
|
||||
Referer *string `header:"Referer"`
|
||||
UserAgent *string `header:"User-Agent"`
|
||||
ViewportWidth *string `header:"Viewport-Width"`
|
||||
Width *string `header:"Width"`
|
||||
WWWAuthenticate *string `header:"WWW-Authenticate"`
|
||||
|
||||
// HTMX Specific
|
||||
HXBoosted *string `header:"HX-Boosted"`
|
||||
HXCurrentURL *string `header:"HX-Current-URL"`
|
||||
HXHistoryRestoreRequest *string `header:"HX-History-Restore-Request"`
|
||||
HXPrompt *string `header:"HX-Prompt"`
|
||||
HXRequest *string `header:"HX-Request"`
|
||||
HXTarget *string `header:"HX-Target"`
|
||||
HXTriggerName *string `header:"HX-Trigger-Name"`
|
||||
HXTrigger *string `header:"HX-Trigger"`
|
||||
}
|
||||
package headers
|
||||
|
||||
type ResponseHeaders struct {
|
||||
AcceptCH *string `header:"Accept-CH"`
|
||||
AccessControlAllowCredentials *string `header:"Access-Control-Allow-Credentials"`
|
||||
AccessControlAllowHeaders *string `header:"Access-Control-Allow-Headers"`
|
||||
AccessControlAllowMethods *string `header:"Access-Control-Allow-Methods"`
|
||||
AccessControlExposeHeaders *string `header:"Access-Control-Expose-Headers"`
|
||||
AccessControlRequestHeaders *string `header:"Access-Control-Request-Headers"`
|
||||
ContentSecurityPolicy *string `header:"Content-Security-Policy"`
|
||||
CrossOriginEmbedderPolicy *string `header:"Cross-Origin-Embedder-Policy"`
|
||||
PermissionsPolicy *string `header:"Permissions-Policy"`
|
||||
ProxyAuthorization *string `header:"Proxy-Authorization"`
|
||||
WWWAuthenticate *string `header:"WWW-Authenticate"`
|
||||
|
||||
// HTMX Specific
|
||||
HXLocation *string `header:"HX-Location"`
|
||||
HXPushURL *string `header:"HX-Push-Url"`
|
||||
@@ -53,3 +14,17 @@ type ResponseHeaders struct {
|
||||
HXTriggerAfterSettle *string `header:"HX-Trigger-After-Settle"`
|
||||
HXTriggerAfterSwap *string `header:"HX-Trigger-After-Swap"`
|
||||
}
|
||||
|
||||
type ProtectedResponseHeaders struct {
|
||||
AcceptCH *string `header:"Accept-CH"`
|
||||
AccessControlAllowCredentials *string `header:"Access-Control-Allow-Credentials"`
|
||||
AccessControlAllowHeaders *string `header:"Access-Control-Allow-Headers"`
|
||||
AccessControlAllowMethods *string `header:"Access-Control-Allow-Methods"`
|
||||
AccessControlExposeHeaders *string `header:"Access-Control-Expose-Headers"`
|
||||
AccessControlRequestHeaders *string `header:"Access-Control-Request-Headers"`
|
||||
ContentSecurityPolicy *string `header:"Content-Security-Policy"`
|
||||
CrossOriginEmbedderPolicy *string `header:"Cross-Origin-Embedder-Policy"`
|
||||
PermissionsPolicy *string `header:"Permissions-Policy"`
|
||||
ProxyAuthorization *string `header:"Proxy-Authorization"`
|
||||
WWWAuthenticate *string `header:"WWW-Authenticate"`
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package middleware
|
||||
package session
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
@@ -6,7 +6,6 @@ import (
|
||||
|
||||
"github.com/donseba/go-htmx"
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/segmentio/ksuid"
|
||||
)
|
||||
|
||||
type Session struct {
|
||||
@@ -22,15 +21,6 @@ func (c *Session) ID() string {
|
||||
return ReadCookie(c, "session")
|
||||
}
|
||||
|
||||
func initSession(c echo.Context) *Session {
|
||||
s := &Session{Context: c}
|
||||
if val := ReadCookie(c, "session"); val == "" {
|
||||
id := ksuid.New().String()
|
||||
WriteCookie(c, "session", id)
|
||||
}
|
||||
return s
|
||||
}
|
||||
|
||||
func ReadCookie(c echo.Context, key string) string {
|
||||
cookie, err := c.Cookie(key)
|
||||
if err != nil {
|
||||
@@ -0,0 +1,35 @@
|
||||
package session
|
||||
|
||||
import (
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/segmentio/ksuid"
|
||||
|
||||
"github.com/onsonr/sonr/internal/headers"
|
||||
)
|
||||
|
||||
// GetSession returns the current Session
|
||||
func GetSession(c echo.Context) *Session {
|
||||
return c.(*Session)
|
||||
}
|
||||
|
||||
// UseSession establishes a Session Cookie.
|
||||
func UseSession(next echo.HandlerFunc) echo.HandlerFunc {
|
||||
return func(c echo.Context) error {
|
||||
sc := initSession(c)
|
||||
headers := new(headers.RequestHeaders)
|
||||
err := sc.Bind(headers)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return next(sc)
|
||||
}
|
||||
}
|
||||
|
||||
func initSession(c echo.Context) *Session {
|
||||
s := &Session{Context: c}
|
||||
if val := ReadCookie(c, "session"); val == "" {
|
||||
id := ksuid.New().String()
|
||||
WriteCookie(c, "session", id)
|
||||
}
|
||||
return s
|
||||
}
|
||||
@@ -2,13 +2,13 @@
|
||||
package dwn
|
||||
|
||||
type Config struct {
|
||||
Ipfs *IPFS `pkl:"ipfs" json:"ipfs,omitempty"`
|
||||
Ipfs *IPFS `pkl:"ipfs"`
|
||||
|
||||
Sonr *Sonr `pkl:"sonr" json:"sonr,omitempty"`
|
||||
Sonr *Sonr `pkl:"sonr"`
|
||||
|
||||
Motr *Motr `pkl:"motr" json:"motr,omitempty"`
|
||||
Motr *Motr `pkl:"motr"`
|
||||
|
||||
Schema *Schema `pkl:"schema" json:"schema,omitempty"`
|
||||
Schema *Schema `pkl:"schema"`
|
||||
|
||||
ProxyUrl string `pkl:"proxyUrl" json:"proxyUrl,omitempty"`
|
||||
ProxyUrl string `pkl:"proxyUrl"`
|
||||
}
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@
|
||||
package dwn
|
||||
|
||||
type IPFS struct {
|
||||
ApiUrl string `pkl:"apiUrl" json:"apiUrl,omitempty"`
|
||||
ApiUrl string `pkl:"apiUrl"`
|
||||
|
||||
GatewayUrl string `pkl:"gatewayUrl" json:"gatewayUrl,omitempty"`
|
||||
GatewayUrl string `pkl:"gatewayUrl"`
|
||||
}
|
||||
|
||||
+3
-3
@@ -2,9 +2,9 @@
|
||||
package dwn
|
||||
|
||||
type Motr struct {
|
||||
Keyshare string `pkl:"keyshare" json:"keyshare,omitempty"`
|
||||
Keyshare string `pkl:"keyshare"`
|
||||
|
||||
Address string `pkl:"address" json:"address,omitempty"`
|
||||
Address string `pkl:"address"`
|
||||
|
||||
Origin string `pkl:"origin" json:"origin,omitempty"`
|
||||
Origin string `pkl:"origin"`
|
||||
}
|
||||
|
||||
@@ -4,19 +4,19 @@ package dwn
|
||||
type Schema struct {
|
||||
Version int `pkl:"version"`
|
||||
|
||||
Account string `pkl:"account" json:"account,omitempty"`
|
||||
Account string `pkl:"account"`
|
||||
|
||||
Asset string `pkl:"asset" json:"asset,omitempty"`
|
||||
Asset string `pkl:"asset"`
|
||||
|
||||
Chain string `pkl:"chain" json:"chain,omitempty"`
|
||||
Chain string `pkl:"chain"`
|
||||
|
||||
Credential string `pkl:"credential" json:"credential,omitempty"`
|
||||
Credential string `pkl:"credential"`
|
||||
|
||||
Jwk string `pkl:"jwk" json:"jwk,omitempty"`
|
||||
Jwk string `pkl:"jwk"`
|
||||
|
||||
Grant string `pkl:"grant" json:"grant,omitempty"`
|
||||
Grant string `pkl:"grant"`
|
||||
|
||||
Keyshare string `pkl:"keyshare" json:"keyshare,omitempty"`
|
||||
Keyshare string `pkl:"keyshare"`
|
||||
|
||||
Profile string `pkl:"profile" json:"profile,omitempty"`
|
||||
Profile string `pkl:"profile"`
|
||||
}
|
||||
|
||||
+5
-5
@@ -2,13 +2,13 @@
|
||||
package dwn
|
||||
|
||||
type Sonr struct {
|
||||
ApiUrl string `pkl:"apiUrl" json:"apiUrl,omitempty"`
|
||||
ApiUrl string `pkl:"apiUrl"`
|
||||
|
||||
GrpcUrl string `pkl:"grpcUrl" json:"grpcUrl,omitempty"`
|
||||
GrpcUrl string `pkl:"grpcUrl"`
|
||||
|
||||
RpcUrl string `pkl:"rpcUrl" json:"rpcUrl,omitempty"`
|
||||
RpcUrl string `pkl:"rpcUrl"`
|
||||
|
||||
WebSocketUrl string `pkl:"webSocketUrl" json:"webSocketUrl,omitempty"`
|
||||
WebSocketUrl string `pkl:"webSocketUrl"`
|
||||
|
||||
ChainId string `pkl:"chainId" json:"chainId,omitempty"`
|
||||
ChainId string `pkl:"chainId"`
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -13,15 +13,11 @@ import (
|
||||
//go:embed app.wasm
|
||||
var dwnWasmData []byte
|
||||
|
||||
//go:embed motr.mjs
|
||||
var motrMJSData []byte
|
||||
|
||||
//go:embed sw.js
|
||||
var swJSData []byte
|
||||
|
||||
var (
|
||||
dwnWasmFile = files.NewBytesFile(dwnWasmData)
|
||||
motrMJSFile = files.NewBytesFile(motrMJSData)
|
||||
swJSFile = files.NewBytesFile(swJSData)
|
||||
)
|
||||
|
||||
@@ -43,7 +39,6 @@ func NewVaultDirectory(cnfg *Config) (files.Node, error) {
|
||||
}
|
||||
fileMap := map[string]files.Node{
|
||||
"config.json": files.NewBytesFile(dwnJSON),
|
||||
"motr.mjs": motrMJSFile,
|
||||
"sw.js": swJSFile,
|
||||
"app.wasm": dwnWasmFile,
|
||||
"index.html": files.NewBytesFile(w.Bytes()),
|
||||
|
||||
@@ -1,253 +0,0 @@
|
||||
// motr.mjs
|
||||
|
||||
import Dexie from "dexie";
|
||||
|
||||
export class Motr {
|
||||
constructor(config) {
|
||||
this.config = config;
|
||||
this.vault = null;
|
||||
this.initializeVault();
|
||||
}
|
||||
|
||||
initializeVault() {
|
||||
const { schema } = this.config;
|
||||
this.vault = new Dexie("Vault");
|
||||
this.vault.version(schema.version).stores(schema);
|
||||
}
|
||||
|
||||
// Account methods
|
||||
async insertAccount(accountData) {
|
||||
return this.vault.account.add(accountData);
|
||||
}
|
||||
|
||||
async getAccount(id) {
|
||||
return this.vault.account.get(id);
|
||||
}
|
||||
|
||||
async updateAccount(id, accountData) {
|
||||
return this.vault.account.update(id, accountData);
|
||||
}
|
||||
|
||||
async deleteAccount(id) {
|
||||
return this.vault.account.delete(id);
|
||||
}
|
||||
|
||||
// Asset methods
|
||||
async insertAsset(assetData) {
|
||||
return this.vault.asset.add(assetData);
|
||||
}
|
||||
|
||||
async getAsset(id) {
|
||||
return this.vault.asset.get(id);
|
||||
}
|
||||
|
||||
async updateAsset(id, assetData) {
|
||||
return this.vault.asset.update(id, assetData);
|
||||
}
|
||||
|
||||
async deleteAsset(id) {
|
||||
return this.vault.asset.delete(id);
|
||||
}
|
||||
|
||||
// Chain methods
|
||||
async insertChain(chainData) {
|
||||
return this.vault.chain.add(chainData);
|
||||
}
|
||||
|
||||
async getChain(id) {
|
||||
return this.vault.chain.get(id);
|
||||
}
|
||||
|
||||
async updateChain(id, chainData) {
|
||||
return this.vault.chain.update(id, chainData);
|
||||
}
|
||||
|
||||
async deleteChain(id) {
|
||||
return this.vault.chain.delete(id);
|
||||
}
|
||||
|
||||
// Credential methods
|
||||
async insertCredential(credentialData) {
|
||||
const publicKey = await this.createPublicKeyCredential(credentialData);
|
||||
credentialData.credentialId = publicKey.id;
|
||||
credentialData.publicKey = publicKey.publicKey;
|
||||
return this.vault.credential.add(credentialData);
|
||||
}
|
||||
|
||||
async getCredential(id) {
|
||||
return this.vault.credential.get(id);
|
||||
}
|
||||
|
||||
async updateCredential(id, credentialData) {
|
||||
return this.vault.credential.update(id, credentialData);
|
||||
}
|
||||
|
||||
async deleteCredential(id) {
|
||||
return this.vault.credential.delete(id);
|
||||
}
|
||||
|
||||
// JWK methods
|
||||
async insertJwk(jwkData) {
|
||||
return this.vault.jwk.add(jwkData);
|
||||
}
|
||||
|
||||
async getJwk(id) {
|
||||
return this.vault.jwk.get(id);
|
||||
}
|
||||
|
||||
async updateJwk(id, jwkData) {
|
||||
return this.vault.jwk.update(id, jwkData);
|
||||
}
|
||||
|
||||
async deleteJwk(id) {
|
||||
return this.vault.jwk.delete(id);
|
||||
}
|
||||
|
||||
// Grant methods
|
||||
async insertGrant(grantData) {
|
||||
return this.vault.grant.add(grantData);
|
||||
}
|
||||
|
||||
async getGrant(id) {
|
||||
return this.vault.grant.get(id);
|
||||
}
|
||||
|
||||
async updateGrant(id, grantData) {
|
||||
return this.vault.grant.update(id, grantData);
|
||||
}
|
||||
|
||||
async deleteGrant(id) {
|
||||
return this.vault.grant.delete(id);
|
||||
}
|
||||
|
||||
// Keyshare methods
|
||||
async insertKeyshare(keyshareData) {
|
||||
return this.vault.keyshare.add(keyshareData);
|
||||
}
|
||||
|
||||
async getKeyshare(id) {
|
||||
return this.vault.keyshare.get(id);
|
||||
}
|
||||
|
||||
async updateKeyshare(id, keyshareData) {
|
||||
return this.vault.keyshare.update(id, keyshareData);
|
||||
}
|
||||
|
||||
async deleteKeyshare(id) {
|
||||
return this.vault.keyshare.delete(id);
|
||||
}
|
||||
|
||||
// PublicKey methods
|
||||
async insertPublicKey(publicKeyData) {
|
||||
return this.vault.publicKey.add(publicKeyData);
|
||||
}
|
||||
|
||||
async getPublicKey(id) {
|
||||
return this.vault.publicKey.get(id);
|
||||
}
|
||||
|
||||
async updatePublicKey(id, publicKeyData) {
|
||||
return this.vault.publicKey.update(id, publicKeyData);
|
||||
}
|
||||
|
||||
async deletePublicKey(id) {
|
||||
return this.vault.publicKey.delete(id);
|
||||
}
|
||||
|
||||
// Profile methods
|
||||
async insertProfile(profileData) {
|
||||
return this.vault.profile.add(profileData);
|
||||
}
|
||||
|
||||
async getProfile(id) {
|
||||
return this.vault.profile.get(id);
|
||||
}
|
||||
|
||||
async updateProfile(id, profileData) {
|
||||
return this.vault.profile.update(id, profileData);
|
||||
}
|
||||
|
||||
async deleteProfile(id) {
|
||||
return this.vault.profile.delete(id);
|
||||
}
|
||||
|
||||
// WebAuthn methods
|
||||
async createPublicKeyCredential(options) {
|
||||
const publicKeyCredentialCreationOptions = {
|
||||
challenge: new Uint8Array(32),
|
||||
rp: {
|
||||
name: this.config.motr.origin,
|
||||
id: new URL(this.config.motr.origin).hostname,
|
||||
},
|
||||
user: {
|
||||
id: new TextEncoder().encode(options.subject),
|
||||
name: options.subject,
|
||||
displayName: options.label,
|
||||
},
|
||||
pubKeyCredParams: [
|
||||
{ alg: -7, type: "public-key" },
|
||||
{ alg: -257, type: "public-key" },
|
||||
],
|
||||
authenticatorSelection: {
|
||||
authenticatorAttachment: "platform",
|
||||
userVerification: "required",
|
||||
},
|
||||
timeout: 60000,
|
||||
attestation: "direct",
|
||||
};
|
||||
|
||||
try {
|
||||
const credential = await navigator.credentials.create({
|
||||
publicKey: publicKeyCredentialCreationOptions,
|
||||
});
|
||||
|
||||
const publicKeyJwk = await crypto.subtle.exportKey(
|
||||
"jwk",
|
||||
credential.response.getPublicKey(),
|
||||
);
|
||||
|
||||
return {
|
||||
id: credential.id,
|
||||
publicKey: publicKeyJwk,
|
||||
type: credential.type,
|
||||
transports: credential.response.getTransports(),
|
||||
};
|
||||
} catch (error) {
|
||||
console.error("Error creating credential:", error);
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
async getPublicKeyCredential(options) {
|
||||
const publicKeyCredentialRequestOptions = {
|
||||
challenge: new Uint8Array(32),
|
||||
rpId: new URL(this.config.motr.origin).hostname,
|
||||
allowCredentials: options.allowCredentials || [],
|
||||
userVerification: "required",
|
||||
timeout: 60000,
|
||||
};
|
||||
|
||||
try {
|
||||
const assertion = await navigator.credentials.get({
|
||||
publicKey: publicKeyCredentialRequestOptions,
|
||||
});
|
||||
|
||||
return {
|
||||
id: assertion.id,
|
||||
type: assertion.type,
|
||||
rawId: new Uint8Array(assertion.rawId),
|
||||
response: {
|
||||
authenticatorData: new Uint8Array(
|
||||
assertion.response.authenticatorData,
|
||||
),
|
||||
clientDataJSON: new Uint8Array(assertion.response.clientDataJSON),
|
||||
signature: new Uint8Array(assertion.response.signature),
|
||||
userHandle: new Uint8Array(assertion.response.userHandle),
|
||||
},
|
||||
};
|
||||
} catch (error) {
|
||||
console.error("Error getting credential:", error);
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
}
|
||||
+365
-188
@@ -54,6 +54,74 @@
|
||||
--tw-contain-layout: ;
|
||||
--tw-contain-paint: ;
|
||||
--tw-contain-style: ;
|
||||
--motion-origin-scale-x: 1;
|
||||
--motion-origin-scale-y: 1;
|
||||
--motion-origin-translate-x: 0;
|
||||
--motion-origin-translate-y: 0;
|
||||
--motion-origin-rotate: 0;
|
||||
--motion-origin-blur: 0;
|
||||
--motion-origin-grayscale: 0;
|
||||
--motion-origin-opacity: 1;
|
||||
--motion-origin-background-color: ;
|
||||
--motion-origin-text-color: ;
|
||||
--motion-end-scale-x: 1;
|
||||
--motion-end-scale-y: 1;
|
||||
--motion-end-translate-x: 0;
|
||||
--motion-end-translate-y: 0;
|
||||
--motion-end-rotate: 0;
|
||||
--motion-end-blur: 0;
|
||||
--motion-end-grayscale: 0;
|
||||
--motion-end-opacity: 1;
|
||||
--motion-end-background-color: ;
|
||||
--motion-end-text-color: ;
|
||||
--motion-duration: 750ms;
|
||||
--motion-timing: var(--motion-default-timing);
|
||||
--motion-perceptual-duration-multiplier: 1;
|
||||
--motion-delay: 0ms;
|
||||
--motion-scale-duration: var(--motion-duration);
|
||||
--motion-scale-timing: var(--motion-timing);
|
||||
--motion-scale-perceptual-duration-multiplier: var(--motion-perceptual-duration-multiplier);
|
||||
--motion-scale-delay: var(--motion-delay);
|
||||
--motion-translate-duration: var(--motion-duration);
|
||||
--motion-translate-timing: var(--motion-timing);
|
||||
--motion-translate-perceptual-duration-multiplier: var(--motion-perceptual-duration-multiplier);
|
||||
--motion-translate-delay: var(--motion-delay);
|
||||
--motion-rotate-duration: var(--motion-duration);
|
||||
--motion-rotate-timing: var(--motion-timing);
|
||||
--motion-rotate-perceptual-duration-multiplier: var(--motion-perceptual-duration-multiplier);
|
||||
--motion-rotate-delay: var(--motion-delay);
|
||||
--motion-filter-duration: var(--motion-duration);
|
||||
--motion-filter-timing: var(--motion-timing);
|
||||
--motion-filter-perceptual-duration-multiplier: var(--motion-perceptual-duration-multiplier);
|
||||
--motion-filter-delay: var(--motion-delay);
|
||||
--motion-opacity-duration: var(--motion-duration);
|
||||
--motion-opacity-timing: var(--motion-timing);
|
||||
--motion-opacity-perceptual-duration-multiplier: var(--motion-perceptual-duration-multiplier);
|
||||
--motion-opacity-delay: var(--motion-delay);
|
||||
--motion-background-color-duration: var(--motion-duration);
|
||||
--motion-background-color-timing: var(--motion-timing);
|
||||
--motion-background-color-perceptual-duration-multiplier: var(--motion-perceptual-duration-multiplier);
|
||||
--motion-background-color-delay: var(--motion-delay);
|
||||
--motion-text-color-duration: var(--motion-duration);
|
||||
--motion-text-color-timing: var(--motion-timing);
|
||||
--motion-text-color-perceptual-duration-multiplier: var(--motion-perceptual-duration-multiplier);
|
||||
--motion-text-color-delay: var(--motion-delay);
|
||||
--motion-scale-in-animation: none;
|
||||
--motion-translate-in-animation: none;
|
||||
--motion-rotate-in-animation: none;
|
||||
--motion-filter-in-animation: none;
|
||||
--motion-opacity-in-animation: none;
|
||||
--motion-background-color-in-animation: none;
|
||||
--motion-text-color-in-animation: none;
|
||||
--motion-scale-out-animation: none;
|
||||
--motion-translate-out-animation: none;
|
||||
--motion-rotate-out-animation: none;
|
||||
--motion-filter-out-animation: none;
|
||||
--motion-opacity-out-animation: none;
|
||||
--motion-background-color-out-animation: none;
|
||||
--motion-text-color-out-animation: none;
|
||||
--motion-all-enter-animations: var(--motion-scale-in-animation), var(--motion-translate-in-animation), var(--motion-rotate-in-animation), var(--motion-filter-in-animation), var(--motion-opacity-in-animation), var(--motion-background-color-in-animation), var(--motion-text-color-in-animation);
|
||||
--motion-all-exit-animations: var(--motion-scale-out-animation), var(--motion-translate-out-animation), var(--motion-rotate-out-animation), var(--motion-filter-out-animation), var(--motion-opacity-out-animation), var(--motion-background-color-out-animation), var(--motion-text-color-out-animation);
|
||||
}
|
||||
|
||||
::backdrop{
|
||||
@@ -108,6 +176,74 @@
|
||||
--tw-contain-layout: ;
|
||||
--tw-contain-paint: ;
|
||||
--tw-contain-style: ;
|
||||
--motion-origin-scale-x: 1;
|
||||
--motion-origin-scale-y: 1;
|
||||
--motion-origin-translate-x: 0;
|
||||
--motion-origin-translate-y: 0;
|
||||
--motion-origin-rotate: 0;
|
||||
--motion-origin-blur: 0;
|
||||
--motion-origin-grayscale: 0;
|
||||
--motion-origin-opacity: 1;
|
||||
--motion-origin-background-color: ;
|
||||
--motion-origin-text-color: ;
|
||||
--motion-end-scale-x: 1;
|
||||
--motion-end-scale-y: 1;
|
||||
--motion-end-translate-x: 0;
|
||||
--motion-end-translate-y: 0;
|
||||
--motion-end-rotate: 0;
|
||||
--motion-end-blur: 0;
|
||||
--motion-end-grayscale: 0;
|
||||
--motion-end-opacity: 1;
|
||||
--motion-end-background-color: ;
|
||||
--motion-end-text-color: ;
|
||||
--motion-duration: 750ms;
|
||||
--motion-timing: var(--motion-default-timing);
|
||||
--motion-perceptual-duration-multiplier: 1;
|
||||
--motion-delay: 0ms;
|
||||
--motion-scale-duration: var(--motion-duration);
|
||||
--motion-scale-timing: var(--motion-timing);
|
||||
--motion-scale-perceptual-duration-multiplier: var(--motion-perceptual-duration-multiplier);
|
||||
--motion-scale-delay: var(--motion-delay);
|
||||
--motion-translate-duration: var(--motion-duration);
|
||||
--motion-translate-timing: var(--motion-timing);
|
||||
--motion-translate-perceptual-duration-multiplier: var(--motion-perceptual-duration-multiplier);
|
||||
--motion-translate-delay: var(--motion-delay);
|
||||
--motion-rotate-duration: var(--motion-duration);
|
||||
--motion-rotate-timing: var(--motion-timing);
|
||||
--motion-rotate-perceptual-duration-multiplier: var(--motion-perceptual-duration-multiplier);
|
||||
--motion-rotate-delay: var(--motion-delay);
|
||||
--motion-filter-duration: var(--motion-duration);
|
||||
--motion-filter-timing: var(--motion-timing);
|
||||
--motion-filter-perceptual-duration-multiplier: var(--motion-perceptual-duration-multiplier);
|
||||
--motion-filter-delay: var(--motion-delay);
|
||||
--motion-opacity-duration: var(--motion-duration);
|
||||
--motion-opacity-timing: var(--motion-timing);
|
||||
--motion-opacity-perceptual-duration-multiplier: var(--motion-perceptual-duration-multiplier);
|
||||
--motion-opacity-delay: var(--motion-delay);
|
||||
--motion-background-color-duration: var(--motion-duration);
|
||||
--motion-background-color-timing: var(--motion-timing);
|
||||
--motion-background-color-perceptual-duration-multiplier: var(--motion-perceptual-duration-multiplier);
|
||||
--motion-background-color-delay: var(--motion-delay);
|
||||
--motion-text-color-duration: var(--motion-duration);
|
||||
--motion-text-color-timing: var(--motion-timing);
|
||||
--motion-text-color-perceptual-duration-multiplier: var(--motion-perceptual-duration-multiplier);
|
||||
--motion-text-color-delay: var(--motion-delay);
|
||||
--motion-scale-in-animation: none;
|
||||
--motion-translate-in-animation: none;
|
||||
--motion-rotate-in-animation: none;
|
||||
--motion-filter-in-animation: none;
|
||||
--motion-opacity-in-animation: none;
|
||||
--motion-background-color-in-animation: none;
|
||||
--motion-text-color-in-animation: none;
|
||||
--motion-scale-out-animation: none;
|
||||
--motion-translate-out-animation: none;
|
||||
--motion-rotate-out-animation: none;
|
||||
--motion-filter-out-animation: none;
|
||||
--motion-opacity-out-animation: none;
|
||||
--motion-background-color-out-animation: none;
|
||||
--motion-text-color-out-animation: none;
|
||||
--motion-all-enter-animations: var(--motion-scale-in-animation), var(--motion-translate-in-animation), var(--motion-rotate-in-animation), var(--motion-filter-in-animation), var(--motion-opacity-in-animation), var(--motion-background-color-in-animation), var(--motion-text-color-in-animation);
|
||||
--motion-all-exit-animations: var(--motion-scale-out-animation), var(--motion-translate-out-animation), var(--motion-rotate-out-animation), var(--motion-filter-out-animation), var(--motion-opacity-out-animation), var(--motion-background-color-out-animation), var(--motion-text-color-out-animation);
|
||||
}
|
||||
|
||||
/* ! tailwindcss v3.4.13 | MIT License | https://tailwindcss.com */
|
||||
@@ -751,6 +887,87 @@ select{
|
||||
outline: 1px auto -webkit-focus-ring-color;
|
||||
}
|
||||
|
||||
:root{
|
||||
--motion-default-timing: cubic-bezier(.165, .84, .44, 1);
|
||||
--motion-bounce: linear(0, 0.004, 0.016, 0.035, 0.063, 0.098, 0.141 13.6%, 0.25, 0.391, 0.563, 0.765,1, 0.891 40.9%, 0.848, 0.813, 0.785, 0.766, 0.754, 0.75, 0.754, 0.766, 0.785,0.813, 0.848, 0.891 68.2%, 1 72.7%, 0.973, 0.953, 0.941, 0.938, 0.941, 0.953,0.973, 1, 0.988, 0.984, 0.988, 1);
|
||||
--motion-spring-smooth: linear(0, 0.001 0.44%, 0.0045 0.94%, 0.0195 2.03%, 0.0446 3.19%, 0.0811 4.5%, 0.1598 6.82%, 0.3685 12.34%, 0.4693 15.17%, 0.5663, 0.6498 21.27%, 0.7215 24.39%, 0.7532 25.98%, 0.7829 27.65%, 0.8105, 0.8349 31.14%, 0.8573 32.95%, 0.8776 34.84%, 0.8964 36.87%, 0.9136 39.05%, 0.929 41.37%, 0.9421 43.77%, 0.9537 46.38%, 0.9636 49.14%, 0.9789 55.31%, 0.9888 62.35%, 0.9949 71.06%, 0.9982 82.52%, 0.9997 99.94%);
|
||||
--motion-spring-snappy: linear(0, 0.0014, 0.0053 1.02%, 0.0126, 0.0227 2.18%, 0.0517 3.41%, 0.094 4.79%, 0.1865 7.26%, 0.4182 12.77%, 0.5246 15.46%, 0.6249, 0.7112, 0.7831 23.95%, 0.8146 25.4%, 0.844, 0.8699 28.45%, 0.8935, 0.9139 31.64%, 0.932, 0.9473, 0.9601 36.65%, 0.9714 38.47%, 0.9808 40.35%, 0.9948 44.49%, 1.0031 49.43%, 1.0057 53.35%, 1.0063 58.14%, 1.0014 80.78%, 1.0001 99.94%);
|
||||
--motion-spring-bouncy: linear(0, 0.0018, 0.0069, 0.0151 1.74%, 0.0277 2.4%, 0.062 3.7%, 0.1115 5.15%, 0.2211 7.77%, 0.4778 13.21%, 0.5912 15.75%, 0.6987 18.44%, 0.7862 20.98%, 0.861 23.59%, 0.8926, 0.9205, 0.945 27.51%, 0.9671 28.89%, 0.9868, 1.003 31.79%, 1.0224 34.11%, 1.0358 36.58%, 1.0436 39.27%, 1.046 42.31%, 1.0446 44.71%, 1.0406 47.47%, 1.0118 61.84%, 1.0027 69.53%, 0.9981 80.49%, 0.9991 99.94%);
|
||||
--motion-spring-bouncier: linear(0, 0.0023, 0.0088, 0.0194 1.59%, 0.035 2.17%, 0.078 3.33%, 0.1415 4.64%, 0.2054 5.75%, 0.2821 6.95%, 0.5912 11.45%, 0.7205 13.43%, 0.8393 15.45%, 0.936 17.39%, 0.9778, 1.015, 1.0477, 1.0759, 1.0998 22.22%, 1.1203, 1.1364, 1.1484 25.26%, 1.1586 26.61%, 1.1629 28.06%, 1.1613 29.56%, 1.1537 31.2%, 1.1434 32.6%, 1.1288 34.19%, 1.0508 41.29%, 1.0174 44.87%, 1.0025 46.89%, 0.9911 48.87%, 0.9826 50.9%, 0.9769 53.03%, 0.9735 56.02%, 0.9748 59.45%, 0.9964 72.64%, 1.0031 79.69%, 1.0042 86.83%, 1.0008 99.97%);
|
||||
--motion-spring-bounciest: linear(0, 0.0032, 0.0131, 0.0294, 0.0524, 0.0824, 0.1192 1.54%, 0.2134 2.11%, 0.3102 2.59%, 0.4297 3.13%, 0.8732 4.95%, 1.0373, 1.1827 6.36%, 1.2972 7.01%, 1.3444, 1.3859, 1.4215, 1.4504, 1.4735, 1.4908, 1.5024, 1.5084 9.5%, 1.5091, 1.5061, 1.4993, 1.4886, 1.4745, 1.4565 11.11%, 1.4082 11.7%, 1.3585 12.2%, 1.295 12.77%, 1.0623 14.64%, 0.9773, 0.9031 16.08%, 0.8449 16.73%, 0.8014, 0.7701 17.95%, 0.7587, 0.7501, 0.7443, 0.7412 19.16%, 0.7421 19.68%, 0.7508 20.21%, 0.7672 20.77%, 0.7917 21.37%, 0.8169 21.87%, 0.8492 22.43%, 0.9681 24.32%, 1.0114, 1.0492 25.75%, 1.0789 26.41%, 1.1008, 1.1167, 1.1271, 1.1317 28.81%, 1.1314, 1.1271 29.87%, 1.1189 30.43%, 1.1063 31.03%, 1.0769 32.11%, 0.9941 34.72%, 0.9748 35.43%, 0.9597 36.09%, 0.9487, 0.9407, 0.9355, 0.933 38.46%, 0.9344 39.38%, 0.9421 40.38%, 0.9566 41.5%, 0.9989 44.12%, 1.0161 45.37%, 1.029 46.75%, 1.0341 48.1%, 1.0335 49.04%, 1.0295 50.05%, 1.0221 51.18%, 0.992 55.02%, 0.9854 56.38%, 0.9827 57.72%, 0.985 59.73%, 1.004 64.67%, 1.0088 67.34%, 1.0076 69.42%, 0.9981 74.28%, 0.9956 76.85%, 0.9961 79.06%, 1.0023 86.46%, 0.999 95.22%, 0.9994 100%);
|
||||
}
|
||||
|
||||
.motion-preset-slide-up{
|
||||
--motion-origin-translate-y: 25%;
|
||||
--motion-origin-opacity: 0;
|
||||
--motion-opacity-in-animation: motion-opacity-in calc(var(--motion-opacity-duration) * var(--motion-opacity-perceptual-duration-multiplier)) var(--motion-opacity-timing) var(--motion-opacity-delay) both;
|
||||
--motion-translate-in-animation: motion-translate-in calc(var(--motion-translate-duration) * var(--motion-translate-perceptual-duration-multiplier)) var(--motion-translate-timing) var(--motion-translate-delay) both;
|
||||
animation: var(--motion-all-enter-animations);
|
||||
}
|
||||
|
||||
@keyframes RomboConfettiPop{
|
||||
0%{
|
||||
opacity: 0;
|
||||
transform: scale(1);
|
||||
}
|
||||
|
||||
33%{
|
||||
opacity: 1;
|
||||
transform: scale(1.15);
|
||||
}
|
||||
|
||||
50%{
|
||||
transform: scale(0.975);
|
||||
}
|
||||
|
||||
65%{
|
||||
transform: scale(1.025);
|
||||
}
|
||||
|
||||
80%{
|
||||
transform: scale(0.99);
|
||||
}
|
||||
|
||||
87%{
|
||||
transform: scale(1.01);
|
||||
}
|
||||
|
||||
100%{
|
||||
opacity: 1;
|
||||
transform: scale(1);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes topfetti{
|
||||
0%{
|
||||
background-position: 5% 90%, 10% 90%, 10% 90%, 15% 90%, 25% 90%, 25% 90%, 40% 90%, 55% 90%, 70% 90%;
|
||||
}
|
||||
|
||||
50%{
|
||||
background-position: 0% 80%, 0% 20%, 10% 40%, 20% 0%, 30% 30%, 22% 50%, 50% 50%, 65% 20%, 90% 30%;
|
||||
}
|
||||
|
||||
100%{
|
||||
background-position: 0% 70%, 0% 10%, 10% 30%, 20% -10%, 30% 20%, 22% 40%, 50% 40%, 65% 10%, 90% 20%;
|
||||
background-size: 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes bottomfetti{
|
||||
0%{
|
||||
background-position: 10% -10%, 30% 10%, 55% -10%, 70% -10%, 85% -10%,70% -10%, 70% 0%;
|
||||
}
|
||||
|
||||
50%{
|
||||
background-position: 0% 80%, 20% 80%, 45% 60%, 60% 100%, 75% 70%, 95% 60%, 105% 0%;
|
||||
}
|
||||
|
||||
100%{
|
||||
background-position: 0% 90%, 20% 90%, 45% 70%, 60% 110%, 75% 80%, 95% 70%, 110% 10%;
|
||||
background-size: 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%;
|
||||
}
|
||||
}
|
||||
|
||||
.fixed{
|
||||
position: fixed;
|
||||
}
|
||||
@@ -779,10 +996,6 @@ select{
|
||||
left: 50%;
|
||||
}
|
||||
|
||||
.left-full{
|
||||
left: 100%;
|
||||
}
|
||||
|
||||
.right-0{
|
||||
right: 0px;
|
||||
}
|
||||
@@ -850,10 +1063,6 @@ select{
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.-mr-20{
|
||||
margin-right: -5rem;
|
||||
}
|
||||
|
||||
.mb-1{
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
@@ -950,10 +1159,6 @@ select{
|
||||
display: block;
|
||||
}
|
||||
|
||||
.inline-block{
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.flex{
|
||||
display: flex;
|
||||
}
|
||||
@@ -962,18 +1167,10 @@ select{
|
||||
display: inline-flex;
|
||||
}
|
||||
|
||||
.table{
|
||||
display: table;
|
||||
}
|
||||
|
||||
.grid{
|
||||
display: grid;
|
||||
}
|
||||
|
||||
.inline-grid{
|
||||
display: inline-grid;
|
||||
}
|
||||
|
||||
.hidden{
|
||||
display: none;
|
||||
}
|
||||
@@ -1046,10 +1243,6 @@ select{
|
||||
width: 0px;
|
||||
}
|
||||
|
||||
.w-1\/2{
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.w-1\/3{
|
||||
width: 33.333333%;
|
||||
}
|
||||
@@ -1119,10 +1312,6 @@ select{
|
||||
width: 100vw;
|
||||
}
|
||||
|
||||
.min-w-full{
|
||||
min-width: 100%;
|
||||
}
|
||||
|
||||
.max-w-2xl{
|
||||
max-width: 42rem;
|
||||
}
|
||||
@@ -1208,11 +1397,6 @@ select{
|
||||
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
||||
}
|
||||
|
||||
.-translate-x-\[70\%\]{
|
||||
--tw-translate-x: -70%;
|
||||
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
||||
}
|
||||
|
||||
.-translate-x-px{
|
||||
--tw-translate-x: -1px;
|
||||
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
||||
@@ -1273,11 +1457,6 @@ select{
|
||||
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
||||
}
|
||||
|
||||
.translate-y-px{
|
||||
--tw-translate-y: 1px;
|
||||
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
||||
}
|
||||
|
||||
.rotate-1{
|
||||
--tw-rotate: 1deg;
|
||||
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
||||
@@ -1335,20 +1514,10 @@ select{
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.select-none{
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.grid-cols-2{
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
.grid-cols-3{
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
.flex-row{
|
||||
flex-direction: row;
|
||||
}
|
||||
@@ -1464,12 +1633,6 @@ select{
|
||||
margin-bottom: calc(0.5rem * var(--tw-space-y-reverse));
|
||||
}
|
||||
|
||||
.space-y-3 > :not([hidden]) ~ :not([hidden]){
|
||||
--tw-space-y-reverse: 0;
|
||||
margin-top: calc(0.75rem * calc(1 - var(--tw-space-y-reverse)));
|
||||
margin-bottom: calc(0.75rem * var(--tw-space-y-reverse));
|
||||
}
|
||||
|
||||
.space-y-4 > :not([hidden]) ~ :not([hidden]){
|
||||
--tw-space-y-reverse: 0;
|
||||
margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse)));
|
||||
@@ -1482,29 +1645,10 @@ select{
|
||||
margin-bottom: calc(1.5rem * var(--tw-space-y-reverse));
|
||||
}
|
||||
|
||||
.divide-y > :not([hidden]) ~ :not([hidden]){
|
||||
--tw-divide-y-reverse: 0;
|
||||
border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse)));
|
||||
border-bottom-width: calc(1px * var(--tw-divide-y-reverse));
|
||||
}
|
||||
|
||||
.divide-neutral-200 > :not([hidden]) ~ :not([hidden]){
|
||||
--tw-divide-opacity: 1;
|
||||
border-color: rgb(229 229 229 / var(--tw-divide-opacity));
|
||||
}
|
||||
|
||||
.overflow-hidden{
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.overflow-x-auto{
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.whitespace-nowrap{
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.rounded{
|
||||
border-radius: 0.25rem;
|
||||
}
|
||||
@@ -1551,15 +1695,6 @@ select{
|
||||
border-color: rgb(37 99 235 / var(--tw-border-opacity));
|
||||
}
|
||||
|
||||
.border-gray-100{
|
||||
--tw-border-opacity: 1;
|
||||
border-color: rgb(243 244 246 / var(--tw-border-opacity));
|
||||
}
|
||||
|
||||
.border-gray-200\/70{
|
||||
border-color: rgb(229 231 235 / 0.7);
|
||||
}
|
||||
|
||||
.border-green-600{
|
||||
--tw-border-opacity: 1;
|
||||
border-color: rgb(22 163 74 / var(--tw-border-opacity));
|
||||
@@ -1612,6 +1747,11 @@ select{
|
||||
border-color: rgb(228 228 231 / var(--tw-border-opacity));
|
||||
}
|
||||
|
||||
.border-zinc-300{
|
||||
--tw-border-opacity: 1;
|
||||
border-color: rgb(212 212 216 / var(--tw-border-opacity));
|
||||
}
|
||||
|
||||
.bg-blue-50{
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(239 246 255 / var(--tw-bg-opacity));
|
||||
@@ -1622,26 +1762,11 @@ select{
|
||||
background-color: rgb(37 99 235 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.bg-gray-100{
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(243 244 246 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.bg-gray-900{
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(17 24 39 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.bg-green-50{
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(240 253 244 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.bg-green-500{
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(34 197 94 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.bg-green-600{
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(22 163 74 / var(--tw-bg-opacity));
|
||||
@@ -1686,11 +1811,6 @@ select{
|
||||
background-color: rgb(254 252 232 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.bg-yellow-500{
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(234 179 8 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.bg-yellow-600{
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(202 138 4 / var(--tw-bg-opacity));
|
||||
@@ -1884,11 +2004,6 @@ select{
|
||||
padding-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.py-3{
|
||||
padding-top: 0.75rem;
|
||||
padding-bottom: 0.75rem;
|
||||
}
|
||||
|
||||
.py-4{
|
||||
padding-top: 1rem;
|
||||
padding-bottom: 1rem;
|
||||
@@ -1986,10 +2101,6 @@ select{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.text-right{
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.align-top{
|
||||
vertical-align: top;
|
||||
}
|
||||
@@ -2134,16 +2245,6 @@ select{
|
||||
color: rgb(75 85 99 / var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
.text-gray-700{
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(55 65 81 / var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
.text-gray-900{
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(17 24 39 / var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
.text-green-500{
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(34 197 94 / var(--tw-text-opacity));
|
||||
@@ -2268,10 +2369,6 @@ select{
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.opacity-50{
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.opacity-60{
|
||||
opacity: 0.6;
|
||||
}
|
||||
@@ -2336,12 +2433,6 @@ select{
|
||||
transition-duration: 150ms;
|
||||
}
|
||||
|
||||
.transition-all{
|
||||
transition-property: all;
|
||||
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
||||
transition-duration: 150ms;
|
||||
}
|
||||
|
||||
.transition-colors{
|
||||
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
|
||||
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
||||
@@ -2380,6 +2471,124 @@ select{
|
||||
transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
|
||||
}
|
||||
|
||||
@media screen and (prefers-reduced-motion: no-preference){
|
||||
@keyframes motion-scale-in{
|
||||
0%{
|
||||
scale: var(--motion-origin-scale-x) var(--motion-origin-scale-y);
|
||||
}
|
||||
|
||||
100%{
|
||||
scale: 1 1;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes motion-scale-out{
|
||||
0%{
|
||||
scale: 1 1;
|
||||
}
|
||||
|
||||
100%{
|
||||
scale: var(--motion-end-scale-x) var(--motion-end-scale-y);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes motion-translate-in{
|
||||
0%{
|
||||
translate: var(--motion-origin-translate-x) var(--motion-origin-translate-y);
|
||||
}
|
||||
|
||||
100%{
|
||||
translate: 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes motion-translate-out{
|
||||
0%{
|
||||
translate: 0 0;
|
||||
}
|
||||
|
||||
100%{
|
||||
translate: var(--motion-end-translate-x) var(--motion-end-translate-y);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes motion-rotate-in{
|
||||
0%{
|
||||
rotate: var(--motion-origin-rotate);
|
||||
}
|
||||
|
||||
100%{
|
||||
rotate: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes motion-rotate-out{
|
||||
0%{
|
||||
rotate: 0;
|
||||
}
|
||||
|
||||
100%{
|
||||
rotate: var(--motion-end-rotate);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes motion-filter-in{
|
||||
0%{
|
||||
filter: blur(var(--motion-origin-blur)) grayscale(var(--motion-origin-grayscale));
|
||||
}
|
||||
|
||||
100%{
|
||||
filter: blur(0) grayscale(0);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes motion-filter-out{
|
||||
0%{
|
||||
filter: blur(0) grayscale(0);
|
||||
}
|
||||
|
||||
100%{
|
||||
filter: blur(var(--motion-end-blur)) grayscale(var(--motion-end-grayscale));
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes motion-opacity-in{
|
||||
0%{
|
||||
opacity: var(--motion-origin-opacity);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes motion-opacity-out{
|
||||
100%{
|
||||
opacity: var(--motion-end-opacity);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes motion-background-color-in{
|
||||
0%{
|
||||
background-color: var(--motion-origin-background-color);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes motion-background-color-out{
|
||||
100%{
|
||||
background-color: var(--motion-end-background-color);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes motion-text-color-in{
|
||||
0%{
|
||||
color: var(--motion-origin-text-color);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes motion-text-color-out{
|
||||
100%{
|
||||
color: var(--motion-end-text-color);
|
||||
}
|
||||
}
|
||||
|
||||
.\[animation-delay\:-7\.5s\]{
|
||||
animation-delay: -7.5s;
|
||||
}
|
||||
@@ -2675,16 +2884,6 @@ input[type="search"]::-webkit-search-results-decoration {
|
||||
/* Firefox */
|
||||
}
|
||||
|
||||
.placeholder\:text-neutral-400::-moz-placeholder{
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(163 163 163 / var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
.placeholder\:text-neutral-400::placeholder{
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(163 163 163 / var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
.placeholder\:text-neutral-500::-moz-placeholder{
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(115 115 115 / var(--tw-text-opacity));
|
||||
@@ -2695,6 +2894,16 @@ input[type="search"]::-webkit-search-results-decoration {
|
||||
color: rgb(115 115 115 / var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
.placeholder\:text-zinc-400::-moz-placeholder{
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(161 161 170 / var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
.placeholder\:text-zinc-400::placeholder{
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(161 161 170 / var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
.before\:pointer-events-none::before{
|
||||
content: var(--tw-content);
|
||||
pointer-events: none;
|
||||
@@ -2898,11 +3107,6 @@ input[type="search"]::-webkit-search-results-decoration {
|
||||
background-color: rgb(29 78 216 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.hover\:bg-gray-50:hover{
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(249 250 251 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.hover\:bg-green-100:hover{
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(220 252 231 / var(--tw-bg-opacity));
|
||||
@@ -2963,6 +3167,11 @@ input[type="search"]::-webkit-search-results-decoration {
|
||||
background-color: rgb(161 98 7 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.hover\:bg-zinc-50:hover{
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(250 250 250 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.hover\:bg-zinc-800:hover{
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(39 39 42 / var(--tw-bg-opacity));
|
||||
@@ -2973,16 +3182,6 @@ input[type="search"]::-webkit-search-results-decoration {
|
||||
color: rgb(37 99 235 / var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
.hover\:text-blue-700:hover{
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(29 78 216 / var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
.hover\:text-gray-800:hover{
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(31 41 55 / var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
.hover\:text-green-600:hover{
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(22 163 74 / var(--tw-text-opacity));
|
||||
@@ -3023,6 +3222,11 @@ input[type="search"]::-webkit-search-results-decoration {
|
||||
color: rgb(212 212 216 / var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
.hover\:text-zinc-800:hover{
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(39 39 42 / var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
.hover\:text-zinc-900:hover{
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(24 24 27 / var(--tw-text-opacity));
|
||||
@@ -3041,6 +3245,11 @@ input[type="search"]::-webkit-search-results-decoration {
|
||||
border-color: rgb(212 212 212 / var(--tw-border-opacity));
|
||||
}
|
||||
|
||||
.focus\:border-zinc-300:focus{
|
||||
--tw-border-opacity: 1;
|
||||
border-color: rgb(212 212 216 / var(--tw-border-opacity));
|
||||
}
|
||||
|
||||
.focus\:bg-white:focus{
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(255 255 255 / var(--tw-bg-opacity));
|
||||
@@ -3071,11 +3280,6 @@ input[type="search"]::-webkit-search-results-decoration {
|
||||
--tw-ring-color: rgb(29 78 216 / var(--tw-ring-opacity));
|
||||
}
|
||||
|
||||
.focus\:ring-gray-700:focus{
|
||||
--tw-ring-opacity: 1;
|
||||
--tw-ring-color: rgb(55 65 81 / var(--tw-ring-opacity));
|
||||
}
|
||||
|
||||
.focus\:ring-green-100:focus{
|
||||
--tw-ring-opacity: 1;
|
||||
--tw-ring-color: rgb(220 252 231 / var(--tw-ring-opacity));
|
||||
@@ -3209,12 +3413,6 @@ input[type="search"]::-webkit-search-results-decoration {
|
||||
}
|
||||
}
|
||||
|
||||
@media not all and (min-width: 768px){
|
||||
.max-md\:w-\[45\%\]{
|
||||
width: 45%;
|
||||
}
|
||||
}
|
||||
|
||||
@media not all and (min-width: 640px){
|
||||
.max-sm\:order-1{
|
||||
order: 1;
|
||||
@@ -3530,32 +3728,11 @@ input[type="search"]::-webkit-search-results-decoration {
|
||||
}
|
||||
}
|
||||
|
||||
.\[\&\:has\(svg\)\]\:pl-11:has(svg){
|
||||
padding-left: 2.75rem;
|
||||
}
|
||||
|
||||
.\[\&\>div\]\:mx-3>div{
|
||||
margin-left: 0.75rem;
|
||||
margin-right: 0.75rem;
|
||||
}
|
||||
|
||||
.\[\&\>svg\+div\]\:translate-y-\[-3px\]>svg+div{
|
||||
--tw-translate-y: -3px;
|
||||
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
||||
}
|
||||
|
||||
.\[\&\>svg\]\:absolute>svg{
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.\[\&\>svg\]\:left-4>svg{
|
||||
left: 1rem;
|
||||
}
|
||||
|
||||
.\[\&\>svg\]\:top-4>svg{
|
||||
top: 1rem;
|
||||
}
|
||||
|
||||
.\[\&_\.active-breadcrumb\]\:font-medium .active-breadcrumb{
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -1,67 +0,0 @@
|
||||
package blocks
|
||||
|
||||
func Alert(variant Variant, icon Icon, title, message string) templ.Component {
|
||||
return alertElement(variant.Attributes(), title, message, icon.Render())
|
||||
}
|
||||
|
||||
templ alertElement(attrs templ.Attributes, title, message string, icon templ.Component) {
|
||||
<div { attrs... }>
|
||||
@icon
|
||||
<h5 class="mb-1 font-medium leading-none tracking-tight">{ title }</h5>
|
||||
<div class="text-sm opacity-70">{ message }</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
type AlertVariant int
|
||||
|
||||
const (
|
||||
AlertVariant_Default AlertVariant = iota
|
||||
AlertVariant_Info
|
||||
AlertVariant_Error
|
||||
AlertVariant_Success
|
||||
AlertVariant_Warning
|
||||
AlertVariant_Subtle_Info
|
||||
AlertVariant_Subtle_Error
|
||||
AlertVariant_Subtle_Success
|
||||
AlertVariant_Subtle_Warning
|
||||
)
|
||||
|
||||
func (v AlertVariant) Attributes() templ.Attributes {
|
||||
switch v {
|
||||
case AlertVariant_Info:
|
||||
return templ.Attributes{
|
||||
"class": "relative w-full rounded-lg border border-transparent bg-blue-600 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-white",
|
||||
}
|
||||
case AlertVariant_Error:
|
||||
return templ.Attributes{
|
||||
"class": "relative w-full rounded-lg border border-transparent bg-red-600 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-white",
|
||||
}
|
||||
case AlertVariant_Success:
|
||||
return templ.Attributes{
|
||||
"class": "relative w-full rounded-lg border border-transparent bg-green-500 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-white",
|
||||
}
|
||||
case AlertVariant_Warning:
|
||||
return templ.Attributes{
|
||||
"class": "relative w-full rounded-lg border border-transparent bg-yellow-500 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-white",
|
||||
}
|
||||
case AlertVariant_Subtle_Info:
|
||||
return templ.Attributes{
|
||||
"class": "relative w-full rounded-lg border border-transparent bg-blue-50 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-blue-600",
|
||||
}
|
||||
case AlertVariant_Subtle_Error:
|
||||
return templ.Attributes{
|
||||
"class": "relative w-full rounded-lg border border-transparent bg-red-50 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-red-600",
|
||||
}
|
||||
case AlertVariant_Subtle_Success:
|
||||
return templ.Attributes{
|
||||
"class": "relative w-full rounded-lg border border-transparent bg-green-50 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-green-600",
|
||||
}
|
||||
case AlertVariant_Subtle_Warning:
|
||||
return templ.Attributes{
|
||||
"class": "relative w-full rounded-lg border border-transparent bg-yellow-50 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-yellow-600",
|
||||
}
|
||||
}
|
||||
return templ.Attributes{
|
||||
"class": "relative w-full rounded-lg border bg-white p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-neutral-900",
|
||||
}
|
||||
}
|
||||
@@ -1,140 +0,0 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.778
|
||||
package blocks
|
||||
|
||||
//lint:file-ignore SA4006 This context is only used if a nested component is present.
|
||||
|
||||
import "github.com/a-h/templ"
|
||||
import templruntime "github.com/a-h/templ/runtime"
|
||||
|
||||
func Alert(variant Variant, icon Icon, title, message string) templ.Component {
|
||||
return alertElement(variant.Attributes(), title, message, icon.Render())
|
||||
}
|
||||
|
||||
func alertElement(attrs templ.Attributes, title, message string, icon templ.Component) templ.Component {
|
||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||
return templ_7745c5c3_CtxErr
|
||||
}
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
defer func() {
|
||||
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err == nil {
|
||||
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||||
}
|
||||
}()
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Var1 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var1 == nil {
|
||||
templ_7745c5c3_Var1 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = templ.RenderAttributes(ctx, templ_7745c5c3_Buffer, attrs)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = icon.Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<h5 class=\"mb-1 font-medium leading-none tracking-tight\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var2 string
|
||||
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(title)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/blocks/alert.templ`, Line: 10, Col: 66}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</h5><div class=\"text-sm opacity-70\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var3 string
|
||||
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(message)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/blocks/alert.templ`, Line: 11, Col: 43}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div></div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
type AlertVariant int
|
||||
|
||||
const (
|
||||
AlertVariant_Default AlertVariant = iota
|
||||
AlertVariant_Info
|
||||
AlertVariant_Error
|
||||
AlertVariant_Success
|
||||
AlertVariant_Warning
|
||||
AlertVariant_Subtle_Info
|
||||
AlertVariant_Subtle_Error
|
||||
AlertVariant_Subtle_Success
|
||||
AlertVariant_Subtle_Warning
|
||||
)
|
||||
|
||||
func (v AlertVariant) Attributes() templ.Attributes {
|
||||
switch v {
|
||||
case AlertVariant_Info:
|
||||
return templ.Attributes{
|
||||
"class": "relative w-full rounded-lg border border-transparent bg-blue-600 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-white",
|
||||
}
|
||||
case AlertVariant_Error:
|
||||
return templ.Attributes{
|
||||
"class": "relative w-full rounded-lg border border-transparent bg-red-600 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-white",
|
||||
}
|
||||
case AlertVariant_Success:
|
||||
return templ.Attributes{
|
||||
"class": "relative w-full rounded-lg border border-transparent bg-green-500 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-white",
|
||||
}
|
||||
case AlertVariant_Warning:
|
||||
return templ.Attributes{
|
||||
"class": "relative w-full rounded-lg border border-transparent bg-yellow-500 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-white",
|
||||
}
|
||||
case AlertVariant_Subtle_Info:
|
||||
return templ.Attributes{
|
||||
"class": "relative w-full rounded-lg border border-transparent bg-blue-50 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-blue-600",
|
||||
}
|
||||
case AlertVariant_Subtle_Error:
|
||||
return templ.Attributes{
|
||||
"class": "relative w-full rounded-lg border border-transparent bg-red-50 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-red-600",
|
||||
}
|
||||
case AlertVariant_Subtle_Success:
|
||||
return templ.Attributes{
|
||||
"class": "relative w-full rounded-lg border border-transparent bg-green-50 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-green-600",
|
||||
}
|
||||
case AlertVariant_Subtle_Warning:
|
||||
return templ.Attributes{
|
||||
"class": "relative w-full rounded-lg border border-transparent bg-yellow-50 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-yellow-600",
|
||||
}
|
||||
}
|
||||
return templ.Attributes{
|
||||
"class": "relative w-full rounded-lg border bg-white p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-neutral-900",
|
||||
}
|
||||
}
|
||||
|
||||
var _ = templruntime.GeneratedTemplate
|
||||
@@ -1,29 +0,0 @@
|
||||
package blocks
|
||||
|
||||
type InputState int
|
||||
|
||||
const (
|
||||
InputStateDefault InputState = iota
|
||||
InputStateError
|
||||
InputStateSuccess
|
||||
)
|
||||
|
||||
templ TextInput(state InputState, label string, placeholder string) {
|
||||
switch (state) {
|
||||
case InputStateDefault:
|
||||
<div class="flex flex-col space-y-1.5 p-6">
|
||||
<label class="text-xs font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" for="name">{ label }</label>
|
||||
<input type="text" placeholder="{label}" id="name" value="{value}" class="flex w-full h-10 px-3 py-2 text-sm bg-white border rounded-md peer border-neutral-300 ring-offset-background placeholder:text-neutral-400 focus:border-neutral-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-neutral-400 disabled:cursor-not-allowed disabled:opacity-50"/>
|
||||
</div>
|
||||
case InputStateError:
|
||||
<div class="flex flex-col space-y-1.5 p-6">
|
||||
<label class="text-xs font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" for="name">{ label }</label>
|
||||
<input type="text" placeholder="{label}" id="name" value="{value}" class="flex w-full h-10 px-3 py-2 text-sm bg-white border rounded-md peer border-neutral-300 ring-offset-background placeholder:text-neutral-400 focus:border-neutral-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-neutral-400 disabled:cursor-not-allowed disabled:opacity-50"/>
|
||||
</div>
|
||||
case InputStateSuccess:
|
||||
<div class="flex flex-col space-y-1.5 p-6">
|
||||
<label class="text-xs font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" for="name">{ label }</label>
|
||||
<input type="text" placeholder="{label}" id="name" value="{value}" class="flex w-full h-10 px-3 py-2 text-sm bg-white border rounded-md peer border-neutral-300 ring-offset-background placeholder:text-neutral-400 focus:border-neutral-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-neutral-400 disabled:cursor-not-allowed disabled:opacity-50"/>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
@@ -1,100 +0,0 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.778
|
||||
package blocks
|
||||
|
||||
//lint:file-ignore SA4006 This context is only used if a nested component is present.
|
||||
|
||||
import "github.com/a-h/templ"
|
||||
import templruntime "github.com/a-h/templ/runtime"
|
||||
|
||||
type InputState int
|
||||
|
||||
const (
|
||||
InputStateDefault InputState = iota
|
||||
InputStateError
|
||||
InputStateSuccess
|
||||
)
|
||||
|
||||
func TextInput(state InputState, label string, placeholder string) templ.Component {
|
||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||
return templ_7745c5c3_CtxErr
|
||||
}
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
defer func() {
|
||||
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err == nil {
|
||||
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||||
}
|
||||
}()
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Var1 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var1 == nil {
|
||||
templ_7745c5c3_Var1 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
switch state {
|
||||
case InputStateDefault:
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"flex flex-col space-y-1.5 p-6\"><label class=\"text-xs font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\" for=\"name\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var2 string
|
||||
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(label)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/blocks/inputs.templ`, Line: 15, Col: 128}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</label> <input type=\"text\" placeholder=\"{label}\" id=\"name\" value=\"{value}\" class=\"flex w-full h-10 px-3 py-2 text-sm bg-white border rounded-md peer border-neutral-300 ring-offset-background placeholder:text-neutral-400 focus:border-neutral-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-neutral-400 disabled:cursor-not-allowed disabled:opacity-50\"></div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
case InputStateError:
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"flex flex-col space-y-1.5 p-6\"><label class=\"text-xs font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\" for=\"name\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var3 string
|
||||
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(label)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/blocks/inputs.templ`, Line: 20, Col: 128}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</label> <input type=\"text\" placeholder=\"{label}\" id=\"name\" value=\"{value}\" class=\"flex w-full h-10 px-3 py-2 text-sm bg-white border rounded-md peer border-neutral-300 ring-offset-background placeholder:text-neutral-400 focus:border-neutral-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-neutral-400 disabled:cursor-not-allowed disabled:opacity-50\"></div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
case InputStateSuccess:
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"flex flex-col space-y-1.5 p-6\"><label class=\"text-xs font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\" for=\"name\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var4 string
|
||||
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(label)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/blocks/inputs.templ`, Line: 25, Col: 128}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</label> <input type=\"text\" placeholder=\"{label}\" id=\"name\" value=\"{value}\" class=\"flex w-full h-10 px-3 py-2 text-sm bg-white border rounded-md peer border-neutral-300 ring-offset-background placeholder:text-neutral-400 focus:border-neutral-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-neutral-400 disabled:cursor-not-allowed disabled:opacity-50\"></div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
var _ = templruntime.GeneratedTemplate
|
||||
@@ -14,6 +14,7 @@ templ Layout(title string, remote bool) {
|
||||
<!-- Sets the status bar style to transparent -->
|
||||
<meta name="apple-mobile-web-app-capable" content="yes"/>
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"/>
|
||||
<link rel="icon" type="image/png" href="https://cdn.sonr.id/favicon.png"/>
|
||||
</head>
|
||||
<body class="flex items-center justify-center h-full bg-neutral-50 lg:p-24 md:16 p-4">
|
||||
<main class="flex-row items-center justify-center mx-auto w-fit max-w-screen-sm gap-y-3">
|
||||
@@ -34,6 +35,7 @@ templ LayoutNoBody(title string, remote bool) {
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<title>{ title }</title>
|
||||
<link rel="icon" type="image/png" href="https://cdn.sonr.id/favicon.png"/>
|
||||
<!-- Sets the status bar style to transparent -->
|
||||
<meta name="apple-mobile-web-app-capable" content="yes"/>
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"/>
|
||||
|
||||
@@ -58,7 +58,7 @@ func Layout(title string, remote bool) templ.Component {
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</title><!-- Sets the status bar style to transparent --><meta name=\"apple-mobile-web-app-capable\" content=\"yes\"><meta name=\"apple-mobile-web-app-status-bar-style\" content=\"black-translucent\"></head><body class=\"flex items-center justify-center h-full bg-neutral-50 lg:p-24 md:16 p-4\"><main class=\"flex-row items-center justify-center mx-auto w-fit max-w-screen-sm gap-y-3\">")
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</title><!-- Sets the status bar style to transparent --><meta name=\"apple-mobile-web-app-capable\" content=\"yes\"><meta name=\"apple-mobile-web-app-status-bar-style\" content=\"black-translucent\"><link rel=\"icon\" type=\"image/png\" href=\"https://cdn.sonr.id/favicon.png\"></head><body class=\"flex items-center justify-center h-full bg-neutral-50 lg:p-24 md:16 p-4\"><main class=\"flex-row items-center justify-center mx-auto w-fit max-w-screen-sm gap-y-3\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -118,13 +118,13 @@ func LayoutNoBody(title string, remote bool) templ.Component {
|
||||
var templ_7745c5c3_Var4 string
|
||||
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(title)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/blocks/layout.templ`, Line: 36, Col: 17}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/blocks/layout.templ`, Line: 37, Col: 17}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</title><!-- Sets the status bar style to transparent --><meta name=\"apple-mobile-web-app-capable\" content=\"yes\"><meta name=\"apple-mobile-web-app-status-bar-style\" content=\"black-translucent\"></head><main class=\"grow\"><body class=\"font-inter antialiased bg-white text-zinc-900 tracking-tight\"><div class=\"flex flex-col min-h-screen overflow-hidden supports-[overflow:clip]:overflow-clip\">")
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</title><link rel=\"icon\" type=\"image/png\" href=\"https://cdn.sonr.id/favicon.png\"><!-- Sets the status bar style to transparent --><meta name=\"apple-mobile-web-app-capable\" content=\"yes\"><meta name=\"apple-mobile-web-app-status-bar-style\" content=\"black-translucent\"></head><main class=\"grow\"><body class=\"font-inter antialiased bg-white text-zinc-900 tracking-tight\"><div class=\"flex flex-col min-h-screen overflow-hidden supports-[overflow:clip]:overflow-clip\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
package blocks
|
||||
|
||||
templ RadioGroup() {
|
||||
<div
|
||||
x-data="{
|
||||
radioGroupSelectedValue: null,
|
||||
radioGroupOptions: [
|
||||
{
|
||||
title: 'Email Address',
|
||||
description: 'Get a login code to your email address.',
|
||||
value: 'email'
|
||||
},
|
||||
{
|
||||
title: 'Phone Number',
|
||||
description: 'Get a login code to your phone number.',
|
||||
value: 'phone'
|
||||
},
|
||||
{
|
||||
title: 'Passkey',
|
||||
description: 'Sign in with your passkey.',
|
||||
value: 'passkey'
|
||||
}
|
||||
]
|
||||
}"
|
||||
class="space-y-3"
|
||||
>
|
||||
<template x-for="(option, index) in radioGroupOptions" :key="index">
|
||||
<label @click="radioGroupSelectedValue=option.value" class="flex items-start p-5 space-x-3 bg-white border rounded-md shadow-sm hover:bg-gray-50 border-neutral-200/70">
|
||||
<input type="radio" name="radio-group" :value="option.value" class="text-gray-900 translate-y-px focus:ring-gray-700"/>
|
||||
<span class="relative flex flex-col text-left space-y-1.5 leading-none">
|
||||
<span x-text="option.title" class="font-semibold"></span>
|
||||
<span x-text="option.description" class="text-sm opacity-50"></span>
|
||||
</span>
|
||||
</label>
|
||||
</template>
|
||||
</div>
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.778
|
||||
package blocks
|
||||
|
||||
//lint:file-ignore SA4006 This context is only used if a nested component is present.
|
||||
|
||||
import "github.com/a-h/templ"
|
||||
import templruntime "github.com/a-h/templ/runtime"
|
||||
|
||||
func RadioGroup() templ.Component {
|
||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||
return templ_7745c5c3_CtxErr
|
||||
}
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
defer func() {
|
||||
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err == nil {
|
||||
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||||
}
|
||||
}()
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Var1 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var1 == nil {
|
||||
templ_7745c5c3_Var1 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div x-data=\"{\n radioGroupSelectedValue: null,\n radioGroupOptions: [\n {\n title: 'Email Address',\n description: 'Get a login code to your email address.',\n value: 'email'\n },\n {\n title: 'Phone Number',\n description: 'Get a login code to your phone number.',\n value: 'phone'\n },\n {\n title: 'Passkey',\n description: 'Sign in with your passkey.',\n value: 'passkey'\n }\n ]\n}\" class=\"space-y-3\"><template x-for=\"(option, index) in radioGroupOptions\" :key=\"index\"><label @click=\"radioGroupSelectedValue=option.value\" class=\"flex items-start p-5 space-x-3 bg-white border rounded-md shadow-sm hover:bg-gray-50 border-neutral-200/70\"><input type=\"radio\" name=\"radio-group\" :value=\"option.value\" class=\"text-gray-900 translate-y-px focus:ring-gray-700\"> <span class=\"relative flex flex-col text-left space-y-1.5 leading-none\"><span x-text=\"option.title\" class=\"font-semibold\"></span> <span x-text=\"option.description\" class=\"text-sm opacity-50\"></span></span></label></template></div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
var _ = templruntime.GeneratedTemplate
|
||||
@@ -1,109 +0,0 @@
|
||||
package blocks
|
||||
|
||||
templ Tabs() {
|
||||
<div
|
||||
x-data="{
|
||||
tabSelected: 1,
|
||||
tabId: $id('tabs'),
|
||||
tabButtonClicked(tabButton){
|
||||
this.tabSelected = tabButton.id.replace(this.tabId + '-', '');
|
||||
this.tabRepositionMarker(tabButton);
|
||||
},
|
||||
tabRepositionMarker(tabButton){
|
||||
this.$refs.tabMarker.style.width=tabButton.offsetWidth + 'px';
|
||||
this.$refs.tabMarker.style.height=tabButton.offsetHeight + 'px';
|
||||
this.$refs.tabMarker.style.left=tabButton.offsetLeft + 'px';
|
||||
},
|
||||
tabContentActive(tabContent){
|
||||
return this.tabSelected == tabContent.id.replace(this.tabId + '-content-', '');
|
||||
},
|
||||
tabButtonActive(tabContent){
|
||||
const tabId = tabContent.id.split('-').slice(-1);
|
||||
return this.tabSelected == tabId;
|
||||
}
|
||||
}"
|
||||
x-init="tabRepositionMarker($refs.tabButtons.firstElementChild);"
|
||||
class="relative w-full max-w-sm"
|
||||
>
|
||||
<div x-ref="tabButtons" class="relative inline-grid items-center justify-center w-full h-10 grid-cols-3 p-1 text-gray-500 bg-white border border-gray-100 rounded-lg select-none">
|
||||
<button :id="$id(tabId)" @click="tabButtonClicked($el);" type="button" :class="{ 'bg-gray-100 text-gray-700' : tabButtonActive($el) }" class="relative z-20 inline-flex items-center justify-center w-full h-8 px-3 text-sm font-medium transition-all rounded-md cursor-pointer whitespace-nowrap">Tab1</button>
|
||||
<button :id="$id(tabId)" @click="tabButtonClicked($el);" type="button" :class="{ 'bg-gray-100 text-gray-700' : tabButtonActive($el) }" class="relative z-20 inline-flex items-center justify-center w-full h-8 px-3 text-sm font-medium transition-all rounded-md cursor-pointer whitespace-nowrap">Tab2</button>
|
||||
<button :id="$id(tabId)" @click="tabButtonClicked($el);" type="button" :class="{ 'bg-gray-100 text-gray-700' : tabButtonActive($el) }" class="relative z-20 inline-flex items-center justify-center w-full h-8 px-3 text-sm font-medium transition-all rounded-md cursor-pointer whitespace-nowrap">Tab3</button>
|
||||
<div x-ref="tabMarker" class="absolute left-0 z-10 w-1/2 h-full duration-300 ease-out" x-cloak><div class="w-full h-full bg-gray-100 rounded-md shadow-sm"></div></div>
|
||||
</div>
|
||||
<div class="relative flex items-center justify-center w-full p-5 mt-2 text-xs text-gray-400 border rounded-md content border-gray-200/70">
|
||||
<div :id="$id(tabId + '-content')" x-show="tabContentActive($el)" class="relative">
|
||||
@Table()
|
||||
</div>
|
||||
<div :id="$id(tabId + '-content')" x-show="tabContentActive($el)" class="relative" x-cloak>
|
||||
And, this is the content for Tab2
|
||||
</div>
|
||||
<div :id="$id(tabId + '-content')" x-show="tabContentActive($el)" class="relative" x-cloak>
|
||||
Finally, this is the content for Tab3
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
templ Table() {
|
||||
<div class="flex flex-col">
|
||||
<div class="overflow-x-auto">
|
||||
<div class="inline-block min-w-full">
|
||||
<div class="overflow-hidden">
|
||||
<table class="min-w-full divide-y divide-neutral-200">
|
||||
<thead>
|
||||
<tr class="text-neutral-500">
|
||||
<th class="px-5 py-3 text-xs font-medium text-left uppercase">Name</th>
|
||||
<th class="px-5 py-3 text-xs font-medium text-left uppercase">Age</th>
|
||||
<th class="px-5 py-3 text-xs font-medium text-left uppercase">Address</th>
|
||||
<th class="px-5 py-3 text-xs font-medium text-right uppercase">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-neutral-200">
|
||||
<tr class="text-neutral-800">
|
||||
<td class="px-5 py-4 text-sm font-medium whitespace-nowrap">Richard Hendricks</td>
|
||||
<td class="px-5 py-4 text-sm whitespace-nowrap">30</td>
|
||||
<td class="px-5 py-4 text-sm whitespace-nowrap">Pied Piper HQ, Palo Alto</td>
|
||||
<td class="px-5 py-4 text-sm font-medium text-right whitespace-nowrap">
|
||||
<a class="text-blue-600 hover:text-blue-700" href="#">Edit</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="text-neutral-800">
|
||||
<td class="px-5 py-4 text-sm font-medium whitespace-nowrap">Erlich Bachman</td>
|
||||
<td class="px-5 py-4 text-sm whitespace-nowrap">40</td>
|
||||
<td class="px-5 py-4 text-sm whitespace-nowrap">5230 Penfield Ave, Woodland Hills</td>
|
||||
<td class="px-5 py-4 text-sm font-medium text-right whitespace-nowrap">
|
||||
<a class="text-blue-600 hover:text-blue-700" href="#">Edit</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="text-neutral-800">
|
||||
<td class="px-5 py-4 text-sm font-medium whitespace-nowrap">Monica Hall</td>
|
||||
<td class="px-5 py-4 text-sm whitespace-nowrap">35</td>
|
||||
<td class="px-5 py-4 text-sm whitespace-nowrap">2030 Stewart Drive, Sunnyvale</td>
|
||||
<td class="px-5 py-4 text-sm font-medium text-right whitespace-nowrap">
|
||||
<a class="text-blue-600 hover:text-blue-700" href="#">Edit</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="text-neutral-800">
|
||||
<td class="px-5 py-4 text-sm font-medium whitespace-nowrap">Dinesh Chugtai</td>
|
||||
<td class="px-5 py-4 text-sm whitespace-nowrap">28</td>
|
||||
<td class="px-5 py-4 text-sm whitespace-nowrap">Pied Piper HQ, Palo Alto</td>
|
||||
<td class="px-5 py-4 text-sm font-medium text-right whitespace-nowrap">
|
||||
<a class="text-blue-600 hover:text-blue-700" href="#">Edit</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="text-neutral-800">
|
||||
<td class="px-5 py-4 text-sm font-medium whitespace-nowrap">Gilfoyle</td>
|
||||
<td class="px-5 py-4 text-sm whitespace-nowrap">32</td>
|
||||
<td class="px-5 py-4 text-sm whitespace-nowrap">Pied Piper HQ, Palo Alto</td>
|
||||
<td class="px-5 py-4 text-sm font-medium text-right whitespace-nowrap">
|
||||
<a class="text-blue-600 hover:text-blue-700" href="#">Edit</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.778
|
||||
package blocks
|
||||
|
||||
//lint:file-ignore SA4006 This context is only used if a nested component is present.
|
||||
|
||||
import "github.com/a-h/templ"
|
||||
import templruntime "github.com/a-h/templ/runtime"
|
||||
|
||||
func Tabs() templ.Component {
|
||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||
return templ_7745c5c3_CtxErr
|
||||
}
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
defer func() {
|
||||
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err == nil {
|
||||
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||||
}
|
||||
}()
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Var1 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var1 == nil {
|
||||
templ_7745c5c3_Var1 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div x-data=\"{\n tabSelected: 1,\n tabId: $id('tabs'),\n tabButtonClicked(tabButton){\n this.tabSelected = tabButton.id.replace(this.tabId + '-', '');\n this.tabRepositionMarker(tabButton);\n },\n tabRepositionMarker(tabButton){\n this.$refs.tabMarker.style.width=tabButton.offsetWidth + 'px';\n this.$refs.tabMarker.style.height=tabButton.offsetHeight + 'px';\n this.$refs.tabMarker.style.left=tabButton.offsetLeft + 'px';\n },\n tabContentActive(tabContent){\n return this.tabSelected == tabContent.id.replace(this.tabId + '-content-', '');\n },\n tabButtonActive(tabContent){\n const tabId = tabContent.id.split('-').slice(-1);\n return this.tabSelected == tabId;\n }\n }\" x-init=\"tabRepositionMarker($refs.tabButtons.firstElementChild);\" class=\"relative w-full max-w-sm\"><div x-ref=\"tabButtons\" class=\"relative inline-grid items-center justify-center w-full h-10 grid-cols-3 p-1 text-gray-500 bg-white border border-gray-100 rounded-lg select-none\"><button :id=\"$id(tabId)\" @click=\"tabButtonClicked($el);\" type=\"button\" :class=\"{ 'bg-gray-100 text-gray-700' : tabButtonActive($el) }\" class=\"relative z-20 inline-flex items-center justify-center w-full h-8 px-3 text-sm font-medium transition-all rounded-md cursor-pointer whitespace-nowrap\">Tab1</button> <button :id=\"$id(tabId)\" @click=\"tabButtonClicked($el);\" type=\"button\" :class=\"{ 'bg-gray-100 text-gray-700' : tabButtonActive($el) }\" class=\"relative z-20 inline-flex items-center justify-center w-full h-8 px-3 text-sm font-medium transition-all rounded-md cursor-pointer whitespace-nowrap\">Tab2</button> <button :id=\"$id(tabId)\" @click=\"tabButtonClicked($el);\" type=\"button\" :class=\"{ 'bg-gray-100 text-gray-700' : tabButtonActive($el) }\" class=\"relative z-20 inline-flex items-center justify-center w-full h-8 px-3 text-sm font-medium transition-all rounded-md cursor-pointer whitespace-nowrap\">Tab3</button><div x-ref=\"tabMarker\" class=\"absolute left-0 z-10 w-1/2 h-full duration-300 ease-out\" x-cloak><div class=\"w-full h-full bg-gray-100 rounded-md shadow-sm\"></div></div></div><div class=\"relative flex items-center justify-center w-full p-5 mt-2 text-xs text-gray-400 border rounded-md content border-gray-200/70\"><div :id=\"$id(tabId + '-content')\" x-show=\"tabContentActive($el)\" class=\"relative\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = Table().Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div><div :id=\"$id(tabId + '-content')\" x-show=\"tabContentActive($el)\" class=\"relative\" x-cloak>And, this is the content for Tab2</div><div :id=\"$id(tabId + '-content')\" x-show=\"tabContentActive($el)\" class=\"relative\" x-cloak>Finally, this is the content for Tab3</div></div></div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
func Table() templ.Component {
|
||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||
return templ_7745c5c3_CtxErr
|
||||
}
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
defer func() {
|
||||
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err == nil {
|
||||
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||||
}
|
||||
}()
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Var2 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var2 == nil {
|
||||
templ_7745c5c3_Var2 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"flex flex-col\"><div class=\"overflow-x-auto\"><div class=\"inline-block min-w-full\"><div class=\"overflow-hidden\"><table class=\"min-w-full divide-y divide-neutral-200\"><thead><tr class=\"text-neutral-500\"><th class=\"px-5 py-3 text-xs font-medium text-left uppercase\">Name</th><th class=\"px-5 py-3 text-xs font-medium text-left uppercase\">Age</th><th class=\"px-5 py-3 text-xs font-medium text-left uppercase\">Address</th><th class=\"px-5 py-3 text-xs font-medium text-right uppercase\">Action</th></tr></thead> <tbody class=\"divide-y divide-neutral-200\"><tr class=\"text-neutral-800\"><td class=\"px-5 py-4 text-sm font-medium whitespace-nowrap\">Richard Hendricks</td><td class=\"px-5 py-4 text-sm whitespace-nowrap\">30</td><td class=\"px-5 py-4 text-sm whitespace-nowrap\">Pied Piper HQ, Palo Alto</td><td class=\"px-5 py-4 text-sm font-medium text-right whitespace-nowrap\"><a class=\"text-blue-600 hover:text-blue-700\" href=\"#\">Edit</a></td></tr><tr class=\"text-neutral-800\"><td class=\"px-5 py-4 text-sm font-medium whitespace-nowrap\">Erlich Bachman</td><td class=\"px-5 py-4 text-sm whitespace-nowrap\">40</td><td class=\"px-5 py-4 text-sm whitespace-nowrap\">5230 Penfield Ave, Woodland Hills</td><td class=\"px-5 py-4 text-sm font-medium text-right whitespace-nowrap\"><a class=\"text-blue-600 hover:text-blue-700\" href=\"#\">Edit</a></td></tr><tr class=\"text-neutral-800\"><td class=\"px-5 py-4 text-sm font-medium whitespace-nowrap\">Monica Hall</td><td class=\"px-5 py-4 text-sm whitespace-nowrap\">35</td><td class=\"px-5 py-4 text-sm whitespace-nowrap\">2030 Stewart Drive, Sunnyvale</td><td class=\"px-5 py-4 text-sm font-medium text-right whitespace-nowrap\"><a class=\"text-blue-600 hover:text-blue-700\" href=\"#\">Edit</a></td></tr><tr class=\"text-neutral-800\"><td class=\"px-5 py-4 text-sm font-medium whitespace-nowrap\">Dinesh Chugtai</td><td class=\"px-5 py-4 text-sm whitespace-nowrap\">28</td><td class=\"px-5 py-4 text-sm whitespace-nowrap\">Pied Piper HQ, Palo Alto</td><td class=\"px-5 py-4 text-sm font-medium text-right whitespace-nowrap\"><a class=\"text-blue-600 hover:text-blue-700\" href=\"#\">Edit</a></td></tr><tr class=\"text-neutral-800\"><td class=\"px-5 py-4 text-sm font-medium whitespace-nowrap\">Gilfoyle</td><td class=\"px-5 py-4 text-sm whitespace-nowrap\">32</td><td class=\"px-5 py-4 text-sm whitespace-nowrap\">Pied Piper HQ, Palo Alto</td><td class=\"px-5 py-4 text-sm font-medium text-right whitespace-nowrap\"><a class=\"text-blue-600 hover:text-blue-700\" href=\"#\">Edit</a></td></tr></tbody></table></div></div></div></div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
var _ = templruntime.GeneratedTemplate
|
||||
@@ -186,10 +186,10 @@ templ Features() {
|
||||
<!-- Gear illustration -->
|
||||
<img
|
||||
class="absolute left-0 bottom-0 -translate-x-1/2 translate-y-1/3 mix-blend-exclusion max-lg:w-32"
|
||||
src="./images/features-illustration.png"
|
||||
src="https://cdn.sonr.id/img/secure-vault.svg"
|
||||
alt="Features 02 illustration"
|
||||
width="173"
|
||||
height="167"
|
||||
width="224"
|
||||
height="224"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
</div>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
||||
package home
|
||||
|
||||
templ MarketingFooter() {
|
||||
templ Footer() {
|
||||
<!-- Site footer -->
|
||||
<footer>
|
||||
<div class="max-w-5xl mx-auto px-4 sm:px-6">
|
||||
|
||||
@@ -8,7 +8,7 @@ package home
|
||||
import "github.com/a-h/templ"
|
||||
import templruntime "github.com/a-h/templ/runtime"
|
||||
|
||||
func MarketingFooter() templ.Component {
|
||||
func Footer() templ.Component {
|
||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package home
|
||||
|
||||
templ MarketingHeader() {
|
||||
templ Header() {
|
||||
<!-- Site header -->
|
||||
<header class="absolute top-2 md:top-6 w-full z-30">
|
||||
<div class="px-4 sm:px-6">
|
||||
@@ -18,10 +18,10 @@ templ MarketingHeader() {
|
||||
<!-- Desktop sign in links -->
|
||||
<ul class="flex grow justify-end flex-wrap items-center">
|
||||
<li>
|
||||
<a class="text-sm font-medium text-zinc-500 hover:text-zinc-900 px-3 lg:px-5 py-2 flex items-center transition" href="/login">Log in</a>
|
||||
<div class="text-sm cursor-pointer font-medium text-zinc-500 hover:text-zinc-900 px-3 lg:px-5 py-2 flex items-center transition" hx-swap="afterend" hx-get="/login">Log in</div>
|
||||
</li>
|
||||
<li class="ml-1">
|
||||
<a class="btn-sm text-zinc-100 bg-zinc-900 hover:bg-zinc-800 w-full shadow" href="/register">Register</a>
|
||||
<div class="btn-sm text-zinc-100 cursor-pointer bg-zinc-900 hover:bg-zinc-800 w-full shadow" hx-swap="afterend" hx-get="/register">Register</div>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
@@ -8,7 +8,7 @@ package home
|
||||
import "github.com/a-h/templ"
|
||||
import templruntime "github.com/a-h/templ/runtime"
|
||||
|
||||
func MarketingHeader() templ.Component {
|
||||
func Header() templ.Component {
|
||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||
@@ -29,7 +29,7 @@ func MarketingHeader() templ.Component {
|
||||
templ_7745c5c3_Var1 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!-- Site header --><header class=\"absolute top-2 md:top-6 w-full z-30\"><div class=\"px-4 sm:px-6\"><div class=\"max-w-3xl mx-auto\"><div class=\"flex items-center justify-between h-14 border border-transparent [background:linear-gradient(theme(colors.white),theme(colors.white))_padding-box,linear-gradient(120deg,theme(colors.zinc.300),theme(colors.zinc.100),theme(colors.zinc.300))_border-box] rounded-lg px-3\"><!-- Site branding --><div class=\"shrink-0 mr-4\"><!-- Logo --><a class=\"flex items-center justify-center bg-white w-8 h-8 rounded shadow-sm shadow-zinc-950/20\" href=\"/\"><img src=\"https://cdn.sonr.id/img/logo-zinc.svg\" width=\"24\" height=\"24\" alt=\"Logo\"></a></div><!-- Desktop navigation --><nav class=\"flex grow\"><!-- Desktop sign in links --><ul class=\"flex grow justify-end flex-wrap items-center\"><li><a class=\"text-sm font-medium text-zinc-500 hover:text-zinc-900 px-3 lg:px-5 py-2 flex items-center transition\" href=\"/login\">Log in</a></li><li class=\"ml-1\"><a class=\"btn-sm text-zinc-100 bg-zinc-900 hover:bg-zinc-800 w-full shadow\" href=\"/register\">Register</a></li></ul></nav></div></div></div></header>")
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!-- Site header --><header class=\"absolute top-2 md:top-6 w-full z-30\"><div class=\"px-4 sm:px-6\"><div class=\"max-w-3xl mx-auto\"><div class=\"flex items-center justify-between h-14 border border-transparent [background:linear-gradient(theme(colors.white),theme(colors.white))_padding-box,linear-gradient(120deg,theme(colors.zinc.300),theme(colors.zinc.100),theme(colors.zinc.300))_border-box] rounded-lg px-3\"><!-- Site branding --><div class=\"shrink-0 mr-4\"><!-- Logo --><a class=\"flex items-center justify-center bg-white w-8 h-8 rounded shadow-sm shadow-zinc-950/20\" href=\"/\"><img src=\"https://cdn.sonr.id/img/logo-zinc.svg\" width=\"24\" height=\"24\" alt=\"Logo\"></a></div><!-- Desktop navigation --><nav class=\"flex grow\"><!-- Desktop sign in links --><ul class=\"flex grow justify-end flex-wrap items-center\"><li><div class=\"text-sm cursor-pointer font-medium text-zinc-500 hover:text-zinc-900 px-3 lg:px-5 py-2 flex items-center transition\" hx-swap=\"afterend\" hx-get=\"/login\">Log in</div></li><li class=\"ml-1\"><div class=\"btn-sm text-zinc-100 cursor-pointer bg-zinc-900 hover:bg-zinc-800 w-full shadow\" hx-swap=\"afterend\" hx-get=\"/register\">Register</div></li></ul></nav></div></div></div></header>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
package home
|
||||
|
||||
import "github.com/onsonr/sonr/pkg/nebula/models"
|
||||
import (
|
||||
"github.com/onsonr/sonr/pkg/nebula/components/ui"
|
||||
"github.com/onsonr/sonr/pkg/nebula/models"
|
||||
)
|
||||
|
||||
templ SectionHero(hero *models.Hero) {
|
||||
<!-- Hero -->
|
||||
@@ -24,12 +27,8 @@ templ SectionHero(hero *models.Hero) {
|
||||
{ hero.Subtitle }
|
||||
</p>
|
||||
<div class="max-w-xs mx-auto sm:max-w-none sm:inline-flex sm:justify-center space-y-4 sm:space-y-0 sm:space-x-4">
|
||||
<div>
|
||||
<div class="btn text-zinc-100 bg-zinc-900 hover:bg-zinc-800 w-full shadow" hx-get={ hero.PrimaryButton.Href }>{ hero.PrimaryButton.Text }</div>
|
||||
</div>
|
||||
<div>
|
||||
<a class="btn text-zinc-600 bg-white hover:text-zinc-900 w-full shadow" href={ templ.SafeURL(hero.SecondaryButton.Href) }>{ hero.SecondaryButton.Text }</a>
|
||||
</div>
|
||||
@ui.PrimaryButton(hero.PrimaryButton.Href, hero.PrimaryButton.Text)
|
||||
@ui.SecondaryButton(hero.SecondaryButton.Href, hero.SecondaryButton.Text)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -42,9 +41,9 @@ templ SectionHero(hero *models.Hero) {
|
||||
|
||||
templ heroImage(hero *models.Hero) {
|
||||
<!-- Image -->
|
||||
<div class="max-w-5xl mx-auto px-4 sm:px-6 flex justify-center pb-12 md:pb-20 relative before:absolute before:-top-12 before:w-96 before:h-96 before:bg-zinc-900 before:opacity-[.15] before:rounded-full before:blur-3xl before:-z-10 from-zinc-100 to-white">
|
||||
<div class="max-w-5xl motion-preset-slide-up mx-auto px-4 sm:px-6 flex justify-center pb-12 md:pb-20 relative before:absolute before:-top-12 before:w-96 before:h-96 before:bg-zinc-900 before:opacity-[.15] before:rounded-full before:blur-3xl before:-z-10 from-zinc-100 to-white">
|
||||
<img
|
||||
class="rounded-lg"
|
||||
class="rounded-lg "
|
||||
src={ hero.Image.Src }
|
||||
width={ hero.Image.Width }
|
||||
height={ hero.Image.Height }
|
||||
|
||||
@@ -8,7 +8,10 @@ package home
|
||||
import "github.com/a-h/templ"
|
||||
import templruntime "github.com/a-h/templ/runtime"
|
||||
|
||||
import "github.com/onsonr/sonr/pkg/nebula/models"
|
||||
import (
|
||||
"github.com/onsonr/sonr/pkg/nebula/components/ui"
|
||||
"github.com/onsonr/sonr/pkg/nebula/models"
|
||||
)
|
||||
|
||||
func SectionHero(hero *models.Hero) templ.Component {
|
||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||||
@@ -38,7 +41,7 @@ func SectionHero(hero *models.Hero) templ.Component {
|
||||
var templ_7745c5c3_Var2 string
|
||||
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(hero.TitleFirst)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/home/hero.templ`, Line: 14, Col: 24}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/home/hero.templ`, Line: 17, Col: 24}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -51,7 +54,7 @@ func SectionHero(hero *models.Hero) templ.Component {
|
||||
var templ_7745c5c3_Var3 string
|
||||
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(hero.TitleEmphasis)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/home/hero.templ`, Line: 16, Col: 28}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/home/hero.templ`, Line: 19, Col: 28}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -64,7 +67,7 @@ func SectionHero(hero *models.Hero) templ.Component {
|
||||
var templ_7745c5c3_Var4 string
|
||||
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(hero.TitleSecond)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/home/hero.templ`, Line: 21, Col: 25}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/home/hero.templ`, Line: 24, Col: 25}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -77,57 +80,25 @@ func SectionHero(hero *models.Hero) templ.Component {
|
||||
var templ_7745c5c3_Var5 string
|
||||
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(hero.Subtitle)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/home/hero.templ`, Line: 24, Col: 22}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/home/hero.templ`, Line: 27, Col: 22}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</p><div class=\"max-w-xs mx-auto sm:max-w-none sm:inline-flex sm:justify-center space-y-4 sm:space-y-0 sm:space-x-4\"><div><a class=\"btn text-zinc-100 bg-zinc-900 hover:bg-zinc-800 w-full shadow\" href=\"")
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</p><div class=\"max-w-xs mx-auto sm:max-w-none sm:inline-flex sm:justify-center space-y-4 sm:space-y-0 sm:space-x-4\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var6 templ.SafeURL = templ.SafeURL(hero.PrimaryButton.Href)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(string(templ_7745c5c3_Var6)))
|
||||
templ_7745c5c3_Err = ui.PrimaryButton(hero.PrimaryButton.Href, hero.PrimaryButton.Text).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\">")
|
||||
templ_7745c5c3_Err = ui.SecondaryButton(hero.SecondaryButton.Href, hero.SecondaryButton.Text).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var7 string
|
||||
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(hero.PrimaryButton.Text)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/home/hero.templ`, Line: 28, Col: 154}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</a></div><div><a class=\"btn text-zinc-600 bg-white hover:text-zinc-900 w-full shadow\" href=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var8 templ.SafeURL = templ.SafeURL(hero.SecondaryButton.Href)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(string(templ_7745c5c3_Var8)))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var9 string
|
||||
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(hero.SecondaryButton.Text)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/home/hero.templ`, Line: 31, Col: 157}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</a></div></div></div></div>")
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div></div></div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -163,21 +134,21 @@ func heroImage(hero *models.Hero) templ.Component {
|
||||
}()
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Var10 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var10 == nil {
|
||||
templ_7745c5c3_Var10 = templ.NopComponent
|
||||
templ_7745c5c3_Var6 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var6 == nil {
|
||||
templ_7745c5c3_Var6 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!-- Image --><div class=\"max-w-5xl mx-auto px-4 sm:px-6 flex justify-center pb-12 md:pb-20 relative before:absolute before:-top-12 before:w-96 before:h-96 before:bg-zinc-900 before:opacity-[.15] before:rounded-full before:blur-3xl before:-z-10 from-zinc-100 to-white\"><img class=\"rounded-lg\" src=\"")
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!-- Image --><div class=\"max-w-5xl motion-preset-slide-up mx-auto px-4 sm:px-6 flex justify-center pb-12 md:pb-20 relative before:absolute before:-top-12 before:w-96 before:h-96 before:bg-zinc-900 before:opacity-[.15] before:rounded-full before:blur-3xl before:-z-10 from-zinc-100 to-white\"><img class=\"rounded-lg \" src=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var11 string
|
||||
templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(hero.Image.Src)
|
||||
var templ_7745c5c3_Var7 string
|
||||
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(hero.Image.Src)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/home/hero.templ`, Line: 48, Col: 23}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/home/hero.templ`, Line: 47, Col: 23}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -185,12 +156,12 @@ func heroImage(hero *models.Hero) templ.Component {
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var12 string
|
||||
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(hero.Image.Width)
|
||||
var templ_7745c5c3_Var8 string
|
||||
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(hero.Image.Width)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/home/hero.templ`, Line: 49, Col: 27}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/home/hero.templ`, Line: 48, Col: 27}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -198,12 +169,12 @@ func heroImage(hero *models.Hero) templ.Component {
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var13 string
|
||||
templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(hero.Image.Height)
|
||||
var templ_7745c5c3_Var9 string
|
||||
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(hero.Image.Height)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/home/hero.templ`, Line: 50, Col: 29}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/home/hero.templ`, Line: 49, Col: 29}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -231,9 +202,9 @@ func stats() templ.Component {
|
||||
}()
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Var14 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var14 == nil {
|
||||
templ_7745c5c3_Var14 = templ.NopComponent
|
||||
templ_7745c5c3_Var10 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var10 == nil {
|
||||
templ_7745c5c3_Var10 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!-- Stats --><div class=\"max-w-4xl mx-auto px-4 sm:px-6 justify-center items-center\"><div class=\"max-w-sm mx-auto grid gap-12 sm:grid-cols-2 md:grid-cols-4 md:-mx-5 md:gap-0 items-end md:max-w-none\"><!-- 1st item --><div class=\"relative text-center md:px-5 after:hidden md:after:block after:absolute after:right-0 after:top-1/2 after:-translate-y-1/2 after:w-px after:h-8 after:border-l after:border-zinc-300 after:border-dashed last:after:hidden\"><h4 class=\"font-inter-tight text-2xl md:text-3xl font-bold tabular-nums mb-2\"><span x-data=\"counter(476)\" x-text=\"counterValue\">0</span>K</h4><p class=\"text-sm text-zinc-500\">Assets packed with power beyond your imagination.</p></div><!-- 2nd item --><div class=\"relative text-center md:px-5 after:hidden md:after:block after:absolute after:right-0 after:top-1/2 after:-translate-y-1/2 after:w-px after:h-8 after:border-l after:border-zinc-300 after:border-dashed last:after:hidden\"><h4 class=\"font-inter-tight text-2xl md:text-3xl font-bold tabular-nums mb-2\"><span x-data=\"counter(1.44)\" x-text=\"counterValue\">0</span>K</h4><p class=\"text-sm text-zinc-500\">Assets packed with power beyond your imagination.</p></div><!-- 3rd item --><div class=\"relative text-center md:px-5 after:hidden md:after:block after:absolute after:right-0 after:top-1/2 after:-translate-y-1/2 after:w-px after:h-8 after:border-l after:border-zinc-300 after:border-dashed last:after:hidden\"><h4 class=\"font-inter-tight text-2xl md:text-3xl font-bold tabular-nums mb-2\"><span x-data=\"counter(1.5)\" x-text=\"counterValue\">0</span>M+</h4><p class=\"text-sm text-zinc-500\">Assets packed with power beyond your imagination.</p></div><!-- 4th item --><div class=\"relative text-center md:px-5 after:hidden md:after:block after:absolute after:right-0 after:top-1/2 after:-translate-y-1/2 after:w-px after:h-8 after:border-l after:border-zinc-300 after:border-dashed last:after:hidden\"><h4 class=\"font-inter-tight text-2xl md:text-3xl font-bold tabular-nums mb-2\"><span x-data=\"counter(750)\" x-text=\"counterValue\">0</span>K</h4><p class=\"text-sm text-zinc-500\">Assets packed with power beyond your imagination.</p></div></div>")
|
||||
|
||||
@@ -12,9 +12,8 @@ templ Highlights() {
|
||||
The Internet Rebuilt for You
|
||||
</h2>
|
||||
<p class="text-lg text-zinc-500">
|
||||
AI reads and understands your designs, and with nothing more
|
||||
than a single line of feedback, perform complex actions
|
||||
autonomously.
|
||||
Sonr is a comprehensive system for Identity Management which proteects users across their digital personas while
|
||||
providing Developers a cost-effective solution for decentralized authentication.
|
||||
</p>
|
||||
</div>
|
||||
<div x-data="{ tab: '1' }">
|
||||
@@ -145,14 +144,6 @@ templ Highlights() {
|
||||
height="360"
|
||||
alt="Feature 01"
|
||||
/>
|
||||
<img
|
||||
class="absolute top-0 left-full -translate-x-[70%] -mr-20 max-md:w-[45%]"
|
||||
src="./images/feature-illustration.png"
|
||||
width="273"
|
||||
height="288"
|
||||
alt="Illustration"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Item 2 -->
|
||||
@@ -174,14 +165,6 @@ templ Highlights() {
|
||||
height="360"
|
||||
alt="Feature 02"
|
||||
/>
|
||||
<img
|
||||
class="absolute top-0 left-full -translate-x-[70%] -mr-20 max-md:w-[45%]"
|
||||
src="./images/feature-illustration.png"
|
||||
width="273"
|
||||
height="288"
|
||||
alt="Illustration"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Item 3 -->
|
||||
@@ -203,14 +186,6 @@ templ Highlights() {
|
||||
height="360"
|
||||
alt="Feature 03"
|
||||
/>
|
||||
<img
|
||||
class="absolute top-0 left-full -translate-x-[70%] -mr-20 max-md:w-[45%]"
|
||||
src="./images/feature-illustration.png"
|
||||
width="273"
|
||||
height="288"
|
||||
alt="Illustration"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Item 4 -->
|
||||
@@ -232,14 +207,6 @@ templ Highlights() {
|
||||
height="360"
|
||||
alt="Feature 04"
|
||||
/>
|
||||
<img
|
||||
class="absolute top-0 left-full -translate-x-[70%] -mr-20 max-md:w-[45%]"
|
||||
src="./images/feature-illustration.png"
|
||||
width="273"
|
||||
height="288"
|
||||
alt="Illustration"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -5,15 +5,15 @@ import (
|
||||
"github.com/onsonr/sonr/pkg/nebula/models"
|
||||
)
|
||||
|
||||
templ View(hero *models.Hero) {
|
||||
templ View(home *models.Home) {
|
||||
@blocks.LayoutNoBody("Sonr.ID", true) {
|
||||
@MarketingHeader()
|
||||
@SectionHero(hero)
|
||||
@Header()
|
||||
@SectionHero(home.Hero)
|
||||
@Highlights()
|
||||
@Features()
|
||||
@Bento()
|
||||
@Lowlights()
|
||||
@CallToAction()
|
||||
@MarketingFooter()
|
||||
@Footer()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
"github.com/onsonr/sonr/pkg/nebula/models"
|
||||
)
|
||||
|
||||
func View(hero *models.Hero) templ.Component {
|
||||
func View(home *models.Home) templ.Component {
|
||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||
@@ -46,7 +46,7 @@ func View(hero *models.Hero) templ.Component {
|
||||
}()
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Err = MarketingHeader().Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = Header().Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -54,7 +54,7 @@ func View(hero *models.Hero) templ.Component {
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = SectionHero(hero).Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = SectionHero(home.Hero).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -102,7 +102,7 @@ func View(hero *models.Hero) templ.Component {
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = MarketingFooter().Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = Footer().Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
|
||||
@@ -16,7 +16,6 @@ templ Modal(c echo.Context) {
|
||||
"
|
||||
@keydown.escape="fullscreenModal=false"
|
||||
>
|
||||
<button @click="fullscreenModal=true" class="inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium transition-colors bg-white border rounded-md hover:bg-neutral-100 active:bg-white focus:bg-white focus:outline-none focus:ring-2 focus:ring-neutral-200/60 focus:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none">Preview</button>
|
||||
<template x-teleport="body">
|
||||
<div
|
||||
x-show="fullscreenModal"
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -11,7 +11,6 @@ templ View(c echo.Context) {
|
||||
@blocks.H1("Sonr.ID")
|
||||
@blocks.Text("Neo-tree is a file manager for NeoFS.")
|
||||
@blocks.Spacer()
|
||||
@blocks.RadioGroup()
|
||||
@blocks.Spacer()
|
||||
@blocks.Button(blocks.GET("/", "#login-view")) {
|
||||
@blocks.Text("Cancel")
|
||||
|
||||
@@ -82,14 +82,6 @@ func View(c echo.Context) templ.Component {
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = blocks.RadioGroup().Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = blocks.Spacer().Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
|
||||
@@ -9,7 +9,6 @@ templ View(c echo.Context) {
|
||||
@blocks.Layout("Sonr.ID", true) {
|
||||
@blocks.Card("profile-view", blocks.SizeLarge) {
|
||||
@blocks.ProfileCard()
|
||||
@blocks.Tabs()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,14 +62,6 @@ func View(c echo.Context) templ.Component {
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = blocks.Tabs().Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
templ_7745c5c3_Err = blocks.Card("profile-view", blocks.SizeLarge).Render(templ.WithChildren(ctx, templ_7745c5c3_Var3), templ_7745c5c3_Buffer)
|
||||
|
||||
@@ -3,17 +3,15 @@ package register
|
||||
import (
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/onsonr/sonr/pkg/nebula/components/blocks"
|
||||
"github.com/onsonr/sonr/pkg/nebula/models/formstate"
|
||||
)
|
||||
|
||||
templ Modal(c echo.Context) {
|
||||
<div
|
||||
x-data="{ modalOpen: true }"
|
||||
@keydown.escape.window="modalOpen = false"
|
||||
@keydown.escape="modalOpen=false"
|
||||
:class="{ 'z-40': modalOpen }"
|
||||
class="relative w-auto h-auto"
|
||||
>
|
||||
<button @click="modalOpen=true" class="inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium transition-colors bg-white border rounded-md hover:bg-neutral-100 active:bg-white focus:bg-white focus:outline-none focus:ring-2 focus:ring-neutral-200/60 focus:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none">Open</button>
|
||||
<template x-teleport="body">
|
||||
<div x-show="modalOpen" class="fixed top-0 left-0 z-[99] flex items-center justify-center w-screen h-screen" x-cloak>
|
||||
<div
|
||||
@@ -25,7 +23,7 @@ templ Modal(c echo.Context) {
|
||||
x-transition:leave-start="opacity-100"
|
||||
x-transition:leave-end="opacity-0"
|
||||
@click="modalOpen=false"
|
||||
class="absolute inset-0 w-full h-full bg-gray-900 bg-opacity-50 backdrop-blur-sm"
|
||||
class="absolute inset-0 w-full h-full bg-zinc-900 bg-opacity-50 backdrop-blur-sm"
|
||||
></div>
|
||||
<div
|
||||
x-show="modalOpen"
|
||||
@@ -39,24 +37,19 @@ templ Modal(c echo.Context) {
|
||||
class="relative w-full py-6 bg-white shadow-md px-7 bg-opacity-90 drop-shadow-md backdrop-blur-sm sm:max-w-lg sm:rounded-lg"
|
||||
>
|
||||
<div class="flex items-center justify-between pb-3">
|
||||
<h3 class="text-lg font-semibold">Modal Title</h3>
|
||||
<button @click="modalOpen=false" class="absolute top-0 right-0 flex items-center justify-center w-8 h-8 mt-5 mr-5 text-gray-600 rounded-full hover:text-gray-800 hover:bg-gray-50">
|
||||
<h3 class="text-lg font-semibold">Account Registration</h3>
|
||||
<button @click="modalOpen=false" class="absolute top-0 right-0 flex items-center justify-center w-8 h-8 mt-5 mr-5 text-zinc-600 rounded-full hover:text-zinc-800 hover:bg-zinc-50">
|
||||
<svg class="w-5 h-5" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12"></path></svg>
|
||||
</button>
|
||||
</div>
|
||||
<div class="relative w-auto pb-8">
|
||||
<p>This is placeholder text. Replace it with your own content.</p>
|
||||
<p>Enter your account information below to create your account.</p>
|
||||
</div>
|
||||
@blocks.H2("Account Registration")
|
||||
@blocks.Spacer()
|
||||
@blocks.Breadcrumbs()
|
||||
@basicInfoForm(formstate.Initial)
|
||||
@basicInfoForm()
|
||||
@blocks.Spacer()
|
||||
@blocks.Button(blocks.GET("/", "#register-view")) {
|
||||
@blocks.Text("Cancel")
|
||||
}
|
||||
<div class="flex flex-col-reverse sm:flex-row sm:justify-between sm:space-x-2">
|
||||
<button @click="modalOpen=false" type="button" class="inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium transition-colors border rounded-md focus:outline-none focus:ring-2 focus:ring-neutral-100 focus:ring-offset-2">Previous</button>
|
||||
<button @click="modalOpen=false" type="button" class="inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium transition-colors border rounded-md focus:outline-none focus:ring-2 focus:ring-neutral-100 focus:ring-offset-2">Cancel</button>
|
||||
<button @click="modalOpen=false" type="button" class="inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium text-white transition-colors border border-transparent rounded-md focus:outline-none focus:ring-2 focus:ring-neutral-900 focus:ring-offset-2 bg-neutral-950 hover:bg-neutral-900">Next</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -11,7 +11,6 @@ import templruntime "github.com/a-h/templ/runtime"
|
||||
import (
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/onsonr/sonr/pkg/nebula/components/blocks"
|
||||
"github.com/onsonr/sonr/pkg/nebula/models/formstate"
|
||||
)
|
||||
|
||||
func Modal(c echo.Context) templ.Component {
|
||||
@@ -35,15 +34,7 @@ func Modal(c echo.Context) templ.Component {
|
||||
templ_7745c5c3_Var1 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div x-data=\"{ modalOpen: true }\" @keydown.escape.window=\"modalOpen = false\" :class=\"{ 'z-40': modalOpen }\" class=\"relative w-auto h-auto\"><button @click=\"modalOpen=true\" class=\"inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium transition-colors bg-white border rounded-md hover:bg-neutral-100 active:bg-white focus:bg-white focus:outline-none focus:ring-2 focus:ring-neutral-200/60 focus:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none\">Open</button><template x-teleport=\"body\"><div x-show=\"modalOpen\" class=\"fixed top-0 left-0 z-[99] flex items-center justify-center w-screen h-screen\" x-cloak><div x-show=\"modalOpen\" x-transition:enter=\"ease-out duration-300\" x-transition:enter-start=\"opacity-0\" x-transition:enter-end=\"opacity-100\" x-transition:leave=\"ease-in duration-300\" x-transition:leave-start=\"opacity-100\" x-transition:leave-end=\"opacity-0\" @click=\"modalOpen=false\" class=\"absolute inset-0 w-full h-full bg-gray-900 bg-opacity-50 backdrop-blur-sm\"></div><div x-show=\"modalOpen\" x-trap.inert.noscroll=\"modalOpen\" x-transition:enter=\"ease-out duration-300\" x-transition:enter-start=\"opacity-0 scale-90\" x-transition:enter-end=\"opacity-100 scale-100\" x-transition:leave=\"ease-in duration-200\" x-transition:leave-start=\"opacity-100 scale-100\" x-transition:leave-end=\"opacity-0 scale-90\" class=\"relative w-full py-6 bg-white shadow-md px-7 bg-opacity-90 drop-shadow-md backdrop-blur-sm sm:max-w-lg sm:rounded-lg\"><div class=\"flex items-center justify-between pb-3\"><h3 class=\"text-lg font-semibold\">Modal Title</h3><button @click=\"modalOpen=false\" class=\"absolute top-0 right-0 flex items-center justify-center w-8 h-8 mt-5 mr-5 text-gray-600 rounded-full hover:text-gray-800 hover:bg-gray-50\"><svg class=\"w-5 h-5\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M6 18L18 6M6 6l12 12\"></path></svg></button></div><div class=\"relative w-auto pb-8\"><p>This is placeholder text. Replace it with your own content.</p></div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = blocks.H2("Account Registration").Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = blocks.Spacer().Render(ctx, templ_7745c5c3_Buffer)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div x-data=\"{ modalOpen: true }\" @keydown.escape=\"modalOpen=false\" :class=\"{ 'z-40': modalOpen }\" class=\"relative w-auto h-auto\"><template x-teleport=\"body\"><div x-show=\"modalOpen\" class=\"fixed top-0 left-0 z-[99] flex items-center justify-center w-screen h-screen\" x-cloak><div x-show=\"modalOpen\" x-transition:enter=\"ease-out duration-300\" x-transition:enter-start=\"opacity-0\" x-transition:enter-end=\"opacity-100\" x-transition:leave=\"ease-in duration-300\" x-transition:leave-start=\"opacity-100\" x-transition:leave-end=\"opacity-0\" @click=\"modalOpen=false\" class=\"absolute inset-0 w-full h-full bg-zinc-900 bg-opacity-50 backdrop-blur-sm\"></div><div x-show=\"modalOpen\" x-trap.inert.noscroll=\"modalOpen\" x-transition:enter=\"ease-out duration-300\" x-transition:enter-start=\"opacity-0 scale-90\" x-transition:enter-end=\"opacity-100 scale-100\" x-transition:leave=\"ease-in duration-200\" x-transition:leave-start=\"opacity-100 scale-100\" x-transition:leave-end=\"opacity-0 scale-90\" class=\"relative w-full py-6 bg-white shadow-md px-7 bg-opacity-90 drop-shadow-md backdrop-blur-sm sm:max-w-lg sm:rounded-lg\"><div class=\"flex items-center justify-between pb-3\"><h3 class=\"text-lg font-semibold\">Account Registration</h3><button @click=\"modalOpen=false\" class=\"absolute top-0 right-0 flex items-center justify-center w-8 h-8 mt-5 mr-5 text-zinc-600 rounded-full hover:text-zinc-800 hover:bg-zinc-50\"><svg class=\"w-5 h-5\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M6 18L18 6M6 6l12 12\"></path></svg></button></div><div class=\"relative w-auto pb-8\"><p>Enter your account information below to create your account.</p></div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -51,7 +42,7 @@ func Modal(c echo.Context) templ.Component {
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = basicInfoForm(formstate.Initial).Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = basicInfoForm().Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -59,29 +50,7 @@ func Modal(c echo.Context) templ.Component {
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Var2 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
defer func() {
|
||||
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err == nil {
|
||||
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||||
}
|
||||
}()
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Err = blocks.Text("Cancel").Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
templ_7745c5c3_Err = blocks.Button(blocks.GET("/", "#register-view")).Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"flex flex-col-reverse sm:flex-row sm:justify-between sm:space-x-2\"><button @click=\"modalOpen=false\" type=\"button\" class=\"inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium transition-colors border rounded-md focus:outline-none focus:ring-2 focus:ring-neutral-100 focus:ring-offset-2\">Previous</button> <button @click=\"modalOpen=false\" type=\"button\" class=\"inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium text-white transition-colors border border-transparent rounded-md focus:outline-none focus:ring-2 focus:ring-neutral-900 focus:ring-offset-2 bg-neutral-950 hover:bg-neutral-900\">Next</button></div></div></div></template></div>")
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"flex flex-col-reverse sm:flex-row sm:justify-between sm:space-x-2\"><button @click=\"modalOpen=false\" type=\"button\" class=\"inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium transition-colors border rounded-md focus:outline-none focus:ring-2 focus:ring-neutral-100 focus:ring-offset-2\">Cancel</button> <button @click=\"modalOpen=false\" type=\"button\" class=\"inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium text-white transition-colors border border-transparent rounded-md focus:outline-none focus:ring-2 focus:ring-neutral-900 focus:ring-offset-2 bg-neutral-950 hover:bg-neutral-900\">Next</button></div></div></div></template></div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
|
||||
@@ -1,38 +1,11 @@
|
||||
package register
|
||||
|
||||
import (
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/onsonr/sonr/pkg/nebula/components/blocks"
|
||||
"github.com/onsonr/sonr/pkg/nebula/models/formstate"
|
||||
)
|
||||
|
||||
templ View(c echo.Context) {
|
||||
@blocks.Layout("Sonr.ID", true) {
|
||||
@blocks.Card("register-view", blocks.SizeMedium) {
|
||||
@blocks.H2("Account Registration")
|
||||
@blocks.Spacer()
|
||||
@blocks.Breadcrumbs()
|
||||
@basicInfoForm(formstate.Initial)
|
||||
@blocks.Spacer()
|
||||
@blocks.Button(blocks.GET("/", "#register-view")) {
|
||||
@blocks.Text("Cancel")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
templ basicInfoForm(state formstate.FormState) {
|
||||
switch (state) {
|
||||
default:
|
||||
<div class="border rounded-lg shadow-sm bg-card text-neutral-900">
|
||||
<div class="flex flex-col space-y-1.5 p-6">
|
||||
<h3 class="text-lg font-semibold leading-none tracking-tight">Account</h3>
|
||||
<p class="text-sm text-neutral-500">Make changes to your account here. Click save when you're done.</p>
|
||||
</div>
|
||||
<div class="p-6 pt-0 space-y-2">
|
||||
<div class="space-y-1"><label class="text-xs font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" for="name">Name</label><input type="text" id="name" placeholder="Adam Wathan" class="flex w-full h-10 px-3 py-2 text-sm bg-white border rounded-md peer border-neutral-300 ring-offset-background placeholder:text-neutral-400 focus:border-neutral-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-neutral-400 disabled:cursor-not-allowed disabled:opacity-50"/></div>
|
||||
<div class="space-y-1"><label class="text-xs font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" for="username">Handle</label><input type="text" id="handle" placeholder="angelo.snr" class="flex w-full h-10 px-3 py-2 text-sm bg-white border rounded-md peer border-neutral-300 ring-offset-background placeholder:text-neutral-400 focus:border-neutral-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-neutral-400 disabled:cursor-not-allowed disabled:opacity-50"/></div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
templ basicInfoForm() {
|
||||
<div class="border rounded-lg shadow-sm bg-card text-zinc-900">
|
||||
<div class="flex flex-col space-y-1.5 p-6"></div>
|
||||
<div class="p-6 pt-0 space-y-2">
|
||||
<div class="space-y-1"><label class="text-xs font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" for="name">Name</label><input type="text" id="name" placeholder="Adam Wathan" class="flex w-full h-10 px-3 py-2 text-sm bg-white border rounded-md peer border-zinc-300 ring-offset-background placeholder:text-zinc-400 focus:border-zinc-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-neutral-400 disabled:cursor-not-allowed disabled:opacity-50"/></div>
|
||||
<div class="space-y-1"><label class="text-xs font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" for="username">Handle</label><input type="text" id="handle" placeholder="angelo.snr" class="flex w-full h-10 px-3 py-2 text-sm bg-white border rounded-md peer border-zinc-300 ring-offset-background placeholder:text-zinc-400 focus:border-zinc-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-neutral-400 disabled:cursor-not-allowed disabled:opacity-50"/></div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@@ -8,13 +8,7 @@ package register
|
||||
import "github.com/a-h/templ"
|
||||
import templruntime "github.com/a-h/templ/runtime"
|
||||
|
||||
import (
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/onsonr/sonr/pkg/nebula/components/blocks"
|
||||
"github.com/onsonr/sonr/pkg/nebula/models/formstate"
|
||||
)
|
||||
|
||||
func View(c echo.Context) templ.Component {
|
||||
func basicInfoForm() templ.Component {
|
||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||
@@ -35,101 +29,7 @@ func View(c echo.Context) templ.Component {
|
||||
templ_7745c5c3_Var1 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
templ_7745c5c3_Var2 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
defer func() {
|
||||
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err == nil {
|
||||
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||||
}
|
||||
}()
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Var3 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
defer func() {
|
||||
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err == nil {
|
||||
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||||
}
|
||||
}()
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Err = blocks.H2("Account Registration").Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = blocks.Spacer().Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = blocks.Breadcrumbs().Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = basicInfoForm(formstate.Initial).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = blocks.Spacer().Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Var4 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
defer func() {
|
||||
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err == nil {
|
||||
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||||
}
|
||||
}()
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Err = blocks.Text("Cancel").Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
templ_7745c5c3_Err = blocks.Button(blocks.GET("/", "#register-view")).Render(templ.WithChildren(ctx, templ_7745c5c3_Var4), templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
templ_7745c5c3_Err = blocks.Card("register-view", blocks.SizeMedium).Render(templ.WithChildren(ctx, templ_7745c5c3_Var3), templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
templ_7745c5c3_Err = blocks.Layout("Sonr.ID", true).Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"border rounded-lg shadow-sm bg-card text-zinc-900\"><div class=\"flex flex-col space-y-1.5 p-6\"></div><div class=\"p-6 pt-0 space-y-2\"><div class=\"space-y-1\"><label class=\"text-xs font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\" for=\"name\">Name</label><input type=\"text\" id=\"name\" placeholder=\"Adam Wathan\" class=\"flex w-full h-10 px-3 py-2 text-sm bg-white border rounded-md peer border-zinc-300 ring-offset-background placeholder:text-zinc-400 focus:border-zinc-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-neutral-400 disabled:cursor-not-allowed disabled:opacity-50\"></div><div class=\"space-y-1\"><label class=\"text-xs font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\" for=\"username\">Handle</label><input type=\"text\" id=\"handle\" placeholder=\"angelo.snr\" class=\"flex w-full h-10 px-3 py-2 text-sm bg-white border rounded-md peer border-zinc-300 ring-offset-background placeholder:text-zinc-400 focus:border-zinc-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-neutral-400 disabled:cursor-not-allowed disabled:opacity-50\"></div></div></div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -137,36 +37,4 @@ func View(c echo.Context) templ.Component {
|
||||
})
|
||||
}
|
||||
|
||||
func basicInfoForm(state formstate.FormState) templ.Component {
|
||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||
return templ_7745c5c3_CtxErr
|
||||
}
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
defer func() {
|
||||
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err == nil {
|
||||
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||||
}
|
||||
}()
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Var5 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var5 == nil {
|
||||
templ_7745c5c3_Var5 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
switch state {
|
||||
default:
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"border rounded-lg shadow-sm bg-card text-neutral-900\"><div class=\"flex flex-col space-y-1.5 p-6\"><h3 class=\"text-lg font-semibold leading-none tracking-tight\">Account</h3><p class=\"text-sm text-neutral-500\">Make changes to your account here. Click save when you're done.</p></div><div class=\"p-6 pt-0 space-y-2\"><div class=\"space-y-1\"><label class=\"text-xs font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\" for=\"name\">Name</label><input type=\"text\" id=\"name\" placeholder=\"Adam Wathan\" class=\"flex w-full h-10 px-3 py-2 text-sm bg-white border rounded-md peer border-neutral-300 ring-offset-background placeholder:text-neutral-400 focus:border-neutral-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-neutral-400 disabled:cursor-not-allowed disabled:opacity-50\"></div><div class=\"space-y-1\"><label class=\"text-xs font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\" for=\"username\">Handle</label><input type=\"text\" id=\"handle\" placeholder=\"angelo.snr\" class=\"flex w-full h-10 px-3 py-2 text-sm bg-white border rounded-md peer border-neutral-300 ring-offset-background placeholder:text-neutral-400 focus:border-neutral-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-neutral-400 disabled:cursor-not-allowed disabled:opacity-50\"></div></div></div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
var _ = templruntime.GeneratedTemplate
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package ui
|
||||
|
||||
templ PrimaryButton(href string, text string) {
|
||||
<div>
|
||||
<div class="btn cursor-pointer text-zinc-100 bg-zinc-900 hover:bg-zinc-800 w-full shadow" hx-swap="afterend" hx-get={ href }>{ text }</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
templ SecondaryButton(href string, text string) {
|
||||
<div>
|
||||
<div class="btn cursor-pointer text-zinc-600 bg-white hover:text-zinc-900 w-full shadow" hx-swap="afterend" hx-get={ href }>{ text }</div>
|
||||
</div>
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.778
|
||||
package ui
|
||||
|
||||
//lint:file-ignore SA4006 This context is only used if a nested component is present.
|
||||
|
||||
import "github.com/a-h/templ"
|
||||
import templruntime "github.com/a-h/templ/runtime"
|
||||
|
||||
func PrimaryButton(href string, text string) templ.Component {
|
||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||
return templ_7745c5c3_CtxErr
|
||||
}
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
defer func() {
|
||||
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err == nil {
|
||||
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||||
}
|
||||
}()
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Var1 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var1 == nil {
|
||||
templ_7745c5c3_Var1 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div><div class=\"btn cursor-pointer text-zinc-100 bg-zinc-900 hover:bg-zinc-800 w-full shadow\" hx-swap=\"afterend\" hx-get=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var2 string
|
||||
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(href)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/ui/button.templ`, Line: 5, Col: 124}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var3 string
|
||||
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(text)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/ui/button.templ`, Line: 5, Col: 133}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div></div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
func SecondaryButton(href string, text string) templ.Component {
|
||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||
return templ_7745c5c3_CtxErr
|
||||
}
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
defer func() {
|
||||
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err == nil {
|
||||
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||||
}
|
||||
}()
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Var4 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var4 == nil {
|
||||
templ_7745c5c3_Var4 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div><div class=\"btn cursor-pointer text-zinc-600 bg-white hover:text-zinc-900 w-full shadow\" hx-swap=\"afterend\" hx-get=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var5 string
|
||||
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(href)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/ui/button.templ`, Line: 11, Col: 123}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var6 string
|
||||
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(text)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/ui/button.templ`, Line: 11, Col: 132}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div></div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
var _ = templruntime.GeneratedTemplate
|
||||
@@ -0,0 +1,12 @@
|
||||
// Code generated from Pkl module `models`. DO NOT EDIT.
|
||||
package models
|
||||
|
||||
type Bento struct {
|
||||
Title string `pkl:"title"`
|
||||
|
||||
Description string `pkl:"description"`
|
||||
|
||||
PrimaryButton *Button `pkl:"primaryButton"`
|
||||
|
||||
SecondaryButton *Button `pkl:"secondaryButton"`
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// Code generated from Pkl module `models`. DO NOT EDIT.
|
||||
package models
|
||||
|
||||
type CallToAction struct {
|
||||
Title string `pkl:"title"`
|
||||
|
||||
Description string `pkl:"description"`
|
||||
|
||||
PrimaryButton *Button `pkl:"primaryButton"`
|
||||
|
||||
SecondaryButton *Button `pkl:"secondaryButton"`
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// Code generated from Pkl module `models`. DO NOT EDIT.
|
||||
package models
|
||||
|
||||
type Feature struct {
|
||||
Title string `pkl:"title"`
|
||||
|
||||
Description string `pkl:"description"`
|
||||
|
||||
Icon *string `pkl:"icon"`
|
||||
|
||||
Image *Image `pkl:"image"`
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// Code generated from Pkl module `models`. DO NOT EDIT.
|
||||
package models
|
||||
|
||||
type Features struct {
|
||||
Title string `pkl:"title"`
|
||||
|
||||
Description string `pkl:"description"`
|
||||
|
||||
Image *Image `pkl:"image"`
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// Code generated from Pkl module `models`. DO NOT EDIT.
|
||||
package models
|
||||
|
||||
type Form interface {
|
||||
GetTitle() string
|
||||
|
||||
GetDescription() string
|
||||
|
||||
GetInputs() []*Input
|
||||
}
|
||||
@@ -15,4 +15,6 @@ type Hero struct {
|
||||
SecondaryButton *Button `pkl:"secondaryButton"`
|
||||
|
||||
Image *Image `pkl:"image"`
|
||||
|
||||
Stats []*Stat `pkl:"stats"`
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
// Code generated from Pkl module `models`. DO NOT EDIT.
|
||||
package models
|
||||
|
||||
type Highlight struct {
|
||||
Title string `pkl:"title"`
|
||||
|
||||
Description string `pkl:"description"`
|
||||
|
||||
Image *Image `pkl:"image"`
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// Code generated from Pkl module `models`. DO NOT EDIT.
|
||||
package models
|
||||
|
||||
type Highlights struct {
|
||||
Heading string `pkl:"heading"`
|
||||
|
||||
Subheading string `pkl:"subheading"`
|
||||
|
||||
Highlights []*Feature `pkl:"highlights"`
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// Code generated from Pkl module `models`. DO NOT EDIT.
|
||||
package models
|
||||
|
||||
type Home struct {
|
||||
Hero *Hero `pkl:"hero"`
|
||||
}
|
||||
@@ -1,10 +1,12 @@
|
||||
// Code generated from Pkl module `models`. DO NOT EDIT.
|
||||
package models
|
||||
|
||||
import "github.com/onsonr/sonr/pkg/nebula/models/inputtype"
|
||||
|
||||
type Input struct {
|
||||
Label string `pkl:"label"`
|
||||
|
||||
Type string `pkl:"type"`
|
||||
Type inputtype.InputType `pkl:"type"`
|
||||
|
||||
Placeholder string `pkl:"placeholder"`
|
||||
|
||||
@@ -14,5 +16,5 @@ type Input struct {
|
||||
|
||||
Help *string `pkl:"help"`
|
||||
|
||||
Required bool `pkl:"required"`
|
||||
Required *bool `pkl:"required"`
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
// Code generated from Pkl module `models`. DO NOT EDIT.
|
||||
package models
|
||||
|
||||
type Lowlights struct {
|
||||
Title string `pkl:"title"`
|
||||
|
||||
Description string `pkl:"description"`
|
||||
|
||||
Image *Image `pkl:"image"`
|
||||
}
|
||||
@@ -8,9 +8,7 @@ import (
|
||||
)
|
||||
|
||||
type Models struct {
|
||||
Hero *Hero `pkl:"hero"`
|
||||
|
||||
Stats *Stats `pkl:"stats"`
|
||||
Home *Home `pkl:"home"`
|
||||
}
|
||||
|
||||
// LoadFromPath loads the pkl module at the given path and evaluates it into a Models
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
// Code generated from Pkl module `models`. DO NOT EDIT.
|
||||
package models
|
||||
|
||||
type RegisterFormData interface {
|
||||
Form
|
||||
}
|
||||
|
||||
var _ RegisterFormData = (*RegisterFormDataImpl)(nil)
|
||||
|
||||
type RegisterFormDataImpl struct {
|
||||
Title string `pkl:"title"`
|
||||
|
||||
Description string `pkl:"description"`
|
||||
|
||||
Inputs []*Input `pkl:"inputs"`
|
||||
}
|
||||
|
||||
func (rcv *RegisterFormDataImpl) GetTitle() string {
|
||||
return rcv.Title
|
||||
}
|
||||
|
||||
func (rcv *RegisterFormDataImpl) GetDescription() string {
|
||||
return rcv.Description
|
||||
}
|
||||
|
||||
func (rcv *RegisterFormDataImpl) GetInputs() []*Input {
|
||||
return rcv.Inputs
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user