mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-08 04:04:12 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a1889c1e04 |
@@ -0,0 +1,49 @@
|
|||||||
|
root = "."
|
||||||
|
testdata_dir = "testdata"
|
||||||
|
tmp_dir = "tmp"
|
||||||
|
|
||||||
|
[build]
|
||||||
|
delay = 1000
|
||||||
|
cmd = "devbox run build:motr"
|
||||||
|
exclude_dir = ["assets", "tmp", "vendor", "testdata"]
|
||||||
|
exclude_file = []
|
||||||
|
exclude_regex = ["_test.go"]
|
||||||
|
exclude_unchanged = true
|
||||||
|
follow_symlink = false
|
||||||
|
full_bin = "devbox run start"
|
||||||
|
include_dir = ["cmd/dwn", "cmd/motr", "internal", "models", "pkl"]
|
||||||
|
include_ext = ["go", "templ", "html", "pkl", "js", "mjs", "proto"]
|
||||||
|
include_file = [
|
||||||
|
"Dockerfile",
|
||||||
|
".goreleaser.yaml",
|
||||||
|
"go.mod",
|
||||||
|
"devbox.json",
|
||||||
|
".air.toml",
|
||||||
|
]
|
||||||
|
kill_delay = "10s"
|
||||||
|
log = "build-errors.log"
|
||||||
|
poll = false
|
||||||
|
poll_interval = 0
|
||||||
|
post_cmd = ["devbox run stop"]
|
||||||
|
pre_cmd = ["templ generate"]
|
||||||
|
rerun = false
|
||||||
|
rerun_delay = 1000
|
||||||
|
send_interrupt = true
|
||||||
|
stop_on_error = false
|
||||||
|
|
||||||
|
[color]
|
||||||
|
build = "yellow"
|
||||||
|
main = "magenta"
|
||||||
|
runner = "green"
|
||||||
|
watcher = "cyan"
|
||||||
|
|
||||||
|
[log]
|
||||||
|
main_only = true
|
||||||
|
time = true
|
||||||
|
|
||||||
|
[misc]
|
||||||
|
clean_on_exit = true
|
||||||
|
|
||||||
|
[screen]
|
||||||
|
clear_on_rebuild = true
|
||||||
|
keep_scroll = true
|
||||||
@@ -2,7 +2,6 @@
|
|||||||
name = "cz_conventional_commits"
|
name = "cz_conventional_commits"
|
||||||
tag_format = "v$version"
|
tag_format = "v$version"
|
||||||
version_scheme = "semver"
|
version_scheme = "semver"
|
||||||
version = "0.5.27"
|
version = "0.4.4"
|
||||||
update_changelog_on_bump = true
|
update_changelog_on_bump = true
|
||||||
major_version_zero = true
|
major_version_zero = true
|
||||||
changelog_file = "./docs/docs/changelog.md"
|
|
||||||
|
|||||||
@@ -1,17 +0,0 @@
|
|||||||
FROM jetpackio/devbox:latest
|
|
||||||
|
|
||||||
# Installing your devbox project
|
|
||||||
WORKDIR /code
|
|
||||||
USER root:root
|
|
||||||
RUN mkdir -p /code && chown ${DEVBOX_USER}:${DEVBOX_USER} /code
|
|
||||||
USER ${DEVBOX_USER}:${DEVBOX_USER}
|
|
||||||
|
|
||||||
# Copy devbox configuration files
|
|
||||||
COPY --chown=${DEVBOX_USER}:${DEVBOX_USER} devbox.json devbox.json
|
|
||||||
COPY --chown=${DEVBOX_USER}:${DEVBOX_USER} devbox.lock devbox.lock
|
|
||||||
|
|
||||||
RUN devbox run -- echo "Installed Packages."
|
|
||||||
RUN devbox shellenv --init-hook >> ~/.profile
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,89 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "Devbox Remote Container",
|
|
||||||
"build": {
|
|
||||||
"dockerfile": "./Dockerfile",
|
|
||||||
"context": ".."
|
|
||||||
},
|
|
||||||
"customizations": {
|
|
||||||
"vscode": {
|
|
||||||
"settings": {},
|
|
||||||
"extensions": [
|
|
||||||
"jetpack-io.devbox"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"remoteUser": "devbox",
|
|
||||||
"forwardPorts": [
|
|
||||||
1317,
|
|
||||||
26657,
|
|
||||||
9090,
|
|
||||||
3000,
|
|
||||||
80,
|
|
||||||
5000
|
|
||||||
],
|
|
||||||
"portsAttributes": {
|
|
||||||
"1317": {
|
|
||||||
"label": "sonr-api",
|
|
||||||
"onAutoForward": "notify"
|
|
||||||
},
|
|
||||||
"26657": {
|
|
||||||
"label": "sonr-rpc",
|
|
||||||
"onAutoForward": "notify"
|
|
||||||
},
|
|
||||||
"9090": {
|
|
||||||
"label": "sonr-grpc",
|
|
||||||
"onAutoForward": "silent"
|
|
||||||
},
|
|
||||||
"3000": {
|
|
||||||
"label": "hway-frontend",
|
|
||||||
"onAutoForward": "silent"
|
|
||||||
},
|
|
||||||
"80": {
|
|
||||||
"label": "ipfs-gateway",
|
|
||||||
"onAutoForward": "silent"
|
|
||||||
},
|
|
||||||
"5000": {
|
|
||||||
"label": "ipfs-api",
|
|
||||||
"onAutoForward": "silent"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"features": {
|
|
||||||
"ghcr.io/michidk/devcontainers-features/bun:1": {
|
|
||||||
"version": "latest"
|
|
||||||
},
|
|
||||||
"ghcr.io/cirolosapio/devcontainers-features/alpine-ohmyzsh:0": {
|
|
||||||
"version": "latest"
|
|
||||||
},
|
|
||||||
"ghcr.io/guiyomh/features/golangci-lint:0": {
|
|
||||||
"version": "latest"
|
|
||||||
},
|
|
||||||
"ghcr.io/meaningful-ooo/devcontainer-features/homebrew:2": {
|
|
||||||
"version": "latest"
|
|
||||||
},
|
|
||||||
"ghcr.io/devcontainers/features/docker-in-docker:2": {
|
|
||||||
"version": "latest"
|
|
||||||
},
|
|
||||||
"ghcr.io/devcontainers/features/github-cli:1": {
|
|
||||||
"version": "latest"
|
|
||||||
},
|
|
||||||
"ghcr.io/devcontainers/features/go:1": {
|
|
||||||
"version": "latest",
|
|
||||||
"go": "1.23"
|
|
||||||
},
|
|
||||||
"ghcr.io/devcontainers/features/rust:1": {
|
|
||||||
"version": "latest",
|
|
||||||
"rust": "1.73"
|
|
||||||
},
|
|
||||||
"ghcr.io/jpawlowski/devcontainer-features/codespaces-dotfiles:1": {
|
|
||||||
"version": "latest"
|
|
||||||
},
|
|
||||||
"ghcr.io/duduribeiro/devcontainer-features/neovim:1": {
|
|
||||||
"version": "latest"
|
|
||||||
},
|
|
||||||
"ghcr.io/dlouwers/devcontainer-features/devbox:1": {
|
|
||||||
"version": "latest"
|
|
||||||
},
|
|
||||||
"ghcr.io/devcontainers/features/sshd:1": {
|
|
||||||
"version": "latest"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,105 +0,0 @@
|
|||||||
You are an expert in Cosmos SDK data modeling and state management, specializing in building efficient and scalable data models using the Cosmos SDK ORM system with Protocol Buffers.
|
|
||||||
|
|
||||||
Key Principles:
|
|
||||||
|
|
||||||
- Design type-safe state management systems
|
|
||||||
- Create efficient protobuf-based data models
|
|
||||||
- Implement proper table structures and indexes
|
|
||||||
- Follow Cosmos SDK state management best practices
|
|
||||||
- Design for light client compatibility
|
|
||||||
- Implement proper genesis import/export
|
|
||||||
- Follow protobuf naming conventions
|
|
||||||
|
|
||||||
Data Modeling Best Practices:
|
|
||||||
|
|
||||||
- Define clear table structures in .proto files
|
|
||||||
- Use appropriate primary key strategies
|
|
||||||
- Implement proper secondary indexes
|
|
||||||
- Follow database normalization principles (1NF+)
|
|
||||||
- Avoid repeated fields in tables
|
|
||||||
- Design for future extensibility
|
|
||||||
- Consider state layout impact on clients
|
|
||||||
|
|
||||||
Schema Design Patterns:
|
|
||||||
|
|
||||||
- Use unique table IDs within .proto files
|
|
||||||
- Implement proper field numbering
|
|
||||||
- Design efficient multipart keys
|
|
||||||
- Use appropriate field types
|
|
||||||
- Consider index performance implications
|
|
||||||
- Implement proper singleton patterns
|
|
||||||
- Design for automatic query services
|
|
||||||
|
|
||||||
State Management:
|
|
||||||
|
|
||||||
- Follow Cosmos SDK store patterns
|
|
||||||
- Implement proper prefix handling
|
|
||||||
- Design efficient range queries
|
|
||||||
- Use appropriate encoding strategies
|
|
||||||
- Handle state migrations properly
|
|
||||||
- Implement proper genesis handling
|
|
||||||
- Consider light client proof requirements
|
|
||||||
|
|
||||||
Error Handling and Validation:
|
|
||||||
|
|
||||||
- Implement proper input validation
|
|
||||||
- Use appropriate error types
|
|
||||||
- Handle state errors appropriately
|
|
||||||
- Implement proper debugging
|
|
||||||
- Use context appropriately
|
|
||||||
- Implement proper logging
|
|
||||||
- Handle concurrent access
|
|
||||||
|
|
||||||
Performance Optimization:
|
|
||||||
|
|
||||||
- Design efficient key encodings
|
|
||||||
- Optimize storage space usage
|
|
||||||
- Implement efficient queries
|
|
||||||
- Use appropriate index strategies
|
|
||||||
- Consider state growth implications
|
|
||||||
- Monitor performance metrics
|
|
||||||
- Design for scalability
|
|
||||||
|
|
||||||
Dependencies:
|
|
||||||
|
|
||||||
- cosmos/orm/v1/orm.proto
|
|
||||||
- [google.golang.org/protobuf](http://google.golang.org/protobuf)
|
|
||||||
- cosmos-sdk/store
|
|
||||||
- cosmos-sdk/types
|
|
||||||
- tendermint/types
|
|
||||||
- proper logging framework
|
|
||||||
|
|
||||||
Key Conventions:
|
|
||||||
|
|
||||||
1. Use consistent protobuf naming
|
|
||||||
2. Implement proper documentation
|
|
||||||
3. Follow schema versioning practices
|
|
||||||
4. Use proper table ID management
|
|
||||||
5. Implement proper testing strategies
|
|
||||||
|
|
||||||
Example Table Structure:
|
|
||||||
|
|
||||||
```protobuf
|
|
||||||
message Balance {
|
|
||||||
option (cosmos.orm.v1.table) = {
|
|
||||||
id: 1
|
|
||||||
primary_key: { fields: "account,denom" }
|
|
||||||
index: { id: 1, fields: "denom" }
|
|
||||||
};
|
|
||||||
|
|
||||||
bytes account = 1;
|
|
||||||
string denom = 2;
|
|
||||||
uint64 amount = 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
message Params {
|
|
||||||
option (cosmos.orm.v1.singleton) = {
|
|
||||||
id: 2
|
|
||||||
};
|
|
||||||
|
|
||||||
google.protobuf.Duration voting_period = 1;
|
|
||||||
uint64 min_threshold = 2;
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
Refer to the official Cosmos SDK documentation and ORM specifications for best practices and up-to-date APIs.
|
|
||||||
@@ -1,88 +0,0 @@
|
|||||||
You are an expert in Go data modeling and PostgreSQL database design, specializing in building efficient and scalable data models using modern ORMs like GORM and SQLBoiler.
|
|
||||||
|
|
||||||
Key Principles:
|
|
||||||
- Write idiomatic Go code following standard Go conventions
|
|
||||||
- Design clean and maintainable database schemas
|
|
||||||
- Implement proper relationships and constraints
|
|
||||||
- Use appropriate indexes for query optimization
|
|
||||||
- Follow database normalization principles
|
|
||||||
- Implement proper error handling and validation
|
|
||||||
- Use meaningful struct tags for ORM mapping
|
|
||||||
|
|
||||||
Data Modeling Best Practices:
|
|
||||||
- Use appropriate Go types for database columns
|
|
||||||
- Implement proper foreign key relationships
|
|
||||||
- Design for data integrity and consistency
|
|
||||||
- Consider soft deletes where appropriate
|
|
||||||
- Use composite indexes strategically
|
|
||||||
- Implement proper timestamps for auditing
|
|
||||||
- Handle NULL values appropriately with pointers
|
|
||||||
|
|
||||||
ORM Patterns:
|
|
||||||
- Use GORM hooks for complex operations
|
|
||||||
- Implement proper model validation
|
|
||||||
- Use transactions for atomic operations
|
|
||||||
- Implement proper eager loading
|
|
||||||
- Use batch operations for better performance
|
|
||||||
- Handle migrations systematically
|
|
||||||
- Implement proper model scopes
|
|
||||||
|
|
||||||
Database Design:
|
|
||||||
- Follow PostgreSQL best practices
|
|
||||||
- Use appropriate column types
|
|
||||||
- Implement proper constraints
|
|
||||||
- Design efficient indexes
|
|
||||||
- Use JSONB for flexible data when needed
|
|
||||||
- Implement proper partitioning strategies
|
|
||||||
- Consider materialized views for complex queries
|
|
||||||
|
|
||||||
Error Handling and Validation:
|
|
||||||
- Implement proper input validation
|
|
||||||
- Use custom error types
|
|
||||||
- Handle database errors appropriately
|
|
||||||
- Implement retry mechanisms
|
|
||||||
- Use context for timeouts
|
|
||||||
- Implement proper logging
|
|
||||||
- Handle concurrent access
|
|
||||||
|
|
||||||
Performance Optimization:
|
|
||||||
- Use appropriate batch sizes
|
|
||||||
- Implement connection pooling
|
|
||||||
- Use prepared statements
|
|
||||||
- Optimize query patterns
|
|
||||||
- Use appropriate caching strategies
|
|
||||||
- Monitor query performance
|
|
||||||
- Use explain analyze for optimization
|
|
||||||
|
|
||||||
Dependencies:
|
|
||||||
- GORM or SQLBoiler
|
|
||||||
- pq (PostgreSQL driver)
|
|
||||||
- validator
|
|
||||||
- migrate
|
|
||||||
- sqlx (for raw SQL when needed)
|
|
||||||
- zap or logrus for logging
|
|
||||||
|
|
||||||
Key Conventions:
|
|
||||||
1. Use consistent naming conventions
|
|
||||||
2. Implement proper documentation
|
|
||||||
3. Follow database migration best practices
|
|
||||||
4. Use version control for schema changes
|
|
||||||
5. Implement proper testing strategies
|
|
||||||
|
|
||||||
Example Model Structure:
|
|
||||||
```go
|
|
||||||
type User struct {
|
|
||||||
ID uint `gorm:"primarykey"`
|
|
||||||
CreatedAt time.Time
|
|
||||||
UpdatedAt time.Time
|
|
||||||
DeletedAt gorm.DeletedAt `gorm:"index"`
|
|
||||||
|
|
||||||
Name string `gorm:"type:varchar(100);not null"`
|
|
||||||
Email string `gorm:"type:varchar(100);uniqueIndex;not null"`
|
|
||||||
Profile Profile
|
|
||||||
Orders []Order
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
Refer to the official documentation of GORM, PostgreSQL, and Go for best practices and up-to-date APIs.
|
|
||||||
|
|
||||||
@@ -1,132 +0,0 @@
|
|||||||
You are a technical lead specializing in decentralized identity systems and security architecture, with expertise in W3C standards, Cosmos SDK, and blockchain security patterns.
|
|
||||||
|
|
||||||
Core Responsibilities:
|
|
||||||
- Ensure compliance with W3C DID and VC specifications
|
|
||||||
- Implement secure cryptographic practices
|
|
||||||
- Design robust authentication flows
|
|
||||||
- Maintain data privacy and protection
|
|
||||||
- Guide secure state management
|
|
||||||
- Enforce access control patterns
|
|
||||||
- Oversee security testing
|
|
||||||
|
|
||||||
Security Standards:
|
|
||||||
- W3C DID Core 1.0
|
|
||||||
- W3C Verifiable Credentials
|
|
||||||
- W3C WebAuthn Level 2
|
|
||||||
- OAuth 2.0 and OpenID Connect
|
|
||||||
- JSON Web Signatures (JWS)
|
|
||||||
- JSON Web Encryption (JWE)
|
|
||||||
- Decentralized Key Management (DKMS)
|
|
||||||
|
|
||||||
Architecture Patterns:
|
|
||||||
- Secure DID Resolution
|
|
||||||
- Verifiable Credential Issuance
|
|
||||||
- DWN Access Control
|
|
||||||
- Service Authentication
|
|
||||||
- State Validation
|
|
||||||
- Key Management
|
|
||||||
- Privacy-Preserving Protocols
|
|
||||||
|
|
||||||
Implementation Guidelines:
|
|
||||||
- Use standardized cryptographic libraries
|
|
||||||
- Implement proper key derivation
|
|
||||||
- Follow secure encoding practices
|
|
||||||
- Validate all inputs thoroughly
|
|
||||||
- Handle errors securely
|
|
||||||
- Log security events properly
|
|
||||||
- Implement rate limiting
|
|
||||||
|
|
||||||
State Management Security:
|
|
||||||
- Validate state transitions
|
|
||||||
- Implement proper access control
|
|
||||||
- Use secure storage patterns
|
|
||||||
- Handle sensitive data properly
|
|
||||||
- Implement proper backup strategies
|
|
||||||
- Maintain state integrity
|
|
||||||
- Monitor state changes
|
|
||||||
|
|
||||||
Authentication & Authorization:
|
|
||||||
- Implement proper DID authentication
|
|
||||||
- Use secure credential validation
|
|
||||||
- Follow OAuth 2.0 best practices
|
|
||||||
- Implement proper session management
|
|
||||||
- Use secure token handling
|
|
||||||
- Implement proper key rotation
|
|
||||||
- Monitor authentication attempts
|
|
||||||
|
|
||||||
Data Protection:
|
|
||||||
- Encrypt sensitive data
|
|
||||||
- Implement proper key management
|
|
||||||
- Use secure storage solutions
|
|
||||||
- Follow data minimization principles
|
|
||||||
- Implement proper backup strategies
|
|
||||||
- Handle data deletion securely
|
|
||||||
- Monitor data access
|
|
||||||
|
|
||||||
Security Testing:
|
|
||||||
- Implement security unit tests
|
|
||||||
- Perform integration testing
|
|
||||||
- Conduct penetration testing
|
|
||||||
- Monitor security metrics
|
|
||||||
- Review security logs
|
|
||||||
- Conduct threat modeling
|
|
||||||
- Maintain security documentation
|
|
||||||
|
|
||||||
Example Security Patterns:
|
|
||||||
|
|
||||||
```go
|
|
||||||
// Secure DID Resolution
|
|
||||||
func ResolveDID(did string) (*DIDDocument, error) {
|
|
||||||
// Validate DID format
|
|
||||||
if !ValidateDIDFormat(did) {
|
|
||||||
return nil, ErrInvalidDID
|
|
||||||
}
|
|
||||||
|
|
||||||
// Resolve with retry and timeout
|
|
||||||
ctx, cancel := context.WithTimeout(context.Background(), resolveTimeout)
|
|
||||||
defer cancel()
|
|
||||||
|
|
||||||
doc, err := resolver.ResolveWithContext(ctx, did)
|
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("resolution failed: %w", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate document structure
|
|
||||||
if err := ValidateDIDDocument(doc); err != nil {
|
|
||||||
return nil, fmt.Errorf("invalid document: %w", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
return doc, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// Secure Credential Verification
|
|
||||||
func VerifyCredential(vc *VerifiableCredential) error {
|
|
||||||
// Check expiration
|
|
||||||
if vc.IsExpired() {
|
|
||||||
return ErrCredentialExpired
|
|
||||||
}
|
|
||||||
|
|
||||||
// Verify proof
|
|
||||||
if err := vc.VerifyProof(trustRegistry); err != nil {
|
|
||||||
return fmt.Errorf("invalid proof: %w", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Verify status
|
|
||||||
if err := vc.CheckRevocationStatus(); err != nil {
|
|
||||||
return fmt.Errorf("revocation check failed: %w", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
Security Checklist:
|
|
||||||
1. All DIDs follow W3C specification
|
|
||||||
2. Credentials implement proper proofs
|
|
||||||
3. Keys use proper derivation/rotation
|
|
||||||
4. State changes are validated
|
|
||||||
5. Access control is enforced
|
|
||||||
6. Data is properly encrypted
|
|
||||||
7. Logging captures security events
|
|
||||||
|
|
||||||
Refer to W3C specifications, Cosmos SDK security documentation, and blockchain security best practices for detailed implementation guidance.
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
title: "[Milestone] "
|
|
||||||
labels: ["#OKR", "#PLANNING"]
|
|
||||||
body:
|
|
||||||
- type: input
|
|
||||||
id: has-version
|
|
||||||
attributes:
|
|
||||||
label: Version
|
|
||||||
description: A tag for the associated milestone.
|
|
||||||
placeholder: v0.6.0
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
|
||||||
attributes:
|
|
||||||
label: Objective
|
|
||||||
description: Explain the objective of the OKR in less than 100 characters.
|
|
||||||
placeholder: Ethereum IBC integration with Sonr.
|
|
||||||
render: markdown
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
|
||||||
attributes:
|
|
||||||
label: Task List
|
|
||||||
description: |
|
|
||||||
Break down the objective into a list of tasks to be completed.
|
|
||||||
value: |
|
|
||||||
- [ ] #
|
|
||||||
- [ ] #
|
|
||||||
- [ ] #
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
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!"
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
blank_issues_enabled: false
|
|
||||||
contact_links:
|
|
||||||
- name: Community Discussions
|
|
||||||
url: https://github.com/orgs/onsonr/discussions
|
|
||||||
about: Please submit ideas and suggestions here.
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
---
|
|
||||||
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.
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
<!--- Provide a general summary of your changes in the Title above -->
|
|
||||||
|
|
||||||
## Description
|
|
||||||
|
|
||||||
<!--- Describe your changes in detail -->
|
|
||||||
|
|
||||||
## Related Issue(s)
|
|
||||||
|
|
||||||
<!--- This project only accepts pull requests related to open issues -->
|
|
||||||
<!--- If suggesting a new feature or change, please discuss it in an issue first -->
|
|
||||||
<!--- If fixing a bug, there should be an issue describing it with steps to reproduce -->
|
|
||||||
<!--- Please link to the issue here: -->
|
|
||||||
|
|
||||||
## Motivation and Context
|
|
||||||
|
|
||||||
<!--- Why is this change required? What problem does it solve? -->
|
|
||||||
<!--- If it fixes an open issue, please link to the issue here. -->
|
|
||||||
|
|
||||||
## How Has This Been Tested?
|
|
||||||
|
|
||||||
<!--- Please describe in detail how you tested your changes. -->
|
|
||||||
<!--- Include details of your testing environment, and the tests you ran to -->
|
|
||||||
<!--- see how your change affects other areas of the code, etc. -->
|
|
||||||
|
|
||||||
## Screenshots (if appropriate):
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
# To get started with Dependabot version updates, you'll need to specify which
|
|
||||||
# package ecosystems to update and where the package manifests are located.
|
|
||||||
# Please see the documentation for all configuration options:
|
|
||||||
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
|
|
||||||
|
|
||||||
version: 2
|
|
||||||
updates:
|
|
||||||
- package-ecosystem: "gomod" # See documentation for possible values
|
|
||||||
directory: "/" # Location of package manifests
|
|
||||||
schedule:
|
|
||||||
interval: "monthly"
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
"@pr/feature": ["feature/*", "feat/*"]
|
|
||||||
"@pr/fix": fix/*
|
|
||||||
"@pr/chore": chore/*
|
|
||||||
"@pr/docs": docs/*
|
|
||||||
"@pr/refactor": refactor/*
|
|
||||||
@@ -1,427 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
"name": "app/cosmos-sdk",
|
|
||||||
"path": "app",
|
|
||||||
"docs": [
|
|
||||||
{
|
|
||||||
"keywords": [
|
|
||||||
"module",
|
|
||||||
"cosmos"
|
|
||||||
],
|
|
||||||
"url": "https://docs.cosmos.network/v0.50/build/building-modules/module-manager"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keywords": [
|
|
||||||
"protobuf",
|
|
||||||
"cosmos"
|
|
||||||
],
|
|
||||||
"url": "https://docs.cosmos.network/v0.50/build/building-modules/messages-and-queries"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keywords": [
|
|
||||||
"rpc",
|
|
||||||
"protobuf",
|
|
||||||
"service",
|
|
||||||
"cosmos"
|
|
||||||
],
|
|
||||||
"url": "https://docs.cosmos.network/v0.50/build/building-modules/msg-services"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keywords": [
|
|
||||||
"protobuf",
|
|
||||||
"rpc",
|
|
||||||
"cosmos",
|
|
||||||
"query"
|
|
||||||
],
|
|
||||||
"url": "https://docs.cosmos.network/v0.50/build/building-modules/query-services"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keywords": [
|
|
||||||
"cosmos",
|
|
||||||
"depinject",
|
|
||||||
"sdk"
|
|
||||||
],
|
|
||||||
"url": "https://docs.cosmos.network/v0.50/build/building-modules/depinject"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "app/ibc",
|
|
||||||
"path": "app",
|
|
||||||
"docs": [
|
|
||||||
{
|
|
||||||
"keywords": [
|
|
||||||
"cosmos",
|
|
||||||
"interchain",
|
|
||||||
"accounts"
|
|
||||||
],
|
|
||||||
"url": "https://ibc.cosmos.network/v8/apps/interchain-accounts/overview/"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://ibc.cosmos.network/v8/apps/transfer/overview/"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://docs.osmosis.zone/osmosis-core/asset-info/"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://docs.osmosis.zone/osmosis-core/modules/tokenfactory"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keywords": [
|
|
||||||
"usdc",
|
|
||||||
"mint",
|
|
||||||
"cosmos",
|
|
||||||
"noble"
|
|
||||||
],
|
|
||||||
"url": "https://docs.noble.xyz/cctp/mint"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keywords": [
|
|
||||||
"usdc"
|
|
||||||
],
|
|
||||||
"url": "https://docs.noble.xyz/cctp/mint_forward"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://docs.evmos.org/protocol/modules/erc20"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://docs.nomic.io/nbtc"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "crypto/mpc",
|
|
||||||
"path": "crypto/mpc",
|
|
||||||
"docs": [
|
|
||||||
{
|
|
||||||
"keywords": [
|
|
||||||
"mpc",
|
|
||||||
"wallet",
|
|
||||||
"security",
|
|
||||||
"advanced cryptography"
|
|
||||||
],
|
|
||||||
"url": "https://csrc.nist.gov/CSRC/media/Events/NTCW19/papers/paper-DKLS.pdf"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "crypto/ucan",
|
|
||||||
"path": "crypto/ucan",
|
|
||||||
"docs": [
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://raw.githubusercontent.com/ucan-wg/spec/refs/heads/main/README.md"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "crypto/zkp",
|
|
||||||
"path": "crypto/accumulator",
|
|
||||||
"docs": [
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://eprint.iacr.org/2021/1672.pdf"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "gateway/handlers",
|
|
||||||
"path": "pkg/gateway/handlers",
|
|
||||||
"docs": [
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://echo.labstack.com/docs/cookbook/sse"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://echo.labstack.com/docs/cookbook/websocket"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://echo.labstack.com/docs/cookbook/subdomain"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "gateway/database",
|
|
||||||
"path": "pkg/gateway/internal/database",
|
|
||||||
"docs": [
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://docs.tigerbeetle.com/coding/data-modeling"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://docs.tigerbeetle.com/coding/two-phase-transfers"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://docs.tigerbeetle.com/coding/reliable-transaction-submission"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keywords": [
|
|
||||||
"currency"
|
|
||||||
],
|
|
||||||
"url": "https://docs.tigerbeetle.com/coding/recipes/currency-exchange"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keywords": [
|
|
||||||
"balance"
|
|
||||||
],
|
|
||||||
"url": "https://docs.tigerbeetle.com/coding/recipes/balance-conditional-transfers"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://docs.tigerbeetle.com/reference/account"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://docs.tigerbeetle.com/reference/transfer"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://docs.substreams.dev/documentation/consume/packages"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://docs.substreams.dev/documentation/consume/sql/deployable-services/local-service"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://docs.substreams.dev/tutorials/cosmos/injective/foundational"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "vault/handlers",
|
|
||||||
"path": "pkg/vault/handlers",
|
|
||||||
"docs": [
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://echo.labstack.com/docs/cookbook/jwt"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://echo.labstack.com/docs/middleware/secure"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "vault/database",
|
|
||||||
"path": "pkg/vault/internal/database",
|
|
||||||
"docs": [
|
|
||||||
"https://dexie.org/docs/ExportImport/dexie-export-import",
|
|
||||||
"https://dexie.org/docs/API-Reference#quick-reference",
|
|
||||||
"https://templ.guide/syntax-and-usage/script-templates"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "pkl/ipfs",
|
|
||||||
"path": "pkl/ipfs.net",
|
|
||||||
"docs": [
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://github.com/ipfs/kubo/blob/master/docs/config.md"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://pkl-lang.org/main/current/language-reference/index.html"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "pkl/matrix",
|
|
||||||
"path": "pkl/matrix.net",
|
|
||||||
"docs": [
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://pkl-lang.org/main/current/language-reference/index.html"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "pkl/chain",
|
|
||||||
"path": "pkl/sonr.chain",
|
|
||||||
"docs": [
|
|
||||||
"https://tutorials.cosmos.network/tutorials/9-path-to-prod/5-network.html",
|
|
||||||
"https://tutorials.cosmos.network/tutorials/9-path-to-prod/4-genesis.html",
|
|
||||||
"https://pkl-lang.org/main/current/language-reference/index.html",
|
|
||||||
"https://docs.cosmos.network/v0.50/user/run-node/run-testnet"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "pkl/hway",
|
|
||||||
"path": "pkl/sonr.hway",
|
|
||||||
"docs": [
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://pkl-lang.org/main/current/language-reference/index.html"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "pkl/motr",
|
|
||||||
"path": "pkl/sonr.motr",
|
|
||||||
"docs": [
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://pkl-lang.org/main/current/language-reference/index.html"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://web.dev/learn/pwa/service-workers/"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "x/did",
|
|
||||||
"path": "proto/did",
|
|
||||||
"docs": [
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://docs.cosmos.network/v0.50/build/packages/orm"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://docs.cosmos.network/v0.50/build/building-modules/protobuf-annotations"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://docs.cosmos.network/v0.50/build/modules/auth"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://docs.cosmos.network/v0.50/build/packages/collections"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://docs.cosmos.network/v0.50/build/modules/bank"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "x/dwn",
|
|
||||||
"path": "proto/dwn",
|
|
||||||
"docs": [
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://docs.cosmos.network/v0.50/build/building-modules/protobuf-annotations"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://docs.cosmos.network/v0.50/build/packages/orm"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://docs.cosmos.network/v0.50/build/modules/authz"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://docs.cosmos.network/v0.50/build/packages/collections"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://docs.cosmos.network/v0.50/build/modules/gov"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://docs.cosmos.network/v0.50/build/modules/staking"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "x/svc",
|
|
||||||
"path": "proto/svc",
|
|
||||||
"docs": [
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://docs.cosmos.network/v0.50/build/packages/collections"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://docs.cosmos.network/v0.50/build/building-modules/protobuf-annotations"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://docs.cosmos.network/v0.50/build/packages/orm"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://docs.cosmos.network/v0.50/build/modules/group"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://docs.cosmos.network/v0.50/build/modules/nft"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "repo/ci-cd",
|
|
||||||
"path": "deploy",
|
|
||||||
"docs": [
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://docs.cosmos.network/v0.50/build/tooling/cosmovisor"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://f1bonacc1.github.io/process-compose/configuration/"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://docs.nomic.io/network/ibc-relayer"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://www.jetify.com/docs/devbox"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://taskfile.dev/reference/cli"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://taskfile.dev/reference/schema"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://taskfile.dev/reference/templating/"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "repo/docs",
|
|
||||||
"path": "docs",
|
|
||||||
"docs": [
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://squidfunk.github.io/mkdocs-material/reference/"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keywords": [],
|
|
||||||
"url": "https://github.com/mkdocs/catalog/blob/main/README.md"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
ROOT_DIR=$(git rev-parse --show-toplevel)
|
|
||||||
|
|
||||||
# Extract scope name and path using jq, and pass it to fzf for selection
|
|
||||||
SCOPE=$(cat "$ROOT_DIR/.github/scopes.json" | jq -r '.[] | "\(.name)"' | fzf --prompt "Select scope:")
|
|
||||||
DOCS=$(cat "$ROOT_DIR/.github/scopes.json" | jq -r ".[] | select(.name == \"$SCOPE\") | .docs[].url")
|
|
||||||
|
|
||||||
# Write Title
|
|
||||||
TITLE=$(gum input --placeholder "Issue Title...")
|
|
||||||
|
|
||||||
# Write Goal
|
|
||||||
GOAL=$(mods --role "determine-issue-goal" "$SCOPE $TITLE")
|
|
||||||
|
|
||||||
# Input Requirements
|
|
||||||
REQUIREMENTS=()
|
|
||||||
while true; do
|
|
||||||
if [ ${#REQUIREMENTS[@]} -ge 2 ]; then
|
|
||||||
if ! gum confirm "Do you want to add another requirement?"; then
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
REQUIREMENT=$(gum input --placeholder "Add a requirement...")
|
|
||||||
if [ -n "$REQUIREMENT" ]; then
|
|
||||||
REQUIREMENTS+=("$REQUIREMENT")
|
|
||||||
else
|
|
||||||
echo "Requirement cannot be empty. Please enter a valid requirement."
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
create_body() {
|
|
||||||
echo "### Goal(s):"
|
|
||||||
echo "$GOAL"
|
|
||||||
echo "### Requirements:"
|
|
||||||
for i in "${!REQUIREMENTS[@]}"; do
|
|
||||||
echo "$(($i + 1)). ${REQUIREMENTS[$i]}"
|
|
||||||
done
|
|
||||||
echo "### Resources:"
|
|
||||||
while IFS= read -r doc; do
|
|
||||||
echo "- $doc"
|
|
||||||
done <<< "$DOCS"
|
|
||||||
}
|
|
||||||
|
|
||||||
ISSUE_BODY=$(create_body)
|
|
||||||
|
|
||||||
# Function to collect output
|
|
||||||
preview_output() {
|
|
||||||
echo "# ($SCOPE) $TITLE"
|
|
||||||
echo "$ISSUE_BODY"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Display the formatted output
|
|
||||||
preview_output | gum format
|
|
||||||
|
|
||||||
# Confirm to create a GitHub issue
|
|
||||||
if gum confirm "Do you want to create a new GitHub issue with this information?"; then
|
|
||||||
# Create a new GitHub issue using the gh CLI
|
|
||||||
gh issue create --repo onsonr/sonr --title "($SCOPE) $TITLE" --body "$ISSUE_BODY"
|
|
||||||
else
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
ROOT_DIR=$(git rev-parse --show-toplevel)
|
|
||||||
|
|
||||||
# Package the PKL projects
|
|
||||||
bunx pkl project package $ROOT_DIR/pkl/*/
|
|
||||||
|
|
||||||
# Process each directory in .out
|
|
||||||
for dir in .out/*/; do
|
|
||||||
# Get the folder name and version
|
|
||||||
folder=$(basename "$dir")
|
|
||||||
version=$(echo "$folder" | grep -o '@.*' | sed 's/@//')
|
|
||||||
new_folder=$(echo "$folder" | sed 's/@[0-9.]*$//')
|
|
||||||
|
|
||||||
# Create new directory without version
|
|
||||||
mkdir -p ".out/$new_folder/$version"
|
|
||||||
|
|
||||||
# Copy contents to versioned subdirectory
|
|
||||||
cp -r "$dir"* ".out/$new_folder/$version/"
|
|
||||||
|
|
||||||
# Find and copy only .pkl files from the original package
|
|
||||||
pkg_dir="$ROOT_DIR/pkl/$new_folder"
|
|
||||||
if [ -d "$pkg_dir" ]; then
|
|
||||||
# Copy only .pkl files to version directory
|
|
||||||
find "$pkg_dir" -name "*.pkl" -exec cp {} ".out/$new_folder/$version/" \;
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Remove old versioned directory
|
|
||||||
rm -rf "$dir"
|
|
||||||
|
|
||||||
# Upload to R2 with new structure
|
|
||||||
rclone copy ".out/$new_folder" "r2:pkljar/$new_folder"
|
|
||||||
done
|
|
||||||
|
|
||||||
# Cleanup .out directory
|
|
||||||
rm -rf .out
|
|
||||||
|
|
||||||
@@ -1,133 +0,0 @@
|
|||||||
name: Run All Checks
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
merge_group:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
tidy-pr:
|
|
||||||
name: Tidy PR
|
|
||||||
if: github.event_name == 'pull_request'
|
|
||||||
permissions:
|
|
||||||
contents: read # for TimonVS/pr-labeler-action to read config file
|
|
||||||
pull-requests: write # for TimonVS/pr-labeler-action to add labels in PR
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: TimonVS/pr-labeler-action@v5
|
|
||||||
with:
|
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
configuration-path: .github/pr-labeler.yml # optional, .github/pr-labeler.yml is the default value
|
|
||||||
|
|
||||||
test-builds:
|
|
||||||
if: github.event_name == 'pull_request'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
name: Run Build Tests
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
repository: onsonr/sonr
|
|
||||||
fetch-depth: 0
|
|
||||||
fetch-tags: true
|
|
||||||
|
|
||||||
- uses: actions/setup-go@v5
|
|
||||||
with:
|
|
||||||
go-version: "1.23"
|
|
||||||
check-latest: true
|
|
||||||
- name: Run Sonrd Build
|
|
||||||
run: make build
|
|
||||||
- name: Run Hway Build
|
|
||||||
run: make build-hway
|
|
||||||
- name: Run Motr Build
|
|
||||||
run: make build-motr
|
|
||||||
|
|
||||||
test-unit:
|
|
||||||
if: github.event_name == 'pull_request'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
name: Run Unit Tests
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
repository: onsonr/sonr
|
|
||||||
fetch-depth: 0
|
|
||||||
fetch-tags: true
|
|
||||||
|
|
||||||
- uses: actions/setup-go@v5
|
|
||||||
with:
|
|
||||||
go-version: "1.23"
|
|
||||||
check-latest: true
|
|
||||||
- run: make test-unit
|
|
||||||
|
|
||||||
test-race:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: github.event_name == 'merge_group'
|
|
||||||
name: Run Race Tests
|
|
||||||
continue-on-error: true
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
repository: onsonr/sonr
|
|
||||||
fetch-depth: 0
|
|
||||||
fetch-tags: true
|
|
||||||
|
|
||||||
- uses: actions/setup-go@v5
|
|
||||||
with:
|
|
||||||
go-version: "1.23"
|
|
||||||
check-latest: true
|
|
||||||
- run: make test-race
|
|
||||||
|
|
||||||
test-cover:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: github.event_name == 'merge_group'
|
|
||||||
name: Run Coverage Tests
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
repository: onsonr/sonr
|
|
||||||
fetch-depth: 0
|
|
||||||
fetch-tags: true
|
|
||||||
|
|
||||||
- uses: actions/setup-go@v5
|
|
||||||
with:
|
|
||||||
go-version: "1.23"
|
|
||||||
check-latest: true
|
|
||||||
- run: make test-cover
|
|
||||||
|
|
||||||
validate-release:
|
|
||||||
if: github.event_name == 'merge_group'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
name: Verify Release Config
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
repository: onsonr/sonr
|
|
||||||
fetch-depth: 0
|
|
||||||
fetch-tags: true
|
|
||||||
|
|
||||||
- uses: actions/setup-go@v5
|
|
||||||
with:
|
|
||||||
go-version: "1.23"
|
|
||||||
check-latest: true
|
|
||||||
|
|
||||||
- name: Check GoReleaser Config
|
|
||||||
uses: goreleaser/goreleaser-action@v6
|
|
||||||
with:
|
|
||||||
distribution: goreleaser
|
|
||||||
version: latest
|
|
||||||
args: check
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: GoReleaser Dry Run
|
|
||||||
uses: goreleaser/goreleaser-action@v6
|
|
||||||
with:
|
|
||||||
distribution: goreleaser
|
|
||||||
version: latest
|
|
||||||
args: release --snapshot --clean --skip=publish
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
name: Upload Public Assets
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- develop
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
issues: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
buf_push:
|
||||||
|
name: Publish to buf.build/onsonr/sonr
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
# Run `git checkout`
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
# Install the `buf` CLI
|
||||||
|
- uses: bufbuild/buf-setup-action@v1
|
||||||
|
# Push only the Input in `proto` to the BSR
|
||||||
|
- uses: bufbuild/buf-push-action@v1
|
||||||
|
continue-on-error: true
|
||||||
|
with:
|
||||||
|
input: proto
|
||||||
|
buf_token: ${{ secrets.BUF_TOKEN }}
|
||||||
|
|
||||||
|
upload_pkl:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: Publish to pkl.sh
|
||||||
|
steps:
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Upload to R2
|
||||||
|
uses: ryand56/r2-upload-action@latest
|
||||||
|
with:
|
||||||
|
r2-account-id: ${{ secrets.R2_ACCOUNT_ID }}
|
||||||
|
r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }}
|
||||||
|
r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }}
|
||||||
|
r2-bucket: pkljar
|
||||||
|
source-dir: pkl
|
||||||
|
destination-dir: .
|
||||||
|
|
||||||
|
upload_nebula_cdn:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: Publish to cdn.sonr.id
|
||||||
|
steps:
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Upload to R2
|
||||||
|
uses: ryand56/r2-upload-action@latest
|
||||||
|
with:
|
||||||
|
r2-account-id: ${{ secrets.R2_ACCOUNT_ID }}
|
||||||
|
r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }}
|
||||||
|
r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }}
|
||||||
|
r2-bucket: nebula
|
||||||
|
source-dir: pkg/nebula/assets
|
||||||
|
destination-dir: .
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
name: Publish Versioned Assets
|
|
||||||
on:
|
|
||||||
release:
|
|
||||||
types: [published]
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
issues: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
buf_push:
|
|
||||||
name: Publish to buf.build/onsonr/sonr
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
# Run `git checkout`
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
# Install the `buf` CLI
|
|
||||||
- uses: bufbuild/buf-setup-action@v1
|
|
||||||
# Push only the Input in `proto` to the BSR
|
|
||||||
- uses: bufbuild/buf-push-action@v1
|
|
||||||
continue-on-error: true
|
|
||||||
with:
|
|
||||||
input: proto
|
|
||||||
buf_token: ${{ secrets.BUF_TOKEN }}
|
|
||||||
|
|
||||||
publish-docs:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
name: Publish Docs
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Configure Git Credentials
|
|
||||||
run: |
|
|
||||||
git config user.name github-actions[bot]
|
|
||||||
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
|
||||||
- uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: 3.x
|
|
||||||
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
|
|
||||||
- uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
key: mkdocs-material-${{ env.cache_id }}
|
|
||||||
path: .cache
|
|
||||||
restore-keys: |
|
|
||||||
mkdocs-material-
|
|
||||||
- run: pip install mkdocs-material
|
|
||||||
- run: cd docs && mkdocs gh-deploy --force
|
|
||||||
@@ -1,8 +1,7 @@
|
|||||||
name: Versioned Release
|
name: Scheduled Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
workflow_dispatch:
|
||||||
types: [closed]
|
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- v*
|
- v*
|
||||||
@@ -11,27 +10,8 @@ permissions:
|
|||||||
contents: write
|
contents: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
bump-version:
|
goreleaser:
|
||||||
if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'develop'
|
name: Release motr, sonrd, and DWN
|
||||||
runs-on: ubuntu-latest
|
|
||||||
name: Bump Current Version
|
|
||||||
outputs:
|
|
||||||
new_tag: ${{ steps.bump.outputs.new_tag }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
fetch-depth: 0
|
|
||||||
- name: Create bump and changelog
|
|
||||||
id: bump
|
|
||||||
uses: commitizen-tools/commitizen-action@master
|
|
||||||
with:
|
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
increment: "PATCH"
|
|
||||||
|
|
||||||
new-release:
|
|
||||||
name: Run GoReleaser on New Tag
|
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
|
||||||
permissions: write-all
|
permissions: write-all
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
@@ -44,23 +24,24 @@ jobs:
|
|||||||
|
|
||||||
- uses: actions/setup-go@v5
|
- uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: "1.23"
|
go-version: "1.22"
|
||||||
check-latest: true
|
check-latest: true
|
||||||
|
|
||||||
- name: Login to Docker Hub
|
- name: Login to Docker Hub
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_TOKEN }}
|
||||||
|
|
||||||
- name: Release
|
- name: Release
|
||||||
uses: goreleaser/goreleaser-action@v6
|
uses: goreleaser/goreleaser-action@v6
|
||||||
with:
|
with:
|
||||||
distribution: goreleaser
|
distribution: goreleaser-pro
|
||||||
version: latest
|
version: latest
|
||||||
args: release --clean
|
args: release --clean
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GH_RELEASER_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GH_RELEASER_TOKEN }}
|
||||||
|
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
|
||||||
GITHUB_PERSONAL_AUTH_TOKEN: ${{ secrets.GH_RELEASER_TOKEN }}
|
GITHUB_PERSONAL_AUTH_TOKEN: ${{ secrets.GH_RELEASER_TOKEN }}
|
||||||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
name: Update Version
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
run-tests:
|
||||||
|
name: "Run tests"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: "1.22"
|
||||||
|
check-latest: true
|
||||||
|
- name: Run tests
|
||||||
|
run: make test
|
||||||
|
|
||||||
|
check-proto-changes:
|
||||||
|
name: "Check Proto Changes"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
proto_changed: ${{ steps.check_proto.outputs.proto_changed }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Check for changes in proto directory
|
||||||
|
id: check_proto
|
||||||
|
run: |
|
||||||
|
git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep -q '^proto/' && \
|
||||||
|
echo "proto_changed=true" >> $GITHUB_OUTPUT || \
|
||||||
|
echo "proto_changed=false" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
bump-version:
|
||||||
|
needs: [run-tests, check-proto-changes]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: "Bump Version"
|
||||||
|
if: ${{ !startsWith(github.event.head_commit.message, 'bump:') }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Create bump and changelog
|
||||||
|
uses: commitizen-tools/commitizen-action@master
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
increment: ${{ needs.check-proto-changes.outputs.proto_changed == 'true' && 'MINOR' || 'PATCH' }}
|
||||||
+2
-28
@@ -1,9 +1,5 @@
|
|||||||
# Binaries
|
# Binaries
|
||||||
no
|
|
||||||
.data
|
.data
|
||||||
schemas
|
|
||||||
*.db
|
|
||||||
tools-stamp
|
|
||||||
*.exe
|
*.exe
|
||||||
*.exe~
|
*.exe~
|
||||||
*.dll
|
*.dll
|
||||||
@@ -14,21 +10,14 @@ tools-stamp
|
|||||||
.session.vim
|
.session.vim
|
||||||
aof*
|
aof*
|
||||||
dist
|
dist
|
||||||
**/.haptic
|
|
||||||
static
|
|
||||||
pkg/webapp/dist
|
|
||||||
.agent
|
|
||||||
|
|
||||||
# Test binary
|
# Test binary
|
||||||
*.test
|
*.test
|
||||||
.devon*
|
.devon*
|
||||||
**/.DS_Store
|
**/.DS_Store
|
||||||
.task
|
|
||||||
.wrangler
|
|
||||||
|
|
||||||
# Output of the go coverage tool
|
# Output of the go coverage tool
|
||||||
*.out
|
*.out
|
||||||
tmp
|
|
||||||
# Exclude embedded files
|
# Exclude embedded files
|
||||||
!internal/files/dist
|
!internal/files/dist
|
||||||
|
|
||||||
@@ -42,7 +31,6 @@ go.work.sum
|
|||||||
# Environment files
|
# Environment files
|
||||||
.env
|
.env
|
||||||
**/*.env
|
**/*.env
|
||||||
**/sonr.log
|
|
||||||
|
|
||||||
|
|
||||||
# Terraform
|
# Terraform
|
||||||
@@ -61,7 +49,6 @@ override.tf.json
|
|||||||
|
|
||||||
.terraformrc
|
.terraformrc
|
||||||
terraform.rc
|
terraform.rc
|
||||||
flake.lock
|
|
||||||
|
|
||||||
# Misc
|
# Misc
|
||||||
.DS_Store
|
.DS_Store
|
||||||
@@ -84,23 +71,10 @@ deploy/**/data
|
|||||||
x/.DS_Store
|
x/.DS_Store
|
||||||
.aider*
|
.aider*
|
||||||
buildenv*
|
buildenv*
|
||||||
node_modules
|
nebula/node_modules
|
||||||
cmd/gateway/node_modules
|
|
||||||
pkg/nebula/node_modules
|
|
||||||
|
|
||||||
mprocs.yaml
|
mprocs.yaml
|
||||||
build
|
build
|
||||||
sonr.wiki
|
|
||||||
|
|
||||||
!devbox.lock
|
!devbox.lock
|
||||||
!buf.lock
|
!buf.lock
|
||||||
|
|
||||||
.air.toml
|
|
||||||
mprocs.yaml
|
|
||||||
mprocs.log
|
|
||||||
tools-stamp
|
|
||||||
sonr.log
|
|
||||||
deploy/conf
|
|
||||||
|
|
||||||
interchaintest-downloader
|
|
||||||
.haptic
|
|
||||||
|
|||||||
+96
-136
@@ -3,158 +3,77 @@ version: 2
|
|||||||
project_name: sonr
|
project_name: sonr
|
||||||
|
|
||||||
builds:
|
builds:
|
||||||
- id: motr
|
|
||||||
main: ./cmd/motr
|
|
||||||
binary: app
|
|
||||||
goos:
|
|
||||||
- js
|
|
||||||
goarch:
|
|
||||||
- wasm
|
|
||||||
|
|
||||||
- id: sonr
|
- id: sonr
|
||||||
|
goos: [linux, darwin]
|
||||||
|
goarch: [amd64, arm64]
|
||||||
main: ./cmd/sonrd
|
main: ./cmd/sonrd
|
||||||
binary: sonrd
|
binary: sonrd
|
||||||
mod_timestamp: "{{ .CommitTimestamp }}"
|
builder: go
|
||||||
goos:
|
gobinary: go
|
||||||
- linux
|
command: build
|
||||||
- darwin
|
|
||||||
goarch:
|
|
||||||
- amd64
|
|
||||||
- arm64
|
|
||||||
goamd64:
|
|
||||||
- v1
|
|
||||||
flags:
|
|
||||||
- -mod=readonly
|
|
||||||
- -trimpath
|
|
||||||
ldflags:
|
ldflags:
|
||||||
- -X github.com/cosmos/cosmos-sdk/version.Name=sonr
|
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}
|
||||||
- -X github.com/cosmos/cosmos-sdk/version.AppName=sonrd
|
|
||||||
- -X github.com/cosmos/cosmos-sdk/version.Version={{.Version}}
|
|
||||||
- -X github.com/cosmos/cosmos-sdk/version.Commit={{.Commit}}
|
|
||||||
- -X "github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger"
|
|
||||||
tags:
|
|
||||||
- netgo
|
|
||||||
- ledger
|
|
||||||
|
|
||||||
- id: hway
|
- id: motr
|
||||||
main: ./cmd/hway
|
goos: [linux, darwin]
|
||||||
binary: hway
|
goarch: [amd64, arm64]
|
||||||
goos:
|
main: ./cmd/motr
|
||||||
- linux
|
binary: motr
|
||||||
- darwin
|
builder: go
|
||||||
goarch:
|
gobinary: go
|
||||||
- amd64
|
command: build
|
||||||
- arm64
|
|
||||||
mod_timestamp: "{{ .CommitTimestamp }}"
|
|
||||||
flags:
|
|
||||||
- -mod=readonly
|
|
||||||
- -trimpath
|
|
||||||
goamd64:
|
|
||||||
- v1
|
|
||||||
tags:
|
|
||||||
- netgo
|
|
||||||
ldflags:
|
ldflags:
|
||||||
- -X main.version={{.Version}}
|
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}
|
||||||
- -X main.commit={{.Commit}}
|
|
||||||
- -X main.date={{.Date}}
|
- id: dwn
|
||||||
|
goos: [js]
|
||||||
|
goarch: [wasm]
|
||||||
|
main: ./cmd/dwn/dwn.go
|
||||||
|
binary: dwn
|
||||||
|
builder: go
|
||||||
|
gobinary: go
|
||||||
|
command: build
|
||||||
|
|
||||||
archives:
|
archives:
|
||||||
- id: sonr
|
- id: sonr
|
||||||
builds: [sonr]
|
builds: [sonr]
|
||||||
name_template: >-
|
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
|
||||||
sonr_{{ .Version }}_
|
|
||||||
{{- title .Os }}_{{- if eq .Arch "amd64" }}x86_64
|
|
||||||
{{- else if eq .Arch "386" }}i386
|
|
||||||
{{- else }}{{ .Arch }}{{ end }}
|
|
||||||
format: tar.gz
|
format: tar.gz
|
||||||
files:
|
files:
|
||||||
- src: README*
|
- src: README*
|
||||||
wrap_in_directory: true
|
- src: CHANGELOG*
|
||||||
|
|
||||||
- id: hway
|
- id: motr
|
||||||
builds: [hway]
|
builds: [motr]
|
||||||
name_template: >-
|
name_template: '{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
|
||||||
hway_{{ .Version }}_
|
|
||||||
{{- title .Os }}_{{- if eq .Arch "amd64" }}x86_64
|
|
||||||
{{- else if eq .Arch "386" }}i386
|
|
||||||
{{- else }}{{ .Arch }}{{ end }}
|
|
||||||
format: tar.gz
|
format: tar.gz
|
||||||
files:
|
files:
|
||||||
- src: README*
|
- src: README*
|
||||||
wrap_in_directory: true
|
- src: CHANGELOG*
|
||||||
|
|
||||||
nfpms:
|
release:
|
||||||
- id: hway
|
github:
|
||||||
package_name: hway
|
owner: onsonr
|
||||||
file_name_template: "{{ .ConventionalFileName }}"
|
name: sonr
|
||||||
builds: [hway]
|
name_template: '{{.Now.Format "2006.01.02"}}'
|
||||||
vendor: Sonr
|
draft: false
|
||||||
homepage: "https://onsonr.dev"
|
replace_existing_draft: true
|
||||||
maintainer: "Sonr <support@onsonr.dev>"
|
replace_existing_artifacts: true
|
||||||
description: "Sonr Highway is a decentralized, permissionless, and censorship-resistant identity network proxy."
|
extra_files:
|
||||||
license: "Apache 2.0"
|
- glob: ./CHANGELOG*
|
||||||
formats:
|
- glob: ./README*
|
||||||
- rpm
|
- glob: ./LICENSE*
|
||||||
- deb
|
- glob: ./pkl/*
|
||||||
- apk
|
|
||||||
dependencies:
|
|
||||||
- ipfs
|
|
||||||
contents:
|
|
||||||
- src: README*
|
|
||||||
dst: /usr/share/doc/hway
|
|
||||||
bindir: /usr/bin
|
|
||||||
section: net
|
|
||||||
priority: optional
|
|
||||||
# Add these lines to match build config
|
|
||||||
|
|
||||||
- id: sonr
|
|
||||||
package_name: sonrd
|
|
||||||
file_name_template: "{{ .ConventionalFileName }}"
|
|
||||||
builds: [sonr]
|
|
||||||
vendor: Sonr
|
|
||||||
homepage: "https://onsonr.dev"
|
|
||||||
maintainer: "Sonr <support@onsonr.dev>"
|
|
||||||
description: "Sonr is a decentralized, permissionless, and censorship-resistant identity network."
|
|
||||||
license: "Apache 2.0"
|
|
||||||
formats:
|
|
||||||
- rpm
|
|
||||||
- deb
|
|
||||||
- apk
|
|
||||||
dependencies:
|
|
||||||
- ipfs
|
|
||||||
contents:
|
|
||||||
- src: README*
|
|
||||||
dst: /usr/share/doc/sonrd
|
|
||||||
bindir: /usr/bin
|
|
||||||
section: net
|
|
||||||
priority: optional
|
|
||||||
# Add these lines to match build config
|
|
||||||
|
|
||||||
brews:
|
brews:
|
||||||
- name: hway
|
|
||||||
ids: [hway]
|
|
||||||
commit_author:
|
|
||||||
name: goreleaserbot
|
|
||||||
email: bot@goreleaser.com
|
|
||||||
directory: Formula
|
|
||||||
caveats: "Run a local hway node and access it with the hway proxy"
|
|
||||||
homepage: "https://onsonr.dev"
|
|
||||||
description: "Sonr is a decentralized, permissionless, and censorship-resistant identity network."
|
|
||||||
dependencies:
|
|
||||||
- name: ipfs
|
|
||||||
repository:
|
|
||||||
owner: onsonr
|
|
||||||
name: homebrew-tap
|
|
||||||
branch: master
|
|
||||||
token: "{{ .Env.GITHUB_PERSONAL_AUTH_TOKEN }}"
|
|
||||||
|
|
||||||
- name: sonr
|
- name: sonr
|
||||||
ids: [sonr]
|
ids: [sonr]
|
||||||
commit_author:
|
commit_author:
|
||||||
name: goreleaserbot
|
name: goreleaserbot
|
||||||
email: bot@goreleaser.com
|
email: bot@goreleaser.com
|
||||||
directory: Formula
|
directory: Formula
|
||||||
caveats: "Run a local sonr node and access it with the hway proxy"
|
caveats: "Run a local sonr node and access it with the motr proxy"
|
||||||
homepage: "https://onsonr.dev"
|
homepage: "https://sonr.io/"
|
||||||
description: "Sonr is a decentralized, permissionless, and censorship-resistant identity network."
|
description: "Sonr is a decentralized, permissionless, and censorship-resistant identity network."
|
||||||
dependencies:
|
dependencies:
|
||||||
- name: ipfs
|
- name: ipfs
|
||||||
@@ -164,18 +83,59 @@ brews:
|
|||||||
branch: master
|
branch: master
|
||||||
token: "{{ .Env.GITHUB_PERSONAL_AUTH_TOKEN }}"
|
token: "{{ .Env.GITHUB_PERSONAL_AUTH_TOKEN }}"
|
||||||
|
|
||||||
release:
|
- name: motr
|
||||||
github:
|
ids: [motr]
|
||||||
|
commit_author:
|
||||||
|
name: goreleaserbot
|
||||||
|
email: bot@goreleaser.com
|
||||||
|
directory: Formula
|
||||||
|
caveats: "Use motr to interact with the Sonr network"
|
||||||
|
homepage: "https://sonr.io/"
|
||||||
|
description: "Motr is a proxy for interacting with the Sonr network."
|
||||||
|
dependencies:
|
||||||
|
- name: ipfs
|
||||||
|
repository:
|
||||||
owner: onsonr
|
owner: onsonr
|
||||||
name: sonr
|
name: homebrew-tap
|
||||||
name_template: "Release {{.Version}}"
|
branch: master
|
||||||
draft: false
|
|
||||||
replace_existing_draft: true
|
# .goreleaser.yaml
|
||||||
replace_existing_artifacts: true
|
dockers:
|
||||||
extra_files:
|
- # Sonr Binary
|
||||||
- glob: ./README*
|
id: sonrd
|
||||||
|
goos: linux
|
||||||
|
goarch: amd64
|
||||||
|
ids:
|
||||||
|
- sonr
|
||||||
|
image_templates:
|
||||||
|
- "onsonr/sonrd:latest"
|
||||||
|
- "onsonr/sonrd:{{ .Tag }}"
|
||||||
|
dockerfile: "./deploy/release/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: motr
|
||||||
|
goos: linux
|
||||||
|
goarch: amd64
|
||||||
|
ids:
|
||||||
|
- motr
|
||||||
|
image_templates:
|
||||||
|
- "onsonr/motr:latest"
|
||||||
|
- "onsonr/motr:{{ .Tag }}"
|
||||||
|
dockerfile: "./deploy/release/motr.Dockerfile"
|
||||||
|
build_flag_templates:
|
||||||
|
- "--label=org.opencontainers.image.created={{.Date}}"
|
||||||
|
- "--label=org.opencontainers.image.title=motr"
|
||||||
|
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
|
||||||
|
- "--label=org.opencontainers.image.version={{.Version}}"
|
||||||
|
|
||||||
announce:
|
announce:
|
||||||
telegram:
|
telegram:
|
||||||
enabled: true
|
enabled: true
|
||||||
chat_id: -1002222617755
|
chat_id: -1002222617755
|
||||||
|
message_template: 'New Sonr Release {{.Tag}} is out{{ mdv2escape "!" }}'
|
||||||
|
parse_mode: HTML
|
||||||
|
|||||||
@@ -1,30 +0,0 @@
|
|||||||
version: "3"
|
|
||||||
|
|
||||||
vars:
|
|
||||||
GOPATH:
|
|
||||||
sh: go env GOPATH
|
|
||||||
BIN_DIR: "{{.GOPATH}}/bin"
|
|
||||||
BINARY: "{{.BIN_DIR}}/hway"
|
|
||||||
OS:
|
|
||||||
sh: uname -s
|
|
||||||
ARCH:
|
|
||||||
sh: uname -m
|
|
||||||
|
|
||||||
tasks:
|
|
||||||
build:
|
|
||||||
desc: Build the hway binary
|
|
||||||
silent: true
|
|
||||||
cmds:
|
|
||||||
- gum spin --spinner dot --title "Build Hway Single Target ({{.OS}}/{{.ARCH}})..." -- goreleaser build --snapshot --clean --single-target --id hway -o {{.BIN_DIR}}/hway
|
|
||||||
|
|
||||||
install:
|
|
||||||
desc: Install the hway binary
|
|
||||||
silent: true
|
|
||||||
cmds:
|
|
||||||
- gum spin --spinner dot --title "Install Hway Single Target ({{.OS}}/{{.ARCH}})..." -- make install-hway
|
|
||||||
|
|
||||||
start:
|
|
||||||
desc: Start the hway daemon
|
|
||||||
silent: true
|
|
||||||
cmds:
|
|
||||||
- "{{.BINARY}}"
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
version: "3"
|
|
||||||
|
|
||||||
vars:
|
|
||||||
ROOT:
|
|
||||||
sh: git rev-parse --show-toplevel
|
|
||||||
tasks:
|
|
||||||
init:
|
|
||||||
desc: Setup ipfs with Cloudflare
|
|
||||||
silent: true
|
|
||||||
vars:
|
|
||||||
PEERS: |
|
|
||||||
'[
|
|
||||||
{"ID": "QmcFf2FH3CEgTNHeMRGhN7HNHU1EXAxoEk6EFuSyXCsvRE", "Addrs": ["/dnsaddr/node-1.ingress.cloudflare-ipfs.com"]},
|
|
||||||
{"ID": "QmcFmLd5ySfk2WZuJ1mfSWLDjdmHZq7rSAua4GoeSQfs1z", "Addrs": ["/dnsaddr/node-2.ingress.cloudflare-ipfs.com"]},
|
|
||||||
{"ID": "QmcfFmzSDVbwexQ9Au2pt5YEXHK5xajwgaU6PpkbLWerMa", "Addrs": ["/dnsaddr/node-3.ingress.cloudflare-ipfs.com"]},
|
|
||||||
{"ID": "QmcfJeB3Js1FG7T8YaZATEiaHqNKVdQfybYYkbT1knUswx", "Addrs": ["/dnsaddr/node-4.ingress.cloudflare-ipfs.com"]},
|
|
||||||
{"ID": "QmcfVvzK4tMdFmpJjEKDUoqRgP4W9FnmJoziYX5GXJJ8eZ", "Addrs": ["/dnsaddr/node-5.ingress.cloudflare-ipfs.com"]},
|
|
||||||
{"ID": "QmcfZD3VKrUxyP9BbyUnZDpbqDnT7cQ4WjPP8TRLXaoE7G", "Addrs": ["/dnsaddr/node-6.ingress.cloudflare-ipfs.com"]},
|
|
||||||
{"ID": "QmcfZP2LuW4jxviTeG8fi28qjnZScACb8PEgHAc17ZEri3", "Addrs": ["/dnsaddr/node-7.ingress.cloudflare-ipfs.com"]},
|
|
||||||
{"ID": "QmcfgsJsMtx6qJb74akCw1M24X1zFwgGo11h1cuhwQjtJP", "Addrs": ["/dnsaddr/node-8.ingress.cloudflare-ipfs.com"]},
|
|
||||||
{"ID": "Qmcfr2FC7pFzJbTSDfYaSy1J8Uuy8ccGLeLyqJCKJvTHMi", "Addrs": ["/dnsaddr/node-9.ingress.cloudflare-ipfs.com"]},
|
|
||||||
{"ID": "QmcfR3V5YAtHBzxVACWCzXTt26SyEkxdwhGJ6875A8BuWx", "Addrs": ["/dnsaddr/node-10.ingress.cloudflare-ipfs.com"]},
|
|
||||||
{"ID": "Qmcfuo1TM9uUiJp6dTbm915Rf1aTqm3a3dnmCdDQLHgvL5", "Addrs": ["/dnsaddr/node-11.ingress.cloudflare-ipfs.com"]},
|
|
||||||
{"ID": "QmcfV2sg9zaq7UUHVCGuSvT2M2rnLBAPsiE79vVyK3Cuev", "Addrs": ["/dnsaddr/node-12.ingress.cloudflare-ipfs.com"]}
|
|
||||||
]'
|
|
||||||
cmds:
|
|
||||||
- rm -rf ~/.ipfs
|
|
||||||
- ipfs init
|
|
||||||
- ipfs config --json Peering.Peers {{.PEERS}}
|
|
||||||
- ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["*"]'
|
|
||||||
|
|
||||||
mount:
|
|
||||||
desc: Mount the ipfs,ipns directories
|
|
||||||
silent: true
|
|
||||||
platforms:
|
|
||||||
- linux
|
|
||||||
cmds:
|
|
||||||
- ipfs config --json Mounts.FuseAllowOther true
|
|
||||||
|
|
||||||
start:
|
|
||||||
desc: Start the ipfs daemon
|
|
||||||
silent: true
|
|
||||||
cmds:
|
|
||||||
- cmd: ipfs daemon --migrate
|
|
||||||
platforms:
|
|
||||||
- darwin
|
|
||||||
- task: mount
|
|
||||||
- cmd: ipfs daemon --mount
|
|
||||||
platforms:
|
|
||||||
- linux
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
version: "3"
|
|
||||||
|
|
||||||
vars:
|
|
||||||
GOPATH:
|
|
||||||
sh: go env GOPATH
|
|
||||||
BIN_DIR: "{{.GOPATH}}/bin"
|
|
||||||
OS:
|
|
||||||
sh: uname -s
|
|
||||||
ARCH:
|
|
||||||
sh: uname -m
|
|
||||||
|
|
||||||
tasks:
|
|
||||||
init:
|
|
||||||
desc: Initialize postgresql
|
|
||||||
silent: true
|
|
||||||
dir: deploy/apps/chainindex
|
|
||||||
cmds:
|
|
||||||
- cmd: sudo -u postgres psql -f seed.sql
|
|
||||||
platforms:
|
|
||||||
- linux
|
|
||||||
- cmd: sudo -u postgres psql -d chainindex -f schema.sql
|
|
||||||
platforms:
|
|
||||||
- linux
|
|
||||||
|
|
||||||
reset:
|
|
||||||
desc: Reset postgresql
|
|
||||||
silent: true
|
|
||||||
dir: deploy/apps/chainindex
|
|
||||||
cmds:
|
|
||||||
- cmd: sudo -u postgres psql -d chainindex -f reset.sql
|
|
||||||
platforms:
|
|
||||||
- linux
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
version: "3"
|
|
||||||
|
|
||||||
vars:
|
|
||||||
BINARY: sonrd
|
|
||||||
BUILD_FLAGS: -mod=readonly -trimpath
|
|
||||||
BUILD_TAGS: netgo,ledger
|
|
||||||
COMMIT:
|
|
||||||
sh: git rev-parse HEAD
|
|
||||||
VERSION:
|
|
||||||
sh: git describe --tags --always
|
|
||||||
tasks:
|
|
||||||
build:
|
|
||||||
desc: Build the sonrd binary
|
|
||||||
cmds:
|
|
||||||
- >
|
|
||||||
go build
|
|
||||||
{{.BUILD_FLAGS}}
|
|
||||||
-tags "{{.BUILD_TAGS}}"
|
|
||||||
-ldflags "
|
|
||||||
-X github.com/cosmos/cosmos-sdk/version.Name=sonr
|
|
||||||
-X github.com/cosmos/cosmos-sdk/version.AppName=sonrd
|
|
||||||
-X github.com/cosmos/cosmos-sdk/version.Version={{.VERSION}}
|
|
||||||
-X github.com/cosmos/cosmos-sdk/version.Commit={{.COMMIT}}
|
|
||||||
-X github.com/cosmos/cosmos-sdk/version.BuildTags={{.BUILD_TAGS}}
|
|
||||||
"
|
|
||||||
-o ./build/{{.BINARY}}
|
|
||||||
./cmd/sonrd
|
|
||||||
env:
|
|
||||||
CGO_ENABLED: 1
|
|
||||||
GOARCH:
|
|
||||||
sh: go env GOARCH
|
|
||||||
GOOS:
|
|
||||||
sh: go env GOOS
|
|
||||||
|
|
||||||
install:
|
|
||||||
desc: Install sonrd
|
|
||||||
silent: true
|
|
||||||
cmds:
|
|
||||||
- gum spin --spinner dot --title "Installing sonr daemon..." -- make install
|
|
||||||
|
|
||||||
start:
|
|
||||||
desc: Start the sonr node
|
|
||||||
cmds:
|
|
||||||
- sh scripts/test_dop_node.sh
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
version: "3"
|
|
||||||
|
|
||||||
vars:
|
|
||||||
ROOT:
|
|
||||||
sh: git rev-parse --show-toplevel
|
|
||||||
|
|
||||||
tasks:
|
|
||||||
init:
|
|
||||||
desc: Configure synapse homeserver with PKL
|
|
||||||
silent: true
|
|
||||||
cmds:
|
|
||||||
- pkl eval pkl/matrix.net/Homeserver.pkl -f yaml -o deploy/conf/synapse/homeserver.yaml
|
|
||||||
env:
|
|
||||||
MATRIX_CLIENT_NAME: sonr.id
|
|
||||||
MATRIX_SERVER_NAME: sonr.id
|
|
||||||
MATRIX_SERVER_URL: http://localhost:8008
|
|
||||||
MATRIX_SLIDING_SYNC_PROXY: http://localhost:8008
|
|
||||||
MATRIX_PSQL_CONN: postgresql://matrixhs_user:matrixhs_password123@localhost:5432/sonr
|
|
||||||
MATRIX_REGISTRATION_SHARED_SECRET: secret
|
|
||||||
MATRIX_ENABLE_RECATCHA: false
|
|
||||||
MATRIX_RECATCHA_PUBLIC_KEY: ""
|
|
||||||
MATRIX_RECATCHA_PRIVATE_KEY: ""
|
|
||||||
MATRIX_RECATCHA_BYPASS_SECRET: ""
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
version: "3"
|
|
||||||
|
|
||||||
vars:
|
|
||||||
ROOT:
|
|
||||||
sh: git rev-parse --show-toplevel
|
|
||||||
|
|
||||||
tasks:
|
|
||||||
init:
|
|
||||||
desc: Configure tigerbeetle database
|
|
||||||
silent: true
|
|
||||||
cmds:
|
|
||||||
- pkl eval pkl/matrix.net/Homeserver.pkl -f yaml -o deploy/conf/synapse/homeserver.yaml
|
|
||||||
+221
@@ -0,0 +1,221 @@
|
|||||||
|
## 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
|
||||||
|
|
||||||
|
- Implement session management
|
||||||
|
- allow manual release triggers
|
||||||
|
- add Input and RegistrationForm models
|
||||||
|
- add new utility classes
|
||||||
|
- add login and registration pages
|
||||||
|
- add tailwindcss utilities
|
||||||
|
- add support for ARM64 architecture
|
||||||
|
- add DWN resolver field
|
||||||
|
- add stats section to homepage
|
||||||
|
- implement hero section using Pkl
|
||||||
|
- add PKL schema for message formats
|
||||||
|
- add Homebrew tap for sonr
|
||||||
|
- update release workflow to use latest tag
|
||||||
|
|
||||||
|
### Fix
|
||||||
|
|
||||||
|
- **version**: update version number to 0.4.0
|
||||||
|
- update release workflow to use latest tag
|
||||||
|
- **versioning**: revert version to 0.9.0
|
||||||
|
- **cta**: Fix typo in CTA title
|
||||||
|
- change bento section title to reflect security focus
|
||||||
|
- adjust hero image dimensions
|
||||||
|
- **Input**: Change type from to
|
||||||
|
- update hero image height in config.pkl
|
||||||
|
|
||||||
|
### Refactor
|
||||||
|
|
||||||
|
- move home page sections to home package
|
||||||
|
- rename motrd to motr
|
||||||
|
- update hero image dimensions
|
||||||
|
- move nebula configuration to static file
|
||||||
|
- rename buf-publish.yml to publish-assets.yml
|
||||||
|
- remove unused field from
|
||||||
|
|
||||||
|
## v0.4.0 (2024-09-30)
|
||||||
|
|
||||||
|
### Feat
|
||||||
|
|
||||||
|
- **dwn**: add wasm build for dwn
|
||||||
|
- add macaroon and oracle genesis states
|
||||||
|
- add scheduled binary release workflow
|
||||||
|
- introduce process-compose for process management
|
||||||
|
- add counter animation to hero section
|
||||||
|
- add registration page
|
||||||
|
|
||||||
|
### Fix
|
||||||
|
|
||||||
|
- Enable scheduled release workflow
|
||||||
|
|
||||||
|
### Refactor
|
||||||
|
|
||||||
|
- remove old changelog entries
|
||||||
|
- remove unnecessary checkout in scheduled-release workflow
|
||||||
|
- rename build ID to sonr
|
||||||
|
- remove unnecessary release existence check
|
||||||
|
- move dwn wasm build to pkg directory
|
||||||
|
|
||||||
|
## v0.3.1 (2024-09-29)
|
||||||
|
|
||||||
|
### Refactor
|
||||||
|
|
||||||
|
- move nebula/pages to pkg/nebula/pages
|
||||||
|
|
||||||
|
## v0.3.0 (2024-09-29)
|
||||||
|
|
||||||
|
### Feat
|
||||||
|
|
||||||
|
- add buf.lock for proto definitions
|
||||||
|
|
||||||
|
### Fix
|
||||||
|
|
||||||
|
- remove unused linting rules
|
||||||
|
- update proto breaking check target to master branch
|
||||||
|
|
||||||
|
### Refactor
|
||||||
|
|
||||||
|
- remove unused lock files and configurations
|
||||||
|
|
||||||
|
## v0.2.0 (2024-09-29)
|
||||||
|
|
||||||
|
### Feat
|
||||||
|
|
||||||
|
- disable goreleaser workflow
|
||||||
|
- update workflows to include master branch
|
||||||
|
- remove global style declaration
|
||||||
|
- **oracle**: add oracle module
|
||||||
|
- optimize IPFS configuration for better performance
|
||||||
|
- add local IPFS bootstrap script and refactor devbox config
|
||||||
|
- add AllocateVault HTTP endpoint
|
||||||
|
- add WebAuthn credential management functionality
|
||||||
|
- remove unused coins interface
|
||||||
|
- remove global integrity proof from genesis state
|
||||||
|
- add vault module
|
||||||
|
- enable buf.build publishing on master and develop branches
|
||||||
|
- add Gitflow workflow for syncing branches
|
||||||
|
- add automated production release workflow
|
||||||
|
- **ui**: implement profile page
|
||||||
|
- add automated production release workflow
|
||||||
|
- **did**: remove unused proto files
|
||||||
|
- add enums.pulsar.go file for PermissionScope enum (#4)
|
||||||
|
- add initial DID implementation
|
||||||
|
- remove builder interface
|
||||||
|
- add basic UI for block explorer
|
||||||
|
- add Usage: pkl [OPTIONS] COMMAND [ARGS]...
|
||||||
|
- use SQLite embedded driver
|
||||||
|
- add DID method for each coin
|
||||||
|
- Expand KeyType enum and update KeyInfo message in genesis.proto
|
||||||
|
- Add whitelisted key types to genesis params
|
||||||
|
- Add DID grants protobuf definition
|
||||||
|
- Add fields to KeyInfo struct to distinguish CBOR and standard blockchain key types
|
||||||
|
- Add new message types for AssetInfo, ChainInfo, Endpoint, ExplorerInfo, FeeInfo, and KeyInfo
|
||||||
|
- run sonr-node container in testnet network and make network external
|
||||||
|
- Add docker-compose.yaml file to start a Sonr testnet node
|
||||||
|
- configure Sonr testnet environment
|
||||||
|
- Update Dockerfile to start and run a testnet
|
||||||
|
- add Equal methods for AssetInfo and ChainInfo types
|
||||||
|
- Add ProveWitness and SyncVault RPCs
|
||||||
|
- Add MsgRegisterService to handle service registration
|
||||||
|
- Add MsgRegisterService to handle service registration
|
||||||
|
- add enums.pulsar.go file for PermissionScope enum
|
||||||
|
|
||||||
|
### Fix
|
||||||
|
|
||||||
|
- ensure go version is up-to-date
|
||||||
|
- use GITHUB_TOKEN for version bump workflow
|
||||||
|
- update account table interface to use address, chain and network
|
||||||
|
- **ci**: update docker vm release workflow with new token
|
||||||
|
- use mnemonic phrases for test account keys
|
||||||
|
- reduce motr proxy shutdown timeout
|
||||||
|
- **nebula**: use bunx for tailwindcss build
|
||||||
|
- **proto**: update protobuf message index numbers
|
||||||
|
- **ante**: reduce POA rate floor and ceiling
|
||||||
|
- Update proc_list_width in mprocs.yaml
|
||||||
|
- Add service to database when registering
|
||||||
|
- pin added did documents to local ipfs node
|
||||||
|
- remove extra spaces in typeUrl
|
||||||
|
- **release**: remove unnecessary quotes in tag pattern
|
||||||
|
- remove unused imports and simplify KeyInfo message
|
||||||
|
- bind node ports to localhost
|
||||||
|
- Update docker-compose network name to dokploy-network
|
||||||
|
- Update network name to dokploy
|
||||||
|
- remove unused port mapping
|
||||||
|
- Update docker-compose.yaml to use correct volume path
|
||||||
|
- update docker-compose volume name
|
||||||
|
- Update docker-compose.yaml to use shell directly for sonrd command
|
||||||
|
- replace "sh" with "/bin/sh" in docker-compose.yaml command
|
||||||
|
- Update runner image dependencies for debian-11
|
||||||
|
- **deps**: update golang image to 1.21
|
||||||
|
- **chains**: update nomic chain build target
|
||||||
|
- Remove unused `Meta` message from `genesis.proto`
|
||||||
|
- Add ProveWitness and SyncVault RPCs
|
||||||
|
|
||||||
|
### Refactor
|
||||||
|
|
||||||
|
- adjust source directory for config files (#1102)
|
||||||
|
- Use actions/checkout@v4
|
||||||
|
- remove unused master branch from CI workflow
|
||||||
|
- rename github token secret
|
||||||
|
- remove unnecessary x-cloak styles
|
||||||
|
- optimize oracle genesis proto
|
||||||
|
- remove unused code related to whitelisted assets
|
||||||
|
- update buf publish source directory
|
||||||
|
- adjust devbox configuration to reflect nebula changes
|
||||||
|
- rename msg_server.go to rpc.go
|
||||||
|
- remove devbox integration
|
||||||
|
- move dwn package to app/config
|
||||||
|
- move configuration files to app directory
|
||||||
|
- extract root command creation to separate file
|
||||||
|
- move ipfs setup to function
|
||||||
|
- remove unnecessary proxy config
|
||||||
|
- rename script to
|
||||||
|
- move DWN proxy server logic to separate file
|
||||||
|
- use htmx instead of dwn for vault client
|
||||||
|
- remove unused environment variables
|
||||||
|
- simplify verification method structure
|
||||||
|
- use staking keeper in DID keeper
|
||||||
|
- remove unused dependencies
|
||||||
|
- remove unused image building workflow
|
||||||
|
- add field to
|
||||||
|
- Update KeyKind Enum to have proper naming conventions
|
||||||
|
- Update `DIDNamespace` to have proper naming convention
|
||||||
|
- expose ports directly in docker-compose
|
||||||
|
- remove unused port mappings
|
||||||
|
- streamline script execution
|
||||||
|
- use CMD instead of ENTRYPOINT in Dockerfile
|
||||||
|
- **deps**: Upgrade Debian base image to 11
|
||||||
|
- Simplify the types and properties to keep a consistent structure for the blockchain
|
||||||
|
- remove PERMISSION_SCOPE_IDENTIFIERS_ENS enum value
|
||||||
+37
@@ -1,3 +1,40 @@
|
|||||||
|
FROM jetpackio/devbox:latest AS sonrvm
|
||||||
|
|
||||||
|
# Installing your devbox project
|
||||||
|
WORKDIR /code
|
||||||
|
USER root:root
|
||||||
|
|
||||||
|
RUN mkdir -p /code && chown ${DEVBOX_USER}:${DEVBOX_USER} /code
|
||||||
|
|
||||||
|
USER ${DEVBOX_USER}:${DEVBOX_USER}
|
||||||
|
|
||||||
|
COPY --chown=${DEVBOX_USER}:${DEVBOX_USER} devbox.json devbox.json
|
||||||
|
COPY --chown=${DEVBOX_USER}:${DEVBOX_USER} process-compose.yaml process-compose.yaml
|
||||||
|
|
||||||
|
RUN devbox run -- echo "Installed Packages."
|
||||||
|
|
||||||
|
ENTRYPOINT ["devbox", "run"]
|
||||||
|
|
||||||
|
# --------------------------------------------------------
|
||||||
|
FROM jetpackio/devbox:latest AS sonr-runner
|
||||||
|
|
||||||
|
WORKDIR /code
|
||||||
|
USER root:root
|
||||||
|
|
||||||
|
RUN mkdir -p /code && chown ${DEVBOX_USER}:${DEVBOX_USER} /code
|
||||||
|
|
||||||
|
USER ${DEVBOX_USER}:${DEVBOX_USER}
|
||||||
|
|
||||||
|
COPY --chown=${DEVBOX_USER}:${DEVBOX_USER} devbox.json devbox.json
|
||||||
|
COPY --chown=${DEVBOX_USER}:${DEVBOX_USER} process-compose.yaml process-compose.yaml
|
||||||
|
COPY --chown=${DEVBOX_USER}:${DEVBOX_USER} . .
|
||||||
|
|
||||||
|
RUN devbox run -- echo "Installed Packages."
|
||||||
|
|
||||||
|
RUN git config --global --add safe.directory /code
|
||||||
|
ENTRYPOINT ["devbox", "run", "testnet"]
|
||||||
|
|
||||||
|
# --------------------------------------------------------
|
||||||
FROM golang:1.22-alpine AS go-builder
|
FROM golang:1.22-alpine AS go-builder
|
||||||
|
|
||||||
SHELL ["/bin/sh", "-ecuxo", "pipefail"]
|
SHELL ["/bin/sh", "-ecuxo", "pipefail"]
|
||||||
|
|||||||
@@ -8,14 +8,9 @@ SDK_PACK := $(shell go list -m github.com/cosmos/cosmos-sdk | sed 's/ /\@/g')
|
|||||||
BINDIR ?= $(GOPATH)/bin
|
BINDIR ?= $(GOPATH)/bin
|
||||||
SIMAPP = ./app
|
SIMAPP = ./app
|
||||||
|
|
||||||
PC_PORT_NUM=42069
|
|
||||||
PC_LOG_FILE=./sonr.log
|
|
||||||
PC_SOCKET_PATH=/tmp/sonr-net.sock
|
|
||||||
|
|
||||||
# for dockerized protobuf tools
|
# for dockerized protobuf tools
|
||||||
DOCKER := $(shell which docker)
|
DOCKER := $(shell which docker)
|
||||||
HTTPS_GIT := github.com/onsonr/sonr.git
|
HTTPS_GIT := github.com/onsonr/sonr.git
|
||||||
PROCESS_COMPOSE := $(shell which process-compose)
|
|
||||||
|
|
||||||
export GO111MODULE = on
|
export GO111MODULE = on
|
||||||
|
|
||||||
@@ -87,12 +82,6 @@ else
|
|||||||
go build -mod=readonly $(BUILD_FLAGS) -o build/sonrd ./cmd/sonrd
|
go build -mod=readonly $(BUILD_FLAGS) -o build/sonrd ./cmd/sonrd
|
||||||
endif
|
endif
|
||||||
|
|
||||||
build-motr: go.sum
|
|
||||||
GOOS=js GOARCH=wasm go build -o static/wasm/app.wasm ./cmd/motr/main.go
|
|
||||||
|
|
||||||
build-hway: go.sum
|
|
||||||
go build -o build/hway ./cmd/hway
|
|
||||||
|
|
||||||
build-windows-client: go.sum
|
build-windows-client: go.sum
|
||||||
GOOS=windows GOARCH=amd64 go build -mod=readonly $(BUILD_FLAGS) -o build/sonrd.exe ./cmd/sonrd
|
GOOS=windows GOARCH=amd64 go build -mod=readonly $(BUILD_FLAGS) -o build/sonrd.exe ./cmd/sonrd
|
||||||
|
|
||||||
@@ -105,9 +94,7 @@ endif
|
|||||||
|
|
||||||
install: go.sum
|
install: go.sum
|
||||||
go install -mod=readonly $(BUILD_FLAGS) ./cmd/sonrd
|
go install -mod=readonly $(BUILD_FLAGS) ./cmd/sonrd
|
||||||
|
go install -mod=readonly $(BUILD_FLAGS) ./cmd/motr
|
||||||
install-hway: go.sum
|
|
||||||
go install -mod=readonly ./cmd/hway
|
|
||||||
|
|
||||||
########################################
|
########################################
|
||||||
### Tools & dependencies
|
### Tools & dependencies
|
||||||
@@ -126,20 +113,11 @@ draw-deps:
|
|||||||
@goviz -i ./cmd/sonrd -d 2 | dot -Tpng -o dependency-graph.png
|
@goviz -i ./cmd/sonrd -d 2 | dot -Tpng -o dependency-graph.png
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf .aider*
|
|
||||||
rm -rf static
|
|
||||||
rm -rf .out
|
|
||||||
rm -rf hway.db
|
|
||||||
rm -rf snapcraft-local.yaml build/
|
rm -rf snapcraft-local.yaml build/
|
||||||
rm -rf build
|
|
||||||
|
|
||||||
distclean: clean
|
distclean: clean
|
||||||
rm -rf vendor/
|
rm -rf vendor/
|
||||||
|
|
||||||
init-env:
|
|
||||||
@echo "Installing process-compose"
|
|
||||||
sh scripts/init_env.sh
|
|
||||||
|
|
||||||
########################################
|
########################################
|
||||||
### Testing
|
### Testing
|
||||||
|
|
||||||
@@ -193,6 +171,7 @@ format: format-tools
|
|||||||
|
|
||||||
mod-tidy:
|
mod-tidy:
|
||||||
go mod tidy
|
go mod tidy
|
||||||
|
cd interchaintest && go mod tidy
|
||||||
|
|
||||||
.PHONY: format-tools lint format mod-tidy
|
.PHONY: format-tools lint format mod-tidy
|
||||||
|
|
||||||
@@ -200,14 +179,17 @@ mod-tidy:
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
### Protobuf ###
|
### Protobuf ###
|
||||||
###############################################################################
|
###############################################################################
|
||||||
protoVer=0.15.1
|
protoVer=0.13.2
|
||||||
protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer)
|
protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer)
|
||||||
protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName)
|
protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName)
|
||||||
|
|
||||||
|
proto-all: proto-format proto-lint proto-gen format
|
||||||
|
|
||||||
proto-gen:
|
proto-gen:
|
||||||
@echo "Generating Protobuf files"
|
@echo "Generating Protobuf files"
|
||||||
@go install cosmossdk.io/orm/cmd/protoc-gen-go-cosmos-orm@latest
|
@go install cosmossdk.io/orm/cmd/protoc-gen-go-cosmos-orm@latest
|
||||||
@$(protoImage) sh ./scripts/protocgen.sh
|
@$(protoImage) sh ./scripts/protocgen.sh
|
||||||
|
# generate the stubs for the proto files from the proto directory
|
||||||
spawn stub-gen
|
spawn stub-gen
|
||||||
|
|
||||||
proto-format:
|
proto-format:
|
||||||
@@ -283,9 +265,6 @@ ictest-tokenfactory:
|
|||||||
### testnet ###
|
### testnet ###
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
setup-ipfs:
|
|
||||||
./scripts/ipfs_config.sh
|
|
||||||
|
|
||||||
setup-testnet: mod-tidy is-localic-installed install local-image set-testnet-configs setup-testnet-keys
|
setup-testnet: mod-tidy is-localic-installed install local-image set-testnet-configs setup-testnet-keys
|
||||||
|
|
||||||
# Run this before testnet keys are added
|
# Run this before testnet keys are added
|
||||||
@@ -310,12 +289,51 @@ testnet-basic: setup-testnet
|
|||||||
sh-testnet: mod-tidy
|
sh-testnet: mod-tidy
|
||||||
CHAIN_ID="sonr-testnet-1" BLOCK_TIME="1000ms" CLEAN=true sh scripts/test_node.sh
|
CHAIN_ID="sonr-testnet-1" BLOCK_TIME="1000ms" CLEAN=true sh scripts/test_node.sh
|
||||||
|
|
||||||
.PHONY: setup-testnet set-testnet-configs testnet testnet-basic sh-testnet dop-testnet
|
.PHONY: setup-testnet set-testnet-configs testnet testnet-basic sh-testnet
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
### templ & vault ###
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
.PHONY: dwn motr templ pkl nebula
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
templ:
|
||||||
|
@echo "(templ) Generating templ files"
|
||||||
|
go install github.com/a-h/templ/cmd/templ@latest
|
||||||
|
templ generate
|
||||||
|
|
||||||
|
nebula:
|
||||||
|
@echo "(nebula) Building nebula"
|
||||||
|
cd pkg/nebula && bun run build
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
start-caddy:
|
||||||
|
@echo "(start-caddy) Starting caddy"
|
||||||
|
./build/caddy run --config ./config/caddy/Caddyfile
|
||||||
|
|
||||||
|
start-motr: motr
|
||||||
|
@echo "(start-proxy) Starting proxy server"
|
||||||
|
./build/motr start
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
### help ###
|
### help ###
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
|
||||||
help:
|
help:
|
||||||
@echo "Usage: make <target>"
|
@echo "Usage: make <target>"
|
||||||
@echo ""
|
@echo ""
|
||||||
@@ -327,5 +345,7 @@ help:
|
|||||||
@echo " sh-testnet : Shell local devnet"
|
@echo " sh-testnet : Shell local devnet"
|
||||||
@echo " ictest-basic : Basic end-to-end test"
|
@echo " ictest-basic : Basic end-to-end test"
|
||||||
@echo " ictest-ibc : IBC end-to-end test"
|
@echo " ictest-ibc : IBC end-to-end test"
|
||||||
|
@echo " templ : Generate templ files"
|
||||||
|
@echo " vault : Build vault.wasm"
|
||||||
|
|
||||||
.PHONY: help
|
.PHONY: help
|
||||||
|
|||||||
@@ -1,29 +1,39 @@
|
|||||||
|
<div align="center" style="text-align: center;">
|
||||||
|
|
||||||
# `sonr` - Sonr Chain
|
# `sonr` - Sonr Chain
|
||||||
|
|
||||||
[](https://pkg.go.dev/github.com/onsonr/sonr)
|
[](https://pkg.go.dev/github.com/onsonr/sonr)
|
||||||

|

|
||||||

|

|
||||||
[](https://sonr.io)
|
[](https://sonr.io)
|
||||||
|
|
||||||
[](https://goreportcard.com/report/github.com/onsonr/sonr)
|
[](https://goreportcard.com/report/github.com/onsonr/sonr)
|
||||||
[](https://sonarcloud.io/summary/new_code?id=sonr-io_sonr)
|
[](https://sonarcloud.io/summary/new_code?id=sonr-io_sonr)
|
||||||
|
|
||||||
> Sonr is a combination of decentralized primitives. Fundamentally, it is a peer-to-peer identity and asset management system that leverages DID documents, Webauthn, and IPFS—providing users with a secure, portable decentralized identity.
|
</div>
|
||||||
|
<br />
|
||||||
|
|
||||||
# Documentation
|
Sonr is a combination of decentralized primitives. Fundamentally, it is a peer-to-peer identity and asset management system that leverages DID documents, Webauthn, and IPFS—providing users with a secure, portable decentralized identity.
|
||||||
|
|
||||||
1. [Quick Start](https://github.com/onsonr/sonr/wiki/1-%E2%80%90-Quick-Start)
|
<br />
|
||||||
2. [Chain Modules](https://github.com/onsonr/sonr/wiki/2-%E2%80%90-Chain-Modules)
|
|
||||||
3. [System Architecture](https://github.com/onsonr/sonr/wiki/3-%E2%80%90-System-Architecture)
|
|
||||||
4. [Token Economy](https://github.com/onsonr/sonr/wiki/4-%E2%80%90-Token-Economy)
|
|
||||||
5. [Service Mangement](https://github.com/onsonr/sonr/wiki/5-%E2%80%90-Service-Management)
|
|
||||||
6. [Design System](https://github.com/onsonr/sonr/wiki/6-%E2%80%90-Design-System)
|
|
||||||
7. [Self Custody](https://github.com/onsonr/sonr/wiki/7-%E2%80%90-Self-Custody)
|
|
||||||
|
|
||||||
# Stats
|
## Components
|
||||||
|
|
||||||

|
### `sonrd`
|
||||||
|
|
||||||
# Acknowledgements
|
The main blockchain node that runs the `sonr` chain. It is responsible for maintaining the state of the chain, including IPFS based vaults, and did documents.
|
||||||
|
|
||||||
|
### `vault`
|
||||||
|
|
||||||
|
The `vault` is a wasm module that is compiled and deployed to IPFS on behalf of the user. It is responsible for storing and retrieving encrypted data.
|
||||||
|
|
||||||
|
- SQLite Database backend
|
||||||
|
- Encryption via admonition
|
||||||
|
- Authentication via webauthn
|
||||||
|
- Authorization via Macroons
|
||||||
|
- HTTP API
|
||||||
|
|
||||||
|
## Acknowledgements
|
||||||
|
|
||||||
Sonr would not have been possible without the direct and indirect support of the following individuals:
|
Sonr would not have been possible without the direct and indirect support of the following individuals:
|
||||||
|
|
||||||
@@ -32,8 +42,11 @@ Sonr would not have been possible without the direct and indirect support of the
|
|||||||
- **Steve Jobs**: For User first UX.
|
- **Steve Jobs**: For User first UX.
|
||||||
- **Tim Berners-Lee**: For the Internet.
|
- **Tim Berners-Lee**: For the Internet.
|
||||||
|
|
||||||
# Community & Support
|
<br />
|
||||||
|
|
||||||
|
## Community & Support
|
||||||
|
|
||||||
- [Forum](https://github.com/onsonr/sonr/discussions)
|
- [Forum](https://github.com/onsonr/sonr/discussions)
|
||||||
- [Issues](https://github.com/onsonr/sonr/issues)
|
- [Issues](https://github.com/onsonr/sonr/issues)
|
||||||
- [Twitter](https://sonr.io/twitter)
|
- [Twitter](https://sonr.io/twitter)
|
||||||
|
- [Dev Chat](https://sonr.io/discord)
|
||||||
|
|||||||
-137
@@ -1,137 +0,0 @@
|
|||||||
version: "3"
|
|
||||||
|
|
||||||
vars:
|
|
||||||
VERSION:
|
|
||||||
sh: git describe --tags --abbrev=0
|
|
||||||
COMMIT:
|
|
||||||
sh: git rev-parse --short HEAD
|
|
||||||
ROOT:
|
|
||||||
sh: git rev-parse --show-toplevel
|
|
||||||
OS:
|
|
||||||
sh: uname -s
|
|
||||||
TASKS:
|
|
||||||
sh: task -l
|
|
||||||
DOPPLER_TOKEN:
|
|
||||||
sh: skate get DOPPLER_NETWORK
|
|
||||||
|
|
||||||
includes:
|
|
||||||
hway:
|
|
||||||
taskfile: .taskfiles/Hway.yml
|
|
||||||
ipfs:
|
|
||||||
taskfile: .taskfiles/IPFS.yml
|
|
||||||
postgres:
|
|
||||||
taskfile: .taskfiles/Postgres.yml
|
|
||||||
sonrd:
|
|
||||||
taskfile: .taskfiles/Sonrd.yml
|
|
||||||
synapse:
|
|
||||||
taskfile: .taskfiles/Synapse.yml
|
|
||||||
tigerbeetle:
|
|
||||||
taskfile: .taskfiles/TigerBeetle.yml
|
|
||||||
|
|
||||||
tasks:
|
|
||||||
default:
|
|
||||||
cmds:
|
|
||||||
- gh run ls -L 3
|
|
||||||
- gum format -- "# Sonr ({{.OS}}-{{.VERSION}})" " - ({{.COMMIT}}) {{.ROOT}}"
|
|
||||||
- task -l -j | jq -r '.tasks[].name' | fzf --height=16 | xargs task
|
|
||||||
silent: true
|
|
||||||
|
|
||||||
deps:
|
|
||||||
desc: Install go dependencies
|
|
||||||
silent: true
|
|
||||||
vars:
|
|
||||||
DEPS:
|
|
||||||
[
|
|
||||||
"github.com/apple/pkl-go/cmd/pkl-gen-go@latest",
|
|
||||||
"github.com/sqlc-dev/sqlc/cmd/sqlc@latest",
|
|
||||||
"github.com/goreleaser/goreleaser/v2@latest",
|
|
||||||
"github.com/a-h/templ/cmd/templ@latest",
|
|
||||||
]
|
|
||||||
cmds:
|
|
||||||
- for: { var: DEPS }
|
|
||||||
cmd: gum spin --spinner dot --title "Installing go dependencies..." -- go install {{.ITEM}}
|
|
||||||
|
|
||||||
pkl-gen:
|
|
||||||
desc: Generate PKL files
|
|
||||||
silent: true
|
|
||||||
dir: "pkl/sonr.net"
|
|
||||||
vars:
|
|
||||||
FILES: ["Hway.pkl", "Motr.pkl", "UCAN.pkl"]
|
|
||||||
cmds:
|
|
||||||
- for: { var: FILES }
|
|
||||||
cmd: gum spin --spinner dot --title "Generating PKL in Go..." -- pkl-gen-go {{.ITEM}}
|
|
||||||
|
|
||||||
proto-gen:
|
|
||||||
desc: Generate proto files
|
|
||||||
silent: true
|
|
||||||
cmd: gum spin --spinner dot --title "Generating Protobufs..." -- make proto-gen
|
|
||||||
|
|
||||||
sqlc-gen:
|
|
||||||
desc: Generate SQLC files
|
|
||||||
silent: true
|
|
||||||
cmds:
|
|
||||||
- gum spin --spinner dot --title "Generating SQLC..." -- sqlc generate -f internal/database/sqlc.yaml
|
|
||||||
|
|
||||||
templ-gen:
|
|
||||||
desc: Generate templ files
|
|
||||||
silent: true
|
|
||||||
cmd: gum spin --spinner dot --title "Generating Templ..." -- templ generate
|
|
||||||
|
|
||||||
start:
|
|
||||||
desc: Start the Network
|
|
||||||
silent: true
|
|
||||||
cmds:
|
|
||||||
- task: postgres:reset
|
|
||||||
- task: ipfs:init
|
|
||||||
- task: ipfs:mount
|
|
||||||
- task: sonrd:install
|
|
||||||
- task: hway:build
|
|
||||||
- task: procs-up
|
|
||||||
|
|
||||||
status:
|
|
||||||
desc: Check the status of the Network
|
|
||||||
silent: true
|
|
||||||
cmds:
|
|
||||||
- task: procs-attach
|
|
||||||
|
|
||||||
stop:
|
|
||||||
desc: Stop the Network
|
|
||||||
silent: true
|
|
||||||
cmds:
|
|
||||||
- task: procs-down
|
|
||||||
|
|
||||||
procs-up:
|
|
||||||
internal: true
|
|
||||||
dir: "deploy"
|
|
||||||
cmds:
|
|
||||||
- cmd: process-compose up
|
|
||||||
platforms:
|
|
||||||
- darwin
|
|
||||||
|
|
||||||
- cmd: process-compose up --use-uds --unix-socket /tmp/sonr-network.sock -D
|
|
||||||
platforms:
|
|
||||||
- linux
|
|
||||||
|
|
||||||
procs-down:
|
|
||||||
internal: true
|
|
||||||
dir: "deploy"
|
|
||||||
cmds:
|
|
||||||
- cmd: process-compose down
|
|
||||||
platforms:
|
|
||||||
- darwin
|
|
||||||
|
|
||||||
- cmd: process-compose down --use-uds --unix-socket /tmp/sonr-network.sock
|
|
||||||
platforms:
|
|
||||||
- linux
|
|
||||||
|
|
||||||
procs-attach:
|
|
||||||
internal: true
|
|
||||||
dir: "deploy"
|
|
||||||
cmds:
|
|
||||||
- cmd: process-compose attach --use-uds --unix-socket /tmp/sonr-network.sock
|
|
||||||
platforms:
|
|
||||||
- linux
|
|
||||||
|
|
||||||
- cmd: process-compose attach
|
|
||||||
platforms:
|
|
||||||
- darwin
|
|
||||||
@@ -104,9 +104,9 @@ func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool {
|
|||||||
switch fd.FullName() {
|
switch fd.FullName() {
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.module.v1.Module"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.did.module.v1.Module"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message did.module.v1.Module does not contain field %s", fd.FullName()))
|
panic(fmt.Errorf("message onsonr.sonr.did.module.v1.Module does not contain field %s", fd.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -120,9 +120,9 @@ func (x *fastReflection_Module) Clear(fd protoreflect.FieldDescriptor) {
|
|||||||
switch fd.FullName() {
|
switch fd.FullName() {
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.module.v1.Module"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.did.module.v1.Module"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message did.module.v1.Module does not contain field %s", fd.FullName()))
|
panic(fmt.Errorf("message onsonr.sonr.did.module.v1.Module does not contain field %s", fd.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -136,9 +136,9 @@ func (x *fastReflection_Module) Get(descriptor protoreflect.FieldDescriptor) pro
|
|||||||
switch descriptor.FullName() {
|
switch descriptor.FullName() {
|
||||||
default:
|
default:
|
||||||
if descriptor.IsExtension() {
|
if descriptor.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.module.v1.Module"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.did.module.v1.Module"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message did.module.v1.Module does not contain field %s", descriptor.FullName()))
|
panic(fmt.Errorf("message onsonr.sonr.did.module.v1.Module does not contain field %s", descriptor.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -156,9 +156,9 @@ func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value proto
|
|||||||
switch fd.FullName() {
|
switch fd.FullName() {
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.module.v1.Module"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.did.module.v1.Module"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message did.module.v1.Module does not contain field %s", fd.FullName()))
|
panic(fmt.Errorf("message onsonr.sonr.did.module.v1.Module does not contain field %s", fd.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -176,9 +176,9 @@ func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protore
|
|||||||
switch fd.FullName() {
|
switch fd.FullName() {
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.module.v1.Module"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.did.module.v1.Module"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message did.module.v1.Module does not contain field %s", fd.FullName()))
|
panic(fmt.Errorf("message onsonr.sonr.did.module.v1.Module does not contain field %s", fd.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -189,9 +189,9 @@ func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protor
|
|||||||
switch fd.FullName() {
|
switch fd.FullName() {
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.module.v1.Module"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.did.module.v1.Module"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message did.module.v1.Module does not contain field %s", fd.FullName()))
|
panic(fmt.Errorf("message onsonr.sonr.did.module.v1.Module does not contain field %s", fd.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -201,7 +201,7 @@ func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protor
|
|||||||
func (x *fastReflection_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
func (x *fastReflection_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
||||||
switch d.FullName() {
|
switch d.FullName() {
|
||||||
default:
|
default:
|
||||||
panic(fmt.Errorf("%s is not a oneof field in did.module.v1.Module", d.FullName()))
|
panic(fmt.Errorf("%s is not a oneof field in onsonr.sonr.did.module.v1.Module", d.FullName()))
|
||||||
}
|
}
|
||||||
panic("unreachable")
|
panic("unreachable")
|
||||||
}
|
}
|
||||||
@@ -414,24 +414,29 @@ var File_did_module_v1_module_proto protoreflect.FileDescriptor
|
|||||||
|
|
||||||
var file_did_module_v1_module_proto_rawDesc = []byte{
|
var file_did_module_v1_module_proto_rawDesc = []byte{
|
||||||
0x0a, 0x1a, 0x64, 0x69, 0x64, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f,
|
0x0a, 0x1a, 0x64, 0x69, 0x64, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f,
|
||||||
0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x64, 0x69,
|
0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x6f, 0x6e,
|
||||||
0x64, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73,
|
0x73, 0x6f, 0x6e, 0x72, 0x2e, 0x73, 0x6f, 0x6e, 0x72, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x6d, 0x6f,
|
||||||
0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
|
0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f,
|
||||||
0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x28, 0x0a,
|
0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64,
|
||||||
0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x1e, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x18, 0x0a,
|
0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x28, 0x0a, 0x06, 0x4d, 0x6f, 0x64,
|
||||||
0x16, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f,
|
0x75, 0x6c, 0x65, 0x3a, 0x1e, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x18, 0x0a, 0x16, 0x67, 0x69, 0x74,
|
||||||
0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x42, 0xa9, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e,
|
0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73,
|
||||||
0x64, 0x69, 0x64, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d,
|
0x6f, 0x6e, 0x72, 0x42, 0xe8, 0x01, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x6e, 0x73, 0x6f,
|
||||||
0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69,
|
0x6e, 0x72, 0x2e, 0x73, 0x6f, 0x6e, 0x72, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x6d, 0x6f, 0x64, 0x75,
|
||||||
0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f,
|
0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f,
|
||||||
0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x6d, 0x6f, 0x64,
|
0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
|
||||||
0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2,
|
0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69,
|
||||||
0x02, 0x03, 0x44, 0x4d, 0x58, 0xaa, 0x02, 0x0d, 0x44, 0x69, 0x64, 0x2e, 0x4d, 0x6f, 0x64, 0x75,
|
0x2f, 0x64, 0x69, 0x64, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d,
|
||||||
0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x44, 0x69, 0x64, 0x5c, 0x4d, 0x6f, 0x64, 0x75,
|
0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x04, 0x4f, 0x53, 0x44, 0x4d, 0xaa, 0x02,
|
||||||
0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x44, 0x69, 0x64, 0x5c, 0x4d, 0x6f, 0x64, 0x75,
|
0x19, 0x4f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2e, 0x53, 0x6f, 0x6e, 0x72, 0x2e, 0x44, 0x69, 0x64,
|
||||||
0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
|
0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x19, 0x4f, 0x6e, 0x73,
|
||||||
0x61, 0xea, 0x02, 0x0f, 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a,
|
0x6f, 0x6e, 0x72, 0x5c, 0x53, 0x6f, 0x6e, 0x72, 0x5c, 0x44, 0x69, 0x64, 0x5c, 0x4d, 0x6f, 0x64,
|
||||||
0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x25, 0x4f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x5c,
|
||||||
|
0x53, 0x6f, 0x6e, 0x72, 0x5c, 0x44, 0x69, 0x64, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c,
|
||||||
|
0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02,
|
||||||
|
0x1d, 0x4f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x3a, 0x3a, 0x53, 0x6f, 0x6e, 0x72, 0x3a, 0x3a, 0x44,
|
||||||
|
0x69, 0x64, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06,
|
||||||
|
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -448,7 +453,7 @@ func file_did_module_v1_module_proto_rawDescGZIP() []byte {
|
|||||||
|
|
||||||
var file_did_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
var file_did_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||||
var file_did_module_v1_module_proto_goTypes = []interface{}{
|
var file_did_module_v1_module_proto_goTypes = []interface{}{
|
||||||
(*Module)(nil), // 0: did.module.v1.Module
|
(*Module)(nil), // 0: onsonr.sonr.did.module.v1.Module
|
||||||
}
|
}
|
||||||
var file_did_module_v1_module_proto_depIdxs = []int32{
|
var file_did_module_v1_module_proto_depIdxs = []int32{
|
||||||
0, // [0:0] is the sub-list for method output_type
|
0, // [0:0] is the sub-list for method output_type
|
||||||
|
|||||||
+1224
-1187
File diff suppressed because it is too large
Load Diff
+1258
-35
File diff suppressed because it is too large
Load Diff
+49
-28
@@ -1,6 +1,6 @@
|
|||||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// - protoc-gen-go-grpc v1.5.1
|
// - protoc-gen-go-grpc v1.3.0
|
||||||
// - protoc (unknown)
|
// - protoc (unknown)
|
||||||
// source: did/v1/query.proto
|
// source: did/v1/query.proto
|
||||||
|
|
||||||
@@ -15,25 +15,26 @@ import (
|
|||||||
|
|
||||||
// This is a compile-time assertion to ensure that this generated file
|
// This is a compile-time assertion to ensure that this generated file
|
||||||
// is compatible with the grpc package it is being compiled against.
|
// is compatible with the grpc package it is being compiled against.
|
||||||
// Requires gRPC-Go v1.64.0 or later.
|
// Requires gRPC-Go v1.32.0 or later.
|
||||||
const _ = grpc.SupportPackageIsVersion9
|
const _ = grpc.SupportPackageIsVersion7
|
||||||
|
|
||||||
const (
|
const (
|
||||||
Query_Params_FullMethodName = "/did.v1.Query/Params"
|
Query_Params_FullMethodName = "/did.v1.Query/Params"
|
||||||
Query_Resolve_FullMethodName = "/did.v1.Query/Resolve"
|
Query_Resolve_FullMethodName = "/did.v1.Query/Resolve"
|
||||||
|
Query_Sign_FullMethodName = "/did.v1.Query/Sign"
|
||||||
Query_Verify_FullMethodName = "/did.v1.Query/Verify"
|
Query_Verify_FullMethodName = "/did.v1.Query/Verify"
|
||||||
)
|
)
|
||||||
|
|
||||||
// QueryClient is the client API for Query service.
|
// QueryClient is the client API for Query service.
|
||||||
//
|
//
|
||||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||||
//
|
|
||||||
// Query provides defines the gRPC querier service.
|
|
||||||
type QueryClient interface {
|
type QueryClient interface {
|
||||||
// Params queries all parameters of the module.
|
// Params queries all parameters of the module.
|
||||||
Params(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
|
Params(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
|
||||||
// Resolve queries the DID document by its id.
|
// Resolve queries the DID document by its id.
|
||||||
Resolve(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error)
|
Resolve(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error)
|
||||||
|
// Sign signs a message with the DID document
|
||||||
|
Sign(ctx context.Context, in *QuerySignRequest, opts ...grpc.CallOption) (*QuerySignResponse, error)
|
||||||
// Verify verifies a message with the DID document
|
// Verify verifies a message with the DID document
|
||||||
Verify(ctx context.Context, in *QueryVerifyRequest, opts ...grpc.CallOption) (*QueryVerifyResponse, error)
|
Verify(ctx context.Context, in *QueryVerifyRequest, opts ...grpc.CallOption) (*QueryVerifyResponse, error)
|
||||||
}
|
}
|
||||||
@@ -47,9 +48,8 @@ func NewQueryClient(cc grpc.ClientConnInterface) QueryClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *queryClient) Params(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) {
|
func (c *queryClient) Params(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) {
|
||||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
||||||
out := new(QueryParamsResponse)
|
out := new(QueryParamsResponse)
|
||||||
err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, cOpts...)
|
err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, opts...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -57,9 +57,17 @@ func (c *queryClient) Params(ctx context.Context, in *QueryRequest, opts ...grpc
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *queryClient) Resolve(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error) {
|
func (c *queryClient) Resolve(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error) {
|
||||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
||||||
out := new(QueryResolveResponse)
|
out := new(QueryResolveResponse)
|
||||||
err := c.cc.Invoke(ctx, Query_Resolve_FullMethodName, in, out, cOpts...)
|
err := c.cc.Invoke(ctx, Query_Resolve_FullMethodName, in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *queryClient) Sign(ctx context.Context, in *QuerySignRequest, opts ...grpc.CallOption) (*QuerySignResponse, error) {
|
||||||
|
out := new(QuerySignResponse)
|
||||||
|
err := c.cc.Invoke(ctx, Query_Sign_FullMethodName, in, out, opts...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -67,9 +75,8 @@ func (c *queryClient) Resolve(ctx context.Context, in *QueryRequest, opts ...grp
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *queryClient) Verify(ctx context.Context, in *QueryVerifyRequest, opts ...grpc.CallOption) (*QueryVerifyResponse, error) {
|
func (c *queryClient) Verify(ctx context.Context, in *QueryVerifyRequest, opts ...grpc.CallOption) (*QueryVerifyResponse, error) {
|
||||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
||||||
out := new(QueryVerifyResponse)
|
out := new(QueryVerifyResponse)
|
||||||
err := c.cc.Invoke(ctx, Query_Verify_FullMethodName, in, out, cOpts...)
|
err := c.cc.Invoke(ctx, Query_Verify_FullMethodName, in, out, opts...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -78,25 +85,22 @@ func (c *queryClient) Verify(ctx context.Context, in *QueryVerifyRequest, opts .
|
|||||||
|
|
||||||
// QueryServer is the server API for Query service.
|
// QueryServer is the server API for Query service.
|
||||||
// All implementations must embed UnimplementedQueryServer
|
// All implementations must embed UnimplementedQueryServer
|
||||||
// for forward compatibility.
|
// for forward compatibility
|
||||||
//
|
|
||||||
// Query provides defines the gRPC querier service.
|
|
||||||
type QueryServer interface {
|
type QueryServer interface {
|
||||||
// Params queries all parameters of the module.
|
// Params queries all parameters of the module.
|
||||||
Params(context.Context, *QueryRequest) (*QueryParamsResponse, error)
|
Params(context.Context, *QueryRequest) (*QueryParamsResponse, error)
|
||||||
// Resolve queries the DID document by its id.
|
// Resolve queries the DID document by its id.
|
||||||
Resolve(context.Context, *QueryRequest) (*QueryResolveResponse, error)
|
Resolve(context.Context, *QueryRequest) (*QueryResolveResponse, error)
|
||||||
|
// Sign signs a message with the DID document
|
||||||
|
Sign(context.Context, *QuerySignRequest) (*QuerySignResponse, error)
|
||||||
// Verify verifies a message with the DID document
|
// Verify verifies a message with the DID document
|
||||||
Verify(context.Context, *QueryVerifyRequest) (*QueryVerifyResponse, error)
|
Verify(context.Context, *QueryVerifyRequest) (*QueryVerifyResponse, error)
|
||||||
mustEmbedUnimplementedQueryServer()
|
mustEmbedUnimplementedQueryServer()
|
||||||
}
|
}
|
||||||
|
|
||||||
// UnimplementedQueryServer must be embedded to have
|
// UnimplementedQueryServer must be embedded to have forward compatible implementations.
|
||||||
// forward compatible implementations.
|
type UnimplementedQueryServer struct {
|
||||||
//
|
}
|
||||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
|
||||||
// pointer dereference when methods are called.
|
|
||||||
type UnimplementedQueryServer struct{}
|
|
||||||
|
|
||||||
func (UnimplementedQueryServer) Params(context.Context, *QueryRequest) (*QueryParamsResponse, error) {
|
func (UnimplementedQueryServer) Params(context.Context, *QueryRequest) (*QueryParamsResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method Params not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method Params not implemented")
|
||||||
@@ -104,11 +108,13 @@ func (UnimplementedQueryServer) Params(context.Context, *QueryRequest) (*QueryPa
|
|||||||
func (UnimplementedQueryServer) Resolve(context.Context, *QueryRequest) (*QueryResolveResponse, error) {
|
func (UnimplementedQueryServer) Resolve(context.Context, *QueryRequest) (*QueryResolveResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method Resolve not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method Resolve not implemented")
|
||||||
}
|
}
|
||||||
|
func (UnimplementedQueryServer) Sign(context.Context, *QuerySignRequest) (*QuerySignResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method Sign not implemented")
|
||||||
|
}
|
||||||
func (UnimplementedQueryServer) Verify(context.Context, *QueryVerifyRequest) (*QueryVerifyResponse, error) {
|
func (UnimplementedQueryServer) Verify(context.Context, *QueryVerifyRequest) (*QueryVerifyResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method Verify not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method Verify not implemented")
|
||||||
}
|
}
|
||||||
func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {}
|
func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {}
|
||||||
func (UnimplementedQueryServer) testEmbeddedByValue() {}
|
|
||||||
|
|
||||||
// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service.
|
// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service.
|
||||||
// Use of this interface is not recommended, as added methods to QueryServer will
|
// Use of this interface is not recommended, as added methods to QueryServer will
|
||||||
@@ -118,13 +124,6 @@ type UnsafeQueryServer interface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) {
|
func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) {
|
||||||
// If the following call pancis, it indicates UnimplementedQueryServer was
|
|
||||||
// embedded by pointer and is nil. This will cause panics if an
|
|
||||||
// unimplemented method is ever invoked, so we test this at initialization
|
|
||||||
// time to prevent it from happening at runtime later due to I/O.
|
|
||||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
|
||||||
t.testEmbeddedByValue()
|
|
||||||
}
|
|
||||||
s.RegisterService(&Query_ServiceDesc, srv)
|
s.RegisterService(&Query_ServiceDesc, srv)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -164,6 +163,24 @@ func _Query_Resolve_Handler(srv interface{}, ctx context.Context, dec func(inter
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _Query_Sign_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(QuerySignRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(QueryServer).Sign(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: Query_Sign_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(QueryServer).Sign(ctx, req.(*QuerySignRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
func _Query_Verify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
func _Query_Verify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(QueryVerifyRequest)
|
in := new(QueryVerifyRequest)
|
||||||
if err := dec(in); err != nil {
|
if err := dec(in); err != nil {
|
||||||
@@ -197,6 +214,10 @@ var Query_ServiceDesc = grpc.ServiceDesc{
|
|||||||
MethodName: "Resolve",
|
MethodName: "Resolve",
|
||||||
Handler: _Query_Resolve_Handler,
|
Handler: _Query_Resolve_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "Sign",
|
||||||
|
Handler: _Query_Sign_Handler,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
MethodName: "Verify",
|
MethodName: "Verify",
|
||||||
Handler: _Query_Verify_Handler,
|
Handler: _Query_Verify_Handler,
|
||||||
|
|||||||
+170
-170
@@ -9,121 +9,121 @@ import (
|
|||||||
ormerrors "cosmossdk.io/orm/types/ormerrors"
|
ormerrors "cosmossdk.io/orm/types/ormerrors"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AccountTable interface {
|
type AuthenticationTable interface {
|
||||||
Insert(ctx context.Context, account *Account) error
|
Insert(ctx context.Context, authentication *Authentication) error
|
||||||
Update(ctx context.Context, account *Account) error
|
Update(ctx context.Context, authentication *Authentication) error
|
||||||
Save(ctx context.Context, account *Account) error
|
Save(ctx context.Context, authentication *Authentication) error
|
||||||
Delete(ctx context.Context, account *Account) error
|
Delete(ctx context.Context, authentication *Authentication) error
|
||||||
Has(ctx context.Context, did string) (found bool, err error)
|
Has(ctx context.Context, did string) (found bool, err error)
|
||||||
// Get returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
// Get returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
||||||
Get(ctx context.Context, did string) (*Account, error)
|
Get(ctx context.Context, did string) (*Authentication, error)
|
||||||
HasByControllerSubject(ctx context.Context, controller string, subject string) (found bool, err error)
|
HasByControllerSubject(ctx context.Context, controller string, subject string) (found bool, err error)
|
||||||
// GetByControllerSubject returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
// GetByControllerSubject returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
||||||
GetByControllerSubject(ctx context.Context, controller string, subject string) (*Account, error)
|
GetByControllerSubject(ctx context.Context, controller string, subject string) (*Authentication, error)
|
||||||
List(ctx context.Context, prefixKey AccountIndexKey, opts ...ormlist.Option) (AccountIterator, error)
|
List(ctx context.Context, prefixKey AuthenticationIndexKey, opts ...ormlist.Option) (AuthenticationIterator, error)
|
||||||
ListRange(ctx context.Context, from, to AccountIndexKey, opts ...ormlist.Option) (AccountIterator, error)
|
ListRange(ctx context.Context, from, to AuthenticationIndexKey, opts ...ormlist.Option) (AuthenticationIterator, error)
|
||||||
DeleteBy(ctx context.Context, prefixKey AccountIndexKey) error
|
DeleteBy(ctx context.Context, prefixKey AuthenticationIndexKey) error
|
||||||
DeleteRange(ctx context.Context, from, to AccountIndexKey) error
|
DeleteRange(ctx context.Context, from, to AuthenticationIndexKey) error
|
||||||
|
|
||||||
doNotImplement()
|
doNotImplement()
|
||||||
}
|
}
|
||||||
|
|
||||||
type AccountIterator struct {
|
type AuthenticationIterator struct {
|
||||||
ormtable.Iterator
|
ormtable.Iterator
|
||||||
}
|
}
|
||||||
|
|
||||||
func (i AccountIterator) Value() (*Account, error) {
|
func (i AuthenticationIterator) Value() (*Authentication, error) {
|
||||||
var account Account
|
var authentication Authentication
|
||||||
err := i.UnmarshalMessage(&account)
|
err := i.UnmarshalMessage(&authentication)
|
||||||
return &account, err
|
return &authentication, err
|
||||||
}
|
}
|
||||||
|
|
||||||
type AccountIndexKey interface {
|
type AuthenticationIndexKey interface {
|
||||||
id() uint32
|
id() uint32
|
||||||
values() []interface{}
|
values() []interface{}
|
||||||
accountIndexKey()
|
authenticationIndexKey()
|
||||||
}
|
}
|
||||||
|
|
||||||
// primary key starting index..
|
// primary key starting index..
|
||||||
type AccountPrimaryKey = AccountDidIndexKey
|
type AuthenticationPrimaryKey = AuthenticationDidIndexKey
|
||||||
|
|
||||||
type AccountDidIndexKey struct {
|
type AuthenticationDidIndexKey struct {
|
||||||
vs []interface{}
|
vs []interface{}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x AccountDidIndexKey) id() uint32 { return 0 }
|
func (x AuthenticationDidIndexKey) id() uint32 { return 0 }
|
||||||
func (x AccountDidIndexKey) values() []interface{} { return x.vs }
|
func (x AuthenticationDidIndexKey) values() []interface{} { return x.vs }
|
||||||
func (x AccountDidIndexKey) accountIndexKey() {}
|
func (x AuthenticationDidIndexKey) authenticationIndexKey() {}
|
||||||
|
|
||||||
func (this AccountDidIndexKey) WithDid(did string) AccountDidIndexKey {
|
func (this AuthenticationDidIndexKey) WithDid(did string) AuthenticationDidIndexKey {
|
||||||
this.vs = []interface{}{did}
|
this.vs = []interface{}{did}
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
type AccountControllerSubjectIndexKey struct {
|
type AuthenticationControllerSubjectIndexKey struct {
|
||||||
vs []interface{}
|
vs []interface{}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x AccountControllerSubjectIndexKey) id() uint32 { return 1 }
|
func (x AuthenticationControllerSubjectIndexKey) id() uint32 { return 1 }
|
||||||
func (x AccountControllerSubjectIndexKey) values() []interface{} { return x.vs }
|
func (x AuthenticationControllerSubjectIndexKey) values() []interface{} { return x.vs }
|
||||||
func (x AccountControllerSubjectIndexKey) accountIndexKey() {}
|
func (x AuthenticationControllerSubjectIndexKey) authenticationIndexKey() {}
|
||||||
|
|
||||||
func (this AccountControllerSubjectIndexKey) WithController(controller string) AccountControllerSubjectIndexKey {
|
func (this AuthenticationControllerSubjectIndexKey) WithController(controller string) AuthenticationControllerSubjectIndexKey {
|
||||||
this.vs = []interface{}{controller}
|
this.vs = []interface{}{controller}
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this AccountControllerSubjectIndexKey) WithControllerSubject(controller string, subject string) AccountControllerSubjectIndexKey {
|
func (this AuthenticationControllerSubjectIndexKey) WithControllerSubject(controller string, subject string) AuthenticationControllerSubjectIndexKey {
|
||||||
this.vs = []interface{}{controller, subject}
|
this.vs = []interface{}{controller, subject}
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
type accountTable struct {
|
type authenticationTable struct {
|
||||||
table ormtable.Table
|
table ormtable.Table
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this accountTable) Insert(ctx context.Context, account *Account) error {
|
func (this authenticationTable) Insert(ctx context.Context, authentication *Authentication) error {
|
||||||
return this.table.Insert(ctx, account)
|
return this.table.Insert(ctx, authentication)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this accountTable) Update(ctx context.Context, account *Account) error {
|
func (this authenticationTable) Update(ctx context.Context, authentication *Authentication) error {
|
||||||
return this.table.Update(ctx, account)
|
return this.table.Update(ctx, authentication)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this accountTable) Save(ctx context.Context, account *Account) error {
|
func (this authenticationTable) Save(ctx context.Context, authentication *Authentication) error {
|
||||||
return this.table.Save(ctx, account)
|
return this.table.Save(ctx, authentication)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this accountTable) Delete(ctx context.Context, account *Account) error {
|
func (this authenticationTable) Delete(ctx context.Context, authentication *Authentication) error {
|
||||||
return this.table.Delete(ctx, account)
|
return this.table.Delete(ctx, authentication)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this accountTable) Has(ctx context.Context, did string) (found bool, err error) {
|
func (this authenticationTable) Has(ctx context.Context, did string) (found bool, err error) {
|
||||||
return this.table.PrimaryKey().Has(ctx, did)
|
return this.table.PrimaryKey().Has(ctx, did)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this accountTable) Get(ctx context.Context, did string) (*Account, error) {
|
func (this authenticationTable) Get(ctx context.Context, did string) (*Authentication, error) {
|
||||||
var account Account
|
var authentication Authentication
|
||||||
found, err := this.table.PrimaryKey().Get(ctx, &account, did)
|
found, err := this.table.PrimaryKey().Get(ctx, &authentication, did)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if !found {
|
if !found {
|
||||||
return nil, ormerrors.NotFound
|
return nil, ormerrors.NotFound
|
||||||
}
|
}
|
||||||
return &account, nil
|
return &authentication, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this accountTable) HasByControllerSubject(ctx context.Context, controller string, subject string) (found bool, err error) {
|
func (this authenticationTable) HasByControllerSubject(ctx context.Context, controller string, subject string) (found bool, err error) {
|
||||||
return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx,
|
return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx,
|
||||||
controller,
|
controller,
|
||||||
subject,
|
subject,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this accountTable) GetByControllerSubject(ctx context.Context, controller string, subject string) (*Account, error) {
|
func (this authenticationTable) GetByControllerSubject(ctx context.Context, controller string, subject string) (*Authentication, error) {
|
||||||
var account Account
|
var authentication Authentication
|
||||||
found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &account,
|
found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &authentication,
|
||||||
controller,
|
controller,
|
||||||
subject,
|
subject,
|
||||||
)
|
)
|
||||||
@@ -133,206 +133,206 @@ func (this accountTable) GetByControllerSubject(ctx context.Context, controller
|
|||||||
if !found {
|
if !found {
|
||||||
return nil, ormerrors.NotFound
|
return nil, ormerrors.NotFound
|
||||||
}
|
}
|
||||||
return &account, nil
|
return &authentication, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this accountTable) List(ctx context.Context, prefixKey AccountIndexKey, opts ...ormlist.Option) (AccountIterator, error) {
|
func (this authenticationTable) List(ctx context.Context, prefixKey AuthenticationIndexKey, opts ...ormlist.Option) (AuthenticationIterator, error) {
|
||||||
it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...)
|
it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...)
|
||||||
return AccountIterator{it}, err
|
return AuthenticationIterator{it}, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this accountTable) ListRange(ctx context.Context, from, to AccountIndexKey, opts ...ormlist.Option) (AccountIterator, error) {
|
func (this authenticationTable) ListRange(ctx context.Context, from, to AuthenticationIndexKey, opts ...ormlist.Option) (AuthenticationIterator, error) {
|
||||||
it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...)
|
it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...)
|
||||||
return AccountIterator{it}, err
|
return AuthenticationIterator{it}, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this accountTable) DeleteBy(ctx context.Context, prefixKey AccountIndexKey) error {
|
func (this authenticationTable) DeleteBy(ctx context.Context, prefixKey AuthenticationIndexKey) error {
|
||||||
return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...)
|
return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this accountTable) DeleteRange(ctx context.Context, from, to AccountIndexKey) error {
|
func (this authenticationTable) DeleteRange(ctx context.Context, from, to AuthenticationIndexKey) error {
|
||||||
return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values())
|
return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values())
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this accountTable) doNotImplement() {}
|
func (this authenticationTable) doNotImplement() {}
|
||||||
|
|
||||||
var _ AccountTable = accountTable{}
|
var _ AuthenticationTable = authenticationTable{}
|
||||||
|
|
||||||
func NewAccountTable(db ormtable.Schema) (AccountTable, error) {
|
func NewAuthenticationTable(db ormtable.Schema) (AuthenticationTable, error) {
|
||||||
table := db.GetTable(&Account{})
|
table := db.GetTable(&Authentication{})
|
||||||
if table == nil {
|
if table == nil {
|
||||||
return nil, ormerrors.TableNotFound.Wrap(string((&Account{}).ProtoReflect().Descriptor().FullName()))
|
return nil, ormerrors.TableNotFound.Wrap(string((&Authentication{}).ProtoReflect().Descriptor().FullName()))
|
||||||
}
|
}
|
||||||
return accountTable{table}, nil
|
return authenticationTable{table}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
type PublicKeyTable interface {
|
type ControllerTable interface {
|
||||||
Insert(ctx context.Context, publicKey *PublicKey) error
|
Insert(ctx context.Context, controller *Controller) error
|
||||||
InsertReturningNumber(ctx context.Context, publicKey *PublicKey) (uint64, error)
|
InsertReturningNumber(ctx context.Context, controller *Controller) (uint64, error)
|
||||||
LastInsertedSequence(ctx context.Context) (uint64, error)
|
LastInsertedSequence(ctx context.Context) (uint64, error)
|
||||||
Update(ctx context.Context, publicKey *PublicKey) error
|
Update(ctx context.Context, controller *Controller) error
|
||||||
Save(ctx context.Context, publicKey *PublicKey) error
|
Save(ctx context.Context, controller *Controller) error
|
||||||
Delete(ctx context.Context, publicKey *PublicKey) error
|
Delete(ctx context.Context, controller *Controller) error
|
||||||
Has(ctx context.Context, number uint64) (found bool, err error)
|
Has(ctx context.Context, number uint64) (found bool, err error)
|
||||||
// Get returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
// Get returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
||||||
Get(ctx context.Context, number uint64) (*PublicKey, error)
|
Get(ctx context.Context, number uint64) (*Controller, error)
|
||||||
HasBySonrAddress(ctx context.Context, sonr_address string) (found bool, err error)
|
HasBySonrAddress(ctx context.Context, sonr_address string) (found bool, err error)
|
||||||
// GetBySonrAddress returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
// GetBySonrAddress returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
||||||
GetBySonrAddress(ctx context.Context, sonr_address string) (*PublicKey, error)
|
GetBySonrAddress(ctx context.Context, sonr_address string) (*Controller, error)
|
||||||
HasByEthAddress(ctx context.Context, eth_address string) (found bool, err error)
|
HasByEthAddress(ctx context.Context, eth_address string) (found bool, err error)
|
||||||
// GetByEthAddress returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
// GetByEthAddress returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
||||||
GetByEthAddress(ctx context.Context, eth_address string) (*PublicKey, error)
|
GetByEthAddress(ctx context.Context, eth_address string) (*Controller, error)
|
||||||
HasByBtcAddress(ctx context.Context, btc_address string) (found bool, err error)
|
HasByBtcAddress(ctx context.Context, btc_address string) (found bool, err error)
|
||||||
// GetByBtcAddress returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
// GetByBtcAddress returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
||||||
GetByBtcAddress(ctx context.Context, btc_address string) (*PublicKey, error)
|
GetByBtcAddress(ctx context.Context, btc_address string) (*Controller, error)
|
||||||
HasByDid(ctx context.Context, did string) (found bool, err error)
|
HasByDid(ctx context.Context, did string) (found bool, err error)
|
||||||
// GetByDid returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
// GetByDid returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
||||||
GetByDid(ctx context.Context, did string) (*PublicKey, error)
|
GetByDid(ctx context.Context, did string) (*Controller, error)
|
||||||
List(ctx context.Context, prefixKey PublicKeyIndexKey, opts ...ormlist.Option) (PublicKeyIterator, error)
|
List(ctx context.Context, prefixKey ControllerIndexKey, opts ...ormlist.Option) (ControllerIterator, error)
|
||||||
ListRange(ctx context.Context, from, to PublicKeyIndexKey, opts ...ormlist.Option) (PublicKeyIterator, error)
|
ListRange(ctx context.Context, from, to ControllerIndexKey, opts ...ormlist.Option) (ControllerIterator, error)
|
||||||
DeleteBy(ctx context.Context, prefixKey PublicKeyIndexKey) error
|
DeleteBy(ctx context.Context, prefixKey ControllerIndexKey) error
|
||||||
DeleteRange(ctx context.Context, from, to PublicKeyIndexKey) error
|
DeleteRange(ctx context.Context, from, to ControllerIndexKey) error
|
||||||
|
|
||||||
doNotImplement()
|
doNotImplement()
|
||||||
}
|
}
|
||||||
|
|
||||||
type PublicKeyIterator struct {
|
type ControllerIterator struct {
|
||||||
ormtable.Iterator
|
ormtable.Iterator
|
||||||
}
|
}
|
||||||
|
|
||||||
func (i PublicKeyIterator) Value() (*PublicKey, error) {
|
func (i ControllerIterator) Value() (*Controller, error) {
|
||||||
var publicKey PublicKey
|
var controller Controller
|
||||||
err := i.UnmarshalMessage(&publicKey)
|
err := i.UnmarshalMessage(&controller)
|
||||||
return &publicKey, err
|
return &controller, err
|
||||||
}
|
}
|
||||||
|
|
||||||
type PublicKeyIndexKey interface {
|
type ControllerIndexKey interface {
|
||||||
id() uint32
|
id() uint32
|
||||||
values() []interface{}
|
values() []interface{}
|
||||||
publicKeyIndexKey()
|
controllerIndexKey()
|
||||||
}
|
}
|
||||||
|
|
||||||
// primary key starting index..
|
// primary key starting index..
|
||||||
type PublicKeyPrimaryKey = PublicKeyNumberIndexKey
|
type ControllerPrimaryKey = ControllerNumberIndexKey
|
||||||
|
|
||||||
type PublicKeyNumberIndexKey struct {
|
type ControllerNumberIndexKey struct {
|
||||||
vs []interface{}
|
vs []interface{}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x PublicKeyNumberIndexKey) id() uint32 { return 0 }
|
func (x ControllerNumberIndexKey) id() uint32 { return 0 }
|
||||||
func (x PublicKeyNumberIndexKey) values() []interface{} { return x.vs }
|
func (x ControllerNumberIndexKey) values() []interface{} { return x.vs }
|
||||||
func (x PublicKeyNumberIndexKey) publicKeyIndexKey() {}
|
func (x ControllerNumberIndexKey) controllerIndexKey() {}
|
||||||
|
|
||||||
func (this PublicKeyNumberIndexKey) WithNumber(number uint64) PublicKeyNumberIndexKey {
|
func (this ControllerNumberIndexKey) WithNumber(number uint64) ControllerNumberIndexKey {
|
||||||
this.vs = []interface{}{number}
|
this.vs = []interface{}{number}
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
type PublicKeySonrAddressIndexKey struct {
|
type ControllerSonrAddressIndexKey struct {
|
||||||
vs []interface{}
|
vs []interface{}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x PublicKeySonrAddressIndexKey) id() uint32 { return 1 }
|
func (x ControllerSonrAddressIndexKey) id() uint32 { return 1 }
|
||||||
func (x PublicKeySonrAddressIndexKey) values() []interface{} { return x.vs }
|
func (x ControllerSonrAddressIndexKey) values() []interface{} { return x.vs }
|
||||||
func (x PublicKeySonrAddressIndexKey) publicKeyIndexKey() {}
|
func (x ControllerSonrAddressIndexKey) controllerIndexKey() {}
|
||||||
|
|
||||||
func (this PublicKeySonrAddressIndexKey) WithSonrAddress(sonr_address string) PublicKeySonrAddressIndexKey {
|
func (this ControllerSonrAddressIndexKey) WithSonrAddress(sonr_address string) ControllerSonrAddressIndexKey {
|
||||||
this.vs = []interface{}{sonr_address}
|
this.vs = []interface{}{sonr_address}
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
type PublicKeyEthAddressIndexKey struct {
|
type ControllerEthAddressIndexKey struct {
|
||||||
vs []interface{}
|
vs []interface{}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x PublicKeyEthAddressIndexKey) id() uint32 { return 2 }
|
func (x ControllerEthAddressIndexKey) id() uint32 { return 2 }
|
||||||
func (x PublicKeyEthAddressIndexKey) values() []interface{} { return x.vs }
|
func (x ControllerEthAddressIndexKey) values() []interface{} { return x.vs }
|
||||||
func (x PublicKeyEthAddressIndexKey) publicKeyIndexKey() {}
|
func (x ControllerEthAddressIndexKey) controllerIndexKey() {}
|
||||||
|
|
||||||
func (this PublicKeyEthAddressIndexKey) WithEthAddress(eth_address string) PublicKeyEthAddressIndexKey {
|
func (this ControllerEthAddressIndexKey) WithEthAddress(eth_address string) ControllerEthAddressIndexKey {
|
||||||
this.vs = []interface{}{eth_address}
|
this.vs = []interface{}{eth_address}
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
type PublicKeyBtcAddressIndexKey struct {
|
type ControllerBtcAddressIndexKey struct {
|
||||||
vs []interface{}
|
vs []interface{}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x PublicKeyBtcAddressIndexKey) id() uint32 { return 3 }
|
func (x ControllerBtcAddressIndexKey) id() uint32 { return 3 }
|
||||||
func (x PublicKeyBtcAddressIndexKey) values() []interface{} { return x.vs }
|
func (x ControllerBtcAddressIndexKey) values() []interface{} { return x.vs }
|
||||||
func (x PublicKeyBtcAddressIndexKey) publicKeyIndexKey() {}
|
func (x ControllerBtcAddressIndexKey) controllerIndexKey() {}
|
||||||
|
|
||||||
func (this PublicKeyBtcAddressIndexKey) WithBtcAddress(btc_address string) PublicKeyBtcAddressIndexKey {
|
func (this ControllerBtcAddressIndexKey) WithBtcAddress(btc_address string) ControllerBtcAddressIndexKey {
|
||||||
this.vs = []interface{}{btc_address}
|
this.vs = []interface{}{btc_address}
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
type PublicKeyDidIndexKey struct {
|
type ControllerDidIndexKey struct {
|
||||||
vs []interface{}
|
vs []interface{}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x PublicKeyDidIndexKey) id() uint32 { return 4 }
|
func (x ControllerDidIndexKey) id() uint32 { return 4 }
|
||||||
func (x PublicKeyDidIndexKey) values() []interface{} { return x.vs }
|
func (x ControllerDidIndexKey) values() []interface{} { return x.vs }
|
||||||
func (x PublicKeyDidIndexKey) publicKeyIndexKey() {}
|
func (x ControllerDidIndexKey) controllerIndexKey() {}
|
||||||
|
|
||||||
func (this PublicKeyDidIndexKey) WithDid(did string) PublicKeyDidIndexKey {
|
func (this ControllerDidIndexKey) WithDid(did string) ControllerDidIndexKey {
|
||||||
this.vs = []interface{}{did}
|
this.vs = []interface{}{did}
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
type publicKeyTable struct {
|
type controllerTable struct {
|
||||||
table ormtable.AutoIncrementTable
|
table ormtable.AutoIncrementTable
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this publicKeyTable) Insert(ctx context.Context, publicKey *PublicKey) error {
|
func (this controllerTable) Insert(ctx context.Context, controller *Controller) error {
|
||||||
return this.table.Insert(ctx, publicKey)
|
return this.table.Insert(ctx, controller)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this publicKeyTable) Update(ctx context.Context, publicKey *PublicKey) error {
|
func (this controllerTable) Update(ctx context.Context, controller *Controller) error {
|
||||||
return this.table.Update(ctx, publicKey)
|
return this.table.Update(ctx, controller)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this publicKeyTable) Save(ctx context.Context, publicKey *PublicKey) error {
|
func (this controllerTable) Save(ctx context.Context, controller *Controller) error {
|
||||||
return this.table.Save(ctx, publicKey)
|
return this.table.Save(ctx, controller)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this publicKeyTable) Delete(ctx context.Context, publicKey *PublicKey) error {
|
func (this controllerTable) Delete(ctx context.Context, controller *Controller) error {
|
||||||
return this.table.Delete(ctx, publicKey)
|
return this.table.Delete(ctx, controller)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this publicKeyTable) InsertReturningNumber(ctx context.Context, publicKey *PublicKey) (uint64, error) {
|
func (this controllerTable) InsertReturningNumber(ctx context.Context, controller *Controller) (uint64, error) {
|
||||||
return this.table.InsertReturningPKey(ctx, publicKey)
|
return this.table.InsertReturningPKey(ctx, controller)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this publicKeyTable) LastInsertedSequence(ctx context.Context) (uint64, error) {
|
func (this controllerTable) LastInsertedSequence(ctx context.Context) (uint64, error) {
|
||||||
return this.table.LastInsertedSequence(ctx)
|
return this.table.LastInsertedSequence(ctx)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this publicKeyTable) Has(ctx context.Context, number uint64) (found bool, err error) {
|
func (this controllerTable) Has(ctx context.Context, number uint64) (found bool, err error) {
|
||||||
return this.table.PrimaryKey().Has(ctx, number)
|
return this.table.PrimaryKey().Has(ctx, number)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this publicKeyTable) Get(ctx context.Context, number uint64) (*PublicKey, error) {
|
func (this controllerTable) Get(ctx context.Context, number uint64) (*Controller, error) {
|
||||||
var publicKey PublicKey
|
var controller Controller
|
||||||
found, err := this.table.PrimaryKey().Get(ctx, &publicKey, number)
|
found, err := this.table.PrimaryKey().Get(ctx, &controller, number)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if !found {
|
if !found {
|
||||||
return nil, ormerrors.NotFound
|
return nil, ormerrors.NotFound
|
||||||
}
|
}
|
||||||
return &publicKey, nil
|
return &controller, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this publicKeyTable) HasBySonrAddress(ctx context.Context, sonr_address string) (found bool, err error) {
|
func (this controllerTable) HasBySonrAddress(ctx context.Context, sonr_address string) (found bool, err error) {
|
||||||
return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx,
|
return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx,
|
||||||
sonr_address,
|
sonr_address,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this publicKeyTable) GetBySonrAddress(ctx context.Context, sonr_address string) (*PublicKey, error) {
|
func (this controllerTable) GetBySonrAddress(ctx context.Context, sonr_address string) (*Controller, error) {
|
||||||
var publicKey PublicKey
|
var controller Controller
|
||||||
found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &publicKey,
|
found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &controller,
|
||||||
sonr_address,
|
sonr_address,
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -341,18 +341,18 @@ func (this publicKeyTable) GetBySonrAddress(ctx context.Context, sonr_address st
|
|||||||
if !found {
|
if !found {
|
||||||
return nil, ormerrors.NotFound
|
return nil, ormerrors.NotFound
|
||||||
}
|
}
|
||||||
return &publicKey, nil
|
return &controller, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this publicKeyTable) HasByEthAddress(ctx context.Context, eth_address string) (found bool, err error) {
|
func (this controllerTable) HasByEthAddress(ctx context.Context, eth_address string) (found bool, err error) {
|
||||||
return this.table.GetIndexByID(2).(ormtable.UniqueIndex).Has(ctx,
|
return this.table.GetIndexByID(2).(ormtable.UniqueIndex).Has(ctx,
|
||||||
eth_address,
|
eth_address,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this publicKeyTable) GetByEthAddress(ctx context.Context, eth_address string) (*PublicKey, error) {
|
func (this controllerTable) GetByEthAddress(ctx context.Context, eth_address string) (*Controller, error) {
|
||||||
var publicKey PublicKey
|
var controller Controller
|
||||||
found, err := this.table.GetIndexByID(2).(ormtable.UniqueIndex).Get(ctx, &publicKey,
|
found, err := this.table.GetIndexByID(2).(ormtable.UniqueIndex).Get(ctx, &controller,
|
||||||
eth_address,
|
eth_address,
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -361,18 +361,18 @@ func (this publicKeyTable) GetByEthAddress(ctx context.Context, eth_address stri
|
|||||||
if !found {
|
if !found {
|
||||||
return nil, ormerrors.NotFound
|
return nil, ormerrors.NotFound
|
||||||
}
|
}
|
||||||
return &publicKey, nil
|
return &controller, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this publicKeyTable) HasByBtcAddress(ctx context.Context, btc_address string) (found bool, err error) {
|
func (this controllerTable) HasByBtcAddress(ctx context.Context, btc_address string) (found bool, err error) {
|
||||||
return this.table.GetIndexByID(3).(ormtable.UniqueIndex).Has(ctx,
|
return this.table.GetIndexByID(3).(ormtable.UniqueIndex).Has(ctx,
|
||||||
btc_address,
|
btc_address,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this publicKeyTable) GetByBtcAddress(ctx context.Context, btc_address string) (*PublicKey, error) {
|
func (this controllerTable) GetByBtcAddress(ctx context.Context, btc_address string) (*Controller, error) {
|
||||||
var publicKey PublicKey
|
var controller Controller
|
||||||
found, err := this.table.GetIndexByID(3).(ormtable.UniqueIndex).Get(ctx, &publicKey,
|
found, err := this.table.GetIndexByID(3).(ormtable.UniqueIndex).Get(ctx, &controller,
|
||||||
btc_address,
|
btc_address,
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -381,18 +381,18 @@ func (this publicKeyTable) GetByBtcAddress(ctx context.Context, btc_address stri
|
|||||||
if !found {
|
if !found {
|
||||||
return nil, ormerrors.NotFound
|
return nil, ormerrors.NotFound
|
||||||
}
|
}
|
||||||
return &publicKey, nil
|
return &controller, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this publicKeyTable) HasByDid(ctx context.Context, did string) (found bool, err error) {
|
func (this controllerTable) HasByDid(ctx context.Context, did string) (found bool, err error) {
|
||||||
return this.table.GetIndexByID(4).(ormtable.UniqueIndex).Has(ctx,
|
return this.table.GetIndexByID(4).(ormtable.UniqueIndex).Has(ctx,
|
||||||
did,
|
did,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this publicKeyTable) GetByDid(ctx context.Context, did string) (*PublicKey, error) {
|
func (this controllerTable) GetByDid(ctx context.Context, did string) (*Controller, error) {
|
||||||
var publicKey PublicKey
|
var controller Controller
|
||||||
found, err := this.table.GetIndexByID(4).(ormtable.UniqueIndex).Get(ctx, &publicKey,
|
found, err := this.table.GetIndexByID(4).(ormtable.UniqueIndex).Get(ctx, &controller,
|
||||||
did,
|
did,
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -401,37 +401,37 @@ func (this publicKeyTable) GetByDid(ctx context.Context, did string) (*PublicKey
|
|||||||
if !found {
|
if !found {
|
||||||
return nil, ormerrors.NotFound
|
return nil, ormerrors.NotFound
|
||||||
}
|
}
|
||||||
return &publicKey, nil
|
return &controller, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this publicKeyTable) List(ctx context.Context, prefixKey PublicKeyIndexKey, opts ...ormlist.Option) (PublicKeyIterator, error) {
|
func (this controllerTable) List(ctx context.Context, prefixKey ControllerIndexKey, opts ...ormlist.Option) (ControllerIterator, error) {
|
||||||
it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...)
|
it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...)
|
||||||
return PublicKeyIterator{it}, err
|
return ControllerIterator{it}, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this publicKeyTable) ListRange(ctx context.Context, from, to PublicKeyIndexKey, opts ...ormlist.Option) (PublicKeyIterator, error) {
|
func (this controllerTable) ListRange(ctx context.Context, from, to ControllerIndexKey, opts ...ormlist.Option) (ControllerIterator, error) {
|
||||||
it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...)
|
it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...)
|
||||||
return PublicKeyIterator{it}, err
|
return ControllerIterator{it}, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this publicKeyTable) DeleteBy(ctx context.Context, prefixKey PublicKeyIndexKey) error {
|
func (this controllerTable) DeleteBy(ctx context.Context, prefixKey ControllerIndexKey) error {
|
||||||
return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...)
|
return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this publicKeyTable) DeleteRange(ctx context.Context, from, to PublicKeyIndexKey) error {
|
func (this controllerTable) DeleteRange(ctx context.Context, from, to ControllerIndexKey) error {
|
||||||
return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values())
|
return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values())
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this publicKeyTable) doNotImplement() {}
|
func (this controllerTable) doNotImplement() {}
|
||||||
|
|
||||||
var _ PublicKeyTable = publicKeyTable{}
|
var _ ControllerTable = controllerTable{}
|
||||||
|
|
||||||
func NewPublicKeyTable(db ormtable.Schema) (PublicKeyTable, error) {
|
func NewControllerTable(db ormtable.Schema) (ControllerTable, error) {
|
||||||
table := db.GetTable(&PublicKey{})
|
table := db.GetTable(&Controller{})
|
||||||
if table == nil {
|
if table == nil {
|
||||||
return nil, ormerrors.TableNotFound.Wrap(string((&PublicKey{}).ProtoReflect().Descriptor().FullName()))
|
return nil, ormerrors.TableNotFound.Wrap(string((&Controller{}).ProtoReflect().Descriptor().FullName()))
|
||||||
}
|
}
|
||||||
return publicKeyTable{table.(ormtable.AutoIncrementTable)}, nil
|
return controllerTable{table.(ormtable.AutoIncrementTable)}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
type VerificationTable interface {
|
type VerificationTable interface {
|
||||||
@@ -692,25 +692,25 @@ func NewVerificationTable(db ormtable.Schema) (VerificationTable, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type StateStore interface {
|
type StateStore interface {
|
||||||
AccountTable() AccountTable
|
AuthenticationTable() AuthenticationTable
|
||||||
PublicKeyTable() PublicKeyTable
|
ControllerTable() ControllerTable
|
||||||
VerificationTable() VerificationTable
|
VerificationTable() VerificationTable
|
||||||
|
|
||||||
doNotImplement()
|
doNotImplement()
|
||||||
}
|
}
|
||||||
|
|
||||||
type stateStore struct {
|
type stateStore struct {
|
||||||
account AccountTable
|
authentication AuthenticationTable
|
||||||
publicKey PublicKeyTable
|
controller ControllerTable
|
||||||
verification VerificationTable
|
verification VerificationTable
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x stateStore) AccountTable() AccountTable {
|
func (x stateStore) AuthenticationTable() AuthenticationTable {
|
||||||
return x.account
|
return x.authentication
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x stateStore) PublicKeyTable() PublicKeyTable {
|
func (x stateStore) ControllerTable() ControllerTable {
|
||||||
return x.publicKey
|
return x.controller
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x stateStore) VerificationTable() VerificationTable {
|
func (x stateStore) VerificationTable() VerificationTable {
|
||||||
@@ -722,12 +722,12 @@ func (stateStore) doNotImplement() {}
|
|||||||
var _ StateStore = stateStore{}
|
var _ StateStore = stateStore{}
|
||||||
|
|
||||||
func NewStateStore(db ormtable.Schema) (StateStore, error) {
|
func NewStateStore(db ormtable.Schema) (StateStore, error) {
|
||||||
accountTable, err := NewAccountTable(db)
|
authenticationTable, err := NewAuthenticationTable(db)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
publicKeyTable, err := NewPublicKeyTable(db)
|
controllerTable, err := NewControllerTable(db)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -738,8 +738,8 @@ func NewStateStore(db ormtable.Schema) (StateStore, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return stateStore{
|
return stateStore{
|
||||||
accountTable,
|
authenticationTable,
|
||||||
publicKeyTable,
|
controllerTable,
|
||||||
verificationTable,
|
verificationTable,
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|||||||
+3537
-632
File diff suppressed because it is too large
Load Diff
+855
-4022
File diff suppressed because it is too large
Load Diff
+28
-164
@@ -1,6 +1,6 @@
|
|||||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// - protoc-gen-go-grpc v1.5.1
|
// - protoc-gen-go-grpc v1.3.0
|
||||||
// - protoc (unknown)
|
// - protoc (unknown)
|
||||||
// source: did/v1/tx.proto
|
// source: did/v1/tx.proto
|
||||||
|
|
||||||
@@ -15,35 +15,25 @@ import (
|
|||||||
|
|
||||||
// This is a compile-time assertion to ensure that this generated file
|
// This is a compile-time assertion to ensure that this generated file
|
||||||
// is compatible with the grpc package it is being compiled against.
|
// is compatible with the grpc package it is being compiled against.
|
||||||
// Requires gRPC-Go v1.64.0 or later.
|
// Requires gRPC-Go v1.32.0 or later.
|
||||||
const _ = grpc.SupportPackageIsVersion9
|
const _ = grpc.SupportPackageIsVersion7
|
||||||
|
|
||||||
const (
|
const (
|
||||||
Msg_ExecuteTx_FullMethodName = "/did.v1.Msg/ExecuteTx"
|
Msg_ExecuteTx_FullMethodName = "/did.v1.Msg/ExecuteTx"
|
||||||
Msg_LinkAssertion_FullMethodName = "/did.v1.Msg/LinkAssertion"
|
Msg_RegisterController_FullMethodName = "/did.v1.Msg/RegisterController"
|
||||||
Msg_LinkAuthentication_FullMethodName = "/did.v1.Msg/LinkAuthentication"
|
|
||||||
Msg_UnlinkAssertion_FullMethodName = "/did.v1.Msg/UnlinkAssertion"
|
|
||||||
Msg_UnlinkAuthentication_FullMethodName = "/did.v1.Msg/UnlinkAuthentication"
|
|
||||||
Msg_UpdateParams_FullMethodName = "/did.v1.Msg/UpdateParams"
|
Msg_UpdateParams_FullMethodName = "/did.v1.Msg/UpdateParams"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MsgClient is the client API for Msg service.
|
// MsgClient is the client API for Msg service.
|
||||||
//
|
//
|
||||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||||
//
|
|
||||||
// Msg defines the Msg service.
|
|
||||||
type MsgClient interface {
|
type MsgClient interface {
|
||||||
// ExecuteTx executes a transaction on the Sonr Blockchain. It leverages
|
// ExecuteTx executes a transaction on the Sonr Blockchain. It leverages
|
||||||
// Macaroon for verification.
|
// Macaroon for verification.
|
||||||
ExecuteTx(ctx context.Context, in *MsgExecuteTx, opts ...grpc.CallOption) (*MsgExecuteTxResponse, error)
|
ExecuteTx(ctx context.Context, in *MsgExecuteTx, opts ...grpc.CallOption) (*MsgExecuteTxResponse, error)
|
||||||
// LinkAssertion links an assertion to a controller.
|
// RegisterController initializes a controller with the given authentication
|
||||||
LinkAssertion(ctx context.Context, in *MsgLinkAssertion, opts ...grpc.CallOption) (*MsgLinkAssertionResponse, error)
|
// set, address, cid, publicKey, and user-defined alias.
|
||||||
// LinkAuthentication links an authentication to a controller.
|
RegisterController(ctx context.Context, in *MsgRegisterController, opts ...grpc.CallOption) (*MsgRegisterControllerResponse, error)
|
||||||
LinkAuthentication(ctx context.Context, in *MsgLinkAuthentication, opts ...grpc.CallOption) (*MsgLinkAuthenticationResponse, error)
|
|
||||||
// UnlinkAssertion unlinks an assertion from a controller.
|
|
||||||
UnlinkAssertion(ctx context.Context, in *MsgUnlinkAssertion, opts ...grpc.CallOption) (*MsgUnlinkAssertionResponse, error)
|
|
||||||
// UnlinkAuthentication unlinks an authentication from a controller.
|
|
||||||
UnlinkAuthentication(ctx context.Context, in *MsgUnlinkAuthentication, opts ...grpc.CallOption) (*MsgUnlinkAuthenticationResponse, error)
|
|
||||||
// UpdateParams defines a governance operation for updating the parameters.
|
// UpdateParams defines a governance operation for updating the parameters.
|
||||||
UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error)
|
UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error)
|
||||||
}
|
}
|
||||||
@@ -57,49 +47,17 @@ func NewMsgClient(cc grpc.ClientConnInterface) MsgClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *msgClient) ExecuteTx(ctx context.Context, in *MsgExecuteTx, opts ...grpc.CallOption) (*MsgExecuteTxResponse, error) {
|
func (c *msgClient) ExecuteTx(ctx context.Context, in *MsgExecuteTx, opts ...grpc.CallOption) (*MsgExecuteTxResponse, error) {
|
||||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
||||||
out := new(MsgExecuteTxResponse)
|
out := new(MsgExecuteTxResponse)
|
||||||
err := c.cc.Invoke(ctx, Msg_ExecuteTx_FullMethodName, in, out, cOpts...)
|
err := c.cc.Invoke(ctx, Msg_ExecuteTx_FullMethodName, in, out, opts...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *msgClient) LinkAssertion(ctx context.Context, in *MsgLinkAssertion, opts ...grpc.CallOption) (*MsgLinkAssertionResponse, error) {
|
func (c *msgClient) RegisterController(ctx context.Context, in *MsgRegisterController, opts ...grpc.CallOption) (*MsgRegisterControllerResponse, error) {
|
||||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
out := new(MsgRegisterControllerResponse)
|
||||||
out := new(MsgLinkAssertionResponse)
|
err := c.cc.Invoke(ctx, Msg_RegisterController_FullMethodName, in, out, opts...)
|
||||||
err := c.cc.Invoke(ctx, Msg_LinkAssertion_FullMethodName, in, out, cOpts...)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return out, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *msgClient) LinkAuthentication(ctx context.Context, in *MsgLinkAuthentication, opts ...grpc.CallOption) (*MsgLinkAuthenticationResponse, error) {
|
|
||||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
||||||
out := new(MsgLinkAuthenticationResponse)
|
|
||||||
err := c.cc.Invoke(ctx, Msg_LinkAuthentication_FullMethodName, in, out, cOpts...)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return out, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *msgClient) UnlinkAssertion(ctx context.Context, in *MsgUnlinkAssertion, opts ...grpc.CallOption) (*MsgUnlinkAssertionResponse, error) {
|
|
||||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
||||||
out := new(MsgUnlinkAssertionResponse)
|
|
||||||
err := c.cc.Invoke(ctx, Msg_UnlinkAssertion_FullMethodName, in, out, cOpts...)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return out, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *msgClient) UnlinkAuthentication(ctx context.Context, in *MsgUnlinkAuthentication, opts ...grpc.CallOption) (*MsgUnlinkAuthenticationResponse, error) {
|
|
||||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
||||||
out := new(MsgUnlinkAuthenticationResponse)
|
|
||||||
err := c.cc.Invoke(ctx, Msg_UnlinkAuthentication_FullMethodName, in, out, cOpts...)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -107,9 +65,8 @@ func (c *msgClient) UnlinkAuthentication(ctx context.Context, in *MsgUnlinkAuthe
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) {
|
func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) {
|
||||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
||||||
out := new(MsgUpdateParamsResponse)
|
out := new(MsgUpdateParamsResponse)
|
||||||
err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, cOpts...)
|
err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, opts...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -118,53 +75,33 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts
|
|||||||
|
|
||||||
// MsgServer is the server API for Msg service.
|
// MsgServer is the server API for Msg service.
|
||||||
// All implementations must embed UnimplementedMsgServer
|
// All implementations must embed UnimplementedMsgServer
|
||||||
// for forward compatibility.
|
// for forward compatibility
|
||||||
//
|
|
||||||
// Msg defines the Msg service.
|
|
||||||
type MsgServer interface {
|
type MsgServer interface {
|
||||||
// ExecuteTx executes a transaction on the Sonr Blockchain. It leverages
|
// ExecuteTx executes a transaction on the Sonr Blockchain. It leverages
|
||||||
// Macaroon for verification.
|
// Macaroon for verification.
|
||||||
ExecuteTx(context.Context, *MsgExecuteTx) (*MsgExecuteTxResponse, error)
|
ExecuteTx(context.Context, *MsgExecuteTx) (*MsgExecuteTxResponse, error)
|
||||||
// LinkAssertion links an assertion to a controller.
|
// RegisterController initializes a controller with the given authentication
|
||||||
LinkAssertion(context.Context, *MsgLinkAssertion) (*MsgLinkAssertionResponse, error)
|
// set, address, cid, publicKey, and user-defined alias.
|
||||||
// LinkAuthentication links an authentication to a controller.
|
RegisterController(context.Context, *MsgRegisterController) (*MsgRegisterControllerResponse, error)
|
||||||
LinkAuthentication(context.Context, *MsgLinkAuthentication) (*MsgLinkAuthenticationResponse, error)
|
|
||||||
// UnlinkAssertion unlinks an assertion from a controller.
|
|
||||||
UnlinkAssertion(context.Context, *MsgUnlinkAssertion) (*MsgUnlinkAssertionResponse, error)
|
|
||||||
// UnlinkAuthentication unlinks an authentication from a controller.
|
|
||||||
UnlinkAuthentication(context.Context, *MsgUnlinkAuthentication) (*MsgUnlinkAuthenticationResponse, error)
|
|
||||||
// UpdateParams defines a governance operation for updating the parameters.
|
// UpdateParams defines a governance operation for updating the parameters.
|
||||||
UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
|
UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
|
||||||
mustEmbedUnimplementedMsgServer()
|
mustEmbedUnimplementedMsgServer()
|
||||||
}
|
}
|
||||||
|
|
||||||
// UnimplementedMsgServer must be embedded to have
|
// UnimplementedMsgServer must be embedded to have forward compatible implementations.
|
||||||
// forward compatible implementations.
|
type UnimplementedMsgServer struct {
|
||||||
//
|
}
|
||||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
|
||||||
// pointer dereference when methods are called.
|
|
||||||
type UnimplementedMsgServer struct{}
|
|
||||||
|
|
||||||
func (UnimplementedMsgServer) ExecuteTx(context.Context, *MsgExecuteTx) (*MsgExecuteTxResponse, error) {
|
func (UnimplementedMsgServer) ExecuteTx(context.Context, *MsgExecuteTx) (*MsgExecuteTxResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method ExecuteTx not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method ExecuteTx not implemented")
|
||||||
}
|
}
|
||||||
func (UnimplementedMsgServer) LinkAssertion(context.Context, *MsgLinkAssertion) (*MsgLinkAssertionResponse, error) {
|
func (UnimplementedMsgServer) RegisterController(context.Context, *MsgRegisterController) (*MsgRegisterControllerResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method LinkAssertion not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method RegisterController not implemented")
|
||||||
}
|
|
||||||
func (UnimplementedMsgServer) LinkAuthentication(context.Context, *MsgLinkAuthentication) (*MsgLinkAuthenticationResponse, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method LinkAuthentication not implemented")
|
|
||||||
}
|
|
||||||
func (UnimplementedMsgServer) UnlinkAssertion(context.Context, *MsgUnlinkAssertion) (*MsgUnlinkAssertionResponse, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method UnlinkAssertion not implemented")
|
|
||||||
}
|
|
||||||
func (UnimplementedMsgServer) UnlinkAuthentication(context.Context, *MsgUnlinkAuthentication) (*MsgUnlinkAuthenticationResponse, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method UnlinkAuthentication not implemented")
|
|
||||||
}
|
}
|
||||||
func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) {
|
func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented")
|
||||||
}
|
}
|
||||||
func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {}
|
func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {}
|
||||||
func (UnimplementedMsgServer) testEmbeddedByValue() {}
|
|
||||||
|
|
||||||
// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service.
|
// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service.
|
||||||
// Use of this interface is not recommended, as added methods to MsgServer will
|
// Use of this interface is not recommended, as added methods to MsgServer will
|
||||||
@@ -174,13 +111,6 @@ type UnsafeMsgServer interface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) {
|
func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) {
|
||||||
// If the following call pancis, it indicates UnimplementedMsgServer was
|
|
||||||
// embedded by pointer and is nil. This will cause panics if an
|
|
||||||
// unimplemented method is ever invoked, so we test this at initialization
|
|
||||||
// time to prevent it from happening at runtime later due to I/O.
|
|
||||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
|
||||||
t.testEmbeddedByValue()
|
|
||||||
}
|
|
||||||
s.RegisterService(&Msg_ServiceDesc, srv)
|
s.RegisterService(&Msg_ServiceDesc, srv)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -202,74 +132,20 @@ func _Msg_ExecuteTx_Handler(srv interface{}, ctx context.Context, dec func(inter
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
func _Msg_LinkAssertion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
func _Msg_RegisterController_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(MsgLinkAssertion)
|
in := new(MsgRegisterController)
|
||||||
if err := dec(in); err != nil {
|
if err := dec(in); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if interceptor == nil {
|
if interceptor == nil {
|
||||||
return srv.(MsgServer).LinkAssertion(ctx, in)
|
return srv.(MsgServer).RegisterController(ctx, in)
|
||||||
}
|
}
|
||||||
info := &grpc.UnaryServerInfo{
|
info := &grpc.UnaryServerInfo{
|
||||||
Server: srv,
|
Server: srv,
|
||||||
FullMethod: Msg_LinkAssertion_FullMethodName,
|
FullMethod: Msg_RegisterController_FullMethodName,
|
||||||
}
|
}
|
||||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
return srv.(MsgServer).LinkAssertion(ctx, req.(*MsgLinkAssertion))
|
return srv.(MsgServer).RegisterController(ctx, req.(*MsgRegisterController))
|
||||||
}
|
|
||||||
return interceptor(ctx, in, info, handler)
|
|
||||||
}
|
|
||||||
|
|
||||||
func _Msg_LinkAuthentication_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(MsgLinkAuthentication)
|
|
||||||
if err := dec(in); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if interceptor == nil {
|
|
||||||
return srv.(MsgServer).LinkAuthentication(ctx, in)
|
|
||||||
}
|
|
||||||
info := &grpc.UnaryServerInfo{
|
|
||||||
Server: srv,
|
|
||||||
FullMethod: Msg_LinkAuthentication_FullMethodName,
|
|
||||||
}
|
|
||||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
||||||
return srv.(MsgServer).LinkAuthentication(ctx, req.(*MsgLinkAuthentication))
|
|
||||||
}
|
|
||||||
return interceptor(ctx, in, info, handler)
|
|
||||||
}
|
|
||||||
|
|
||||||
func _Msg_UnlinkAssertion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(MsgUnlinkAssertion)
|
|
||||||
if err := dec(in); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if interceptor == nil {
|
|
||||||
return srv.(MsgServer).UnlinkAssertion(ctx, in)
|
|
||||||
}
|
|
||||||
info := &grpc.UnaryServerInfo{
|
|
||||||
Server: srv,
|
|
||||||
FullMethod: Msg_UnlinkAssertion_FullMethodName,
|
|
||||||
}
|
|
||||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
||||||
return srv.(MsgServer).UnlinkAssertion(ctx, req.(*MsgUnlinkAssertion))
|
|
||||||
}
|
|
||||||
return interceptor(ctx, in, info, handler)
|
|
||||||
}
|
|
||||||
|
|
||||||
func _Msg_UnlinkAuthentication_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(MsgUnlinkAuthentication)
|
|
||||||
if err := dec(in); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if interceptor == nil {
|
|
||||||
return srv.(MsgServer).UnlinkAuthentication(ctx, in)
|
|
||||||
}
|
|
||||||
info := &grpc.UnaryServerInfo{
|
|
||||||
Server: srv,
|
|
||||||
FullMethod: Msg_UnlinkAuthentication_FullMethodName,
|
|
||||||
}
|
|
||||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
||||||
return srv.(MsgServer).UnlinkAuthentication(ctx, req.(*MsgUnlinkAuthentication))
|
|
||||||
}
|
}
|
||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
@@ -304,20 +180,8 @@ var Msg_ServiceDesc = grpc.ServiceDesc{
|
|||||||
Handler: _Msg_ExecuteTx_Handler,
|
Handler: _Msg_ExecuteTx_Handler,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
MethodName: "LinkAssertion",
|
MethodName: "RegisterController",
|
||||||
Handler: _Msg_LinkAssertion_Handler,
|
Handler: _Msg_RegisterController_Handler,
|
||||||
},
|
|
||||||
{
|
|
||||||
MethodName: "LinkAuthentication",
|
|
||||||
Handler: _Msg_LinkAuthentication_Handler,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MethodName: "UnlinkAssertion",
|
|
||||||
Handler: _Msg_UnlinkAssertion_Handler,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MethodName: "UnlinkAuthentication",
|
|
||||||
Handler: _Msg_UnlinkAuthentication_Handler,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
MethodName: "UpdateParams",
|
MethodName: "UpdateParams",
|
||||||
|
|||||||
@@ -1,292 +0,0 @@
|
|||||||
// Code generated by protoc-gen-go-cosmos-orm. DO NOT EDIT.
|
|
||||||
|
|
||||||
package dwnv1
|
|
||||||
|
|
||||||
import (
|
|
||||||
context "context"
|
|
||||||
ormlist "cosmossdk.io/orm/model/ormlist"
|
|
||||||
ormtable "cosmossdk.io/orm/model/ormtable"
|
|
||||||
ormerrors "cosmossdk.io/orm/types/ormerrors"
|
|
||||||
)
|
|
||||||
|
|
||||||
type CredentialTable interface {
|
|
||||||
Insert(ctx context.Context, credential *Credential) error
|
|
||||||
Update(ctx context.Context, credential *Credential) error
|
|
||||||
Save(ctx context.Context, credential *Credential) error
|
|
||||||
Delete(ctx context.Context, credential *Credential) error
|
|
||||||
Has(ctx context.Context, id []byte) (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 []byte) (*Credential, error)
|
|
||||||
List(ctx context.Context, prefixKey CredentialIndexKey, opts ...ormlist.Option) (CredentialIterator, error)
|
|
||||||
ListRange(ctx context.Context, from, to CredentialIndexKey, opts ...ormlist.Option) (CredentialIterator, error)
|
|
||||||
DeleteBy(ctx context.Context, prefixKey CredentialIndexKey) error
|
|
||||||
DeleteRange(ctx context.Context, from, to CredentialIndexKey) error
|
|
||||||
|
|
||||||
doNotImplement()
|
|
||||||
}
|
|
||||||
|
|
||||||
type CredentialIterator struct {
|
|
||||||
ormtable.Iterator
|
|
||||||
}
|
|
||||||
|
|
||||||
func (i CredentialIterator) Value() (*Credential, error) {
|
|
||||||
var credential Credential
|
|
||||||
err := i.UnmarshalMessage(&credential)
|
|
||||||
return &credential, err
|
|
||||||
}
|
|
||||||
|
|
||||||
type CredentialIndexKey interface {
|
|
||||||
id() uint32
|
|
||||||
values() []interface{}
|
|
||||||
credentialIndexKey()
|
|
||||||
}
|
|
||||||
|
|
||||||
// primary key starting index..
|
|
||||||
type CredentialPrimaryKey = CredentialIdIndexKey
|
|
||||||
|
|
||||||
type CredentialIdIndexKey struct {
|
|
||||||
vs []interface{}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x CredentialIdIndexKey) id() uint32 { return 0 }
|
|
||||||
func (x CredentialIdIndexKey) values() []interface{} { return x.vs }
|
|
||||||
func (x CredentialIdIndexKey) credentialIndexKey() {}
|
|
||||||
|
|
||||||
func (this CredentialIdIndexKey) WithId(id []byte) CredentialIdIndexKey {
|
|
||||||
this.vs = []interface{}{id}
|
|
||||||
return this
|
|
||||||
}
|
|
||||||
|
|
||||||
type credentialTable struct {
|
|
||||||
table ormtable.Table
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this credentialTable) Insert(ctx context.Context, credential *Credential) error {
|
|
||||||
return this.table.Insert(ctx, credential)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this credentialTable) Update(ctx context.Context, credential *Credential) error {
|
|
||||||
return this.table.Update(ctx, credential)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this credentialTable) Save(ctx context.Context, credential *Credential) error {
|
|
||||||
return this.table.Save(ctx, credential)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this credentialTable) Delete(ctx context.Context, credential *Credential) error {
|
|
||||||
return this.table.Delete(ctx, credential)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this credentialTable) Has(ctx context.Context, id []byte) (found bool, err error) {
|
|
||||||
return this.table.PrimaryKey().Has(ctx, id)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this credentialTable) Get(ctx context.Context, id []byte) (*Credential, error) {
|
|
||||||
var credential Credential
|
|
||||||
found, err := this.table.PrimaryKey().Get(ctx, &credential, id)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if !found {
|
|
||||||
return nil, ormerrors.NotFound
|
|
||||||
}
|
|
||||||
return &credential, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this credentialTable) List(ctx context.Context, prefixKey CredentialIndexKey, opts ...ormlist.Option) (CredentialIterator, error) {
|
|
||||||
it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...)
|
|
||||||
return CredentialIterator{it}, err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this credentialTable) ListRange(ctx context.Context, from, to CredentialIndexKey, opts ...ormlist.Option) (CredentialIterator, error) {
|
|
||||||
it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...)
|
|
||||||
return CredentialIterator{it}, err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this credentialTable) DeleteBy(ctx context.Context, prefixKey CredentialIndexKey) error {
|
|
||||||
return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this credentialTable) DeleteRange(ctx context.Context, from, to CredentialIndexKey) error {
|
|
||||||
return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values())
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this credentialTable) doNotImplement() {}
|
|
||||||
|
|
||||||
var _ CredentialTable = credentialTable{}
|
|
||||||
|
|
||||||
func NewCredentialTable(db ormtable.Schema) (CredentialTable, error) {
|
|
||||||
table := db.GetTable(&Credential{})
|
|
||||||
if table == nil {
|
|
||||||
return nil, ormerrors.TableNotFound.Wrap(string((&Credential{}).ProtoReflect().Descriptor().FullName()))
|
|
||||||
}
|
|
||||||
return credentialTable{table}, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
type ProfileTable interface {
|
|
||||||
Insert(ctx context.Context, profile *Profile) error
|
|
||||||
Update(ctx context.Context, profile *Profile) error
|
|
||||||
Save(ctx context.Context, profile *Profile) error
|
|
||||||
Delete(ctx context.Context, profile *Profile) error
|
|
||||||
Has(ctx context.Context, account []byte) (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, account []byte) (*Profile, error)
|
|
||||||
List(ctx context.Context, prefixKey ProfileIndexKey, opts ...ormlist.Option) (ProfileIterator, error)
|
|
||||||
ListRange(ctx context.Context, from, to ProfileIndexKey, opts ...ormlist.Option) (ProfileIterator, error)
|
|
||||||
DeleteBy(ctx context.Context, prefixKey ProfileIndexKey) error
|
|
||||||
DeleteRange(ctx context.Context, from, to ProfileIndexKey) error
|
|
||||||
|
|
||||||
doNotImplement()
|
|
||||||
}
|
|
||||||
|
|
||||||
type ProfileIterator struct {
|
|
||||||
ormtable.Iterator
|
|
||||||
}
|
|
||||||
|
|
||||||
func (i ProfileIterator) Value() (*Profile, error) {
|
|
||||||
var profile Profile
|
|
||||||
err := i.UnmarshalMessage(&profile)
|
|
||||||
return &profile, err
|
|
||||||
}
|
|
||||||
|
|
||||||
type ProfileIndexKey interface {
|
|
||||||
id() uint32
|
|
||||||
values() []interface{}
|
|
||||||
profileIndexKey()
|
|
||||||
}
|
|
||||||
|
|
||||||
// primary key starting index..
|
|
||||||
type ProfilePrimaryKey = ProfileAccountIndexKey
|
|
||||||
|
|
||||||
type ProfileAccountIndexKey struct {
|
|
||||||
vs []interface{}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x ProfileAccountIndexKey) id() uint32 { return 0 }
|
|
||||||
func (x ProfileAccountIndexKey) values() []interface{} { return x.vs }
|
|
||||||
func (x ProfileAccountIndexKey) profileIndexKey() {}
|
|
||||||
|
|
||||||
func (this ProfileAccountIndexKey) WithAccount(account []byte) ProfileAccountIndexKey {
|
|
||||||
this.vs = []interface{}{account}
|
|
||||||
return this
|
|
||||||
}
|
|
||||||
|
|
||||||
type ProfileAmountIndexKey struct {
|
|
||||||
vs []interface{}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x ProfileAmountIndexKey) id() uint32 { return 1 }
|
|
||||||
func (x ProfileAmountIndexKey) values() []interface{} { return x.vs }
|
|
||||||
func (x ProfileAmountIndexKey) profileIndexKey() {}
|
|
||||||
|
|
||||||
func (this ProfileAmountIndexKey) WithAmount(amount uint64) ProfileAmountIndexKey {
|
|
||||||
this.vs = []interface{}{amount}
|
|
||||||
return this
|
|
||||||
}
|
|
||||||
|
|
||||||
type profileTable struct {
|
|
||||||
table ormtable.Table
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this profileTable) Insert(ctx context.Context, profile *Profile) error {
|
|
||||||
return this.table.Insert(ctx, profile)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this profileTable) Update(ctx context.Context, profile *Profile) error {
|
|
||||||
return this.table.Update(ctx, profile)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this profileTable) Save(ctx context.Context, profile *Profile) error {
|
|
||||||
return this.table.Save(ctx, profile)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this profileTable) Delete(ctx context.Context, profile *Profile) error {
|
|
||||||
return this.table.Delete(ctx, profile)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this profileTable) Has(ctx context.Context, account []byte) (found bool, err error) {
|
|
||||||
return this.table.PrimaryKey().Has(ctx, account)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this profileTable) Get(ctx context.Context, account []byte) (*Profile, error) {
|
|
||||||
var profile Profile
|
|
||||||
found, err := this.table.PrimaryKey().Get(ctx, &profile, account)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if !found {
|
|
||||||
return nil, ormerrors.NotFound
|
|
||||||
}
|
|
||||||
return &profile, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this profileTable) List(ctx context.Context, prefixKey ProfileIndexKey, opts ...ormlist.Option) (ProfileIterator, error) {
|
|
||||||
it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...)
|
|
||||||
return ProfileIterator{it}, err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this profileTable) ListRange(ctx context.Context, from, to ProfileIndexKey, opts ...ormlist.Option) (ProfileIterator, error) {
|
|
||||||
it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...)
|
|
||||||
return ProfileIterator{it}, err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this profileTable) DeleteBy(ctx context.Context, prefixKey ProfileIndexKey) error {
|
|
||||||
return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this profileTable) DeleteRange(ctx context.Context, from, to ProfileIndexKey) error {
|
|
||||||
return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values())
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this profileTable) doNotImplement() {}
|
|
||||||
|
|
||||||
var _ ProfileTable = profileTable{}
|
|
||||||
|
|
||||||
func NewProfileTable(db ormtable.Schema) (ProfileTable, error) {
|
|
||||||
table := db.GetTable(&Profile{})
|
|
||||||
if table == nil {
|
|
||||||
return nil, ormerrors.TableNotFound.Wrap(string((&Profile{}).ProtoReflect().Descriptor().FullName()))
|
|
||||||
}
|
|
||||||
return profileTable{table}, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
type StateStore interface {
|
|
||||||
CredentialTable() CredentialTable
|
|
||||||
ProfileTable() ProfileTable
|
|
||||||
|
|
||||||
doNotImplement()
|
|
||||||
}
|
|
||||||
|
|
||||||
type stateStore struct {
|
|
||||||
credential CredentialTable
|
|
||||||
profile ProfileTable
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x stateStore) CredentialTable() CredentialTable {
|
|
||||||
return x.credential
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x stateStore) ProfileTable() ProfileTable {
|
|
||||||
return x.profile
|
|
||||||
}
|
|
||||||
|
|
||||||
func (stateStore) doNotImplement() {}
|
|
||||||
|
|
||||||
var _ StateStore = stateStore{}
|
|
||||||
|
|
||||||
func NewStateStore(db ormtable.Schema) (StateStore, error) {
|
|
||||||
credentialTable, err := NewCredentialTable(db)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
profileTable, err := NewProfileTable(db)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
return stateStore{
|
|
||||||
credentialTable,
|
|
||||||
profileTable,
|
|
||||||
}, nil
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,501 @@
|
|||||||
|
// Code generated by protoc-gen-go-pulsar. DO NOT EDIT.
|
||||||
|
package modulev1
|
||||||
|
|
||||||
|
import (
|
||||||
|
_ "cosmossdk.io/api/cosmos/app/v1alpha1"
|
||||||
|
fmt "fmt"
|
||||||
|
runtime "github.com/cosmos/cosmos-proto/runtime"
|
||||||
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
|
protoiface "google.golang.org/protobuf/runtime/protoiface"
|
||||||
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||||
|
io "io"
|
||||||
|
reflect "reflect"
|
||||||
|
sync "sync"
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
md_Module protoreflect.MessageDescriptor
|
||||||
|
)
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
file_macaroon_module_v1_module_proto_init()
|
||||||
|
md_Module = File_macaroon_module_v1_module_proto.Messages().ByName("Module")
|
||||||
|
}
|
||||||
|
|
||||||
|
var _ protoreflect.Message = (*fastReflection_Module)(nil)
|
||||||
|
|
||||||
|
type fastReflection_Module Module
|
||||||
|
|
||||||
|
func (x *Module) ProtoReflect() protoreflect.Message {
|
||||||
|
return (*fastReflection_Module)(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *Module) slowProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_macaroon_module_v1_module_proto_msgTypes[0]
|
||||||
|
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_Module_messageType fastReflection_Module_messageType
|
||||||
|
var _ protoreflect.MessageType = fastReflection_Module_messageType{}
|
||||||
|
|
||||||
|
type fastReflection_Module_messageType struct{}
|
||||||
|
|
||||||
|
func (x fastReflection_Module_messageType) Zero() protoreflect.Message {
|
||||||
|
return (*fastReflection_Module)(nil)
|
||||||
|
}
|
||||||
|
func (x fastReflection_Module_messageType) New() protoreflect.Message {
|
||||||
|
return new(fastReflection_Module)
|
||||||
|
}
|
||||||
|
func (x fastReflection_Module_messageType) Descriptor() protoreflect.MessageDescriptor {
|
||||||
|
return md_Module
|
||||||
|
}
|
||||||
|
|
||||||
|
// Descriptor returns message descriptor, which contains only the protobuf
|
||||||
|
// type information for the message.
|
||||||
|
func (x *fastReflection_Module) Descriptor() protoreflect.MessageDescriptor {
|
||||||
|
return md_Module
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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_Module) Type() protoreflect.MessageType {
|
||||||
|
return _fastReflection_Module_messageType
|
||||||
|
}
|
||||||
|
|
||||||
|
// New returns a newly allocated and mutable empty message.
|
||||||
|
func (x *fastReflection_Module) New() protoreflect.Message {
|
||||||
|
return new(fastReflection_Module)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Interface unwraps the message reflection interface and
|
||||||
|
// returns the underlying ProtoMessage interface.
|
||||||
|
func (x *fastReflection_Module) Interface() protoreflect.ProtoMessage {
|
||||||
|
return (*Module)(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_Module) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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_Module) Has(fd protoreflect.FieldDescriptor) bool {
|
||||||
|
switch fd.FullName() {
|
||||||
|
default:
|
||||||
|
if fd.IsExtension() {
|
||||||
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.module.v1.Module"))
|
||||||
|
}
|
||||||
|
panic(fmt.Errorf("message macaroon.module.v1.Module 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_Module) Clear(fd protoreflect.FieldDescriptor) {
|
||||||
|
switch fd.FullName() {
|
||||||
|
default:
|
||||||
|
if fd.IsExtension() {
|
||||||
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.module.v1.Module"))
|
||||||
|
}
|
||||||
|
panic(fmt.Errorf("message macaroon.module.v1.Module 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_Module) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
|
||||||
|
switch descriptor.FullName() {
|
||||||
|
default:
|
||||||
|
if descriptor.IsExtension() {
|
||||||
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.module.v1.Module"))
|
||||||
|
}
|
||||||
|
panic(fmt.Errorf("message macaroon.module.v1.Module 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_Module) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
|
||||||
|
switch fd.FullName() {
|
||||||
|
default:
|
||||||
|
if fd.IsExtension() {
|
||||||
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.module.v1.Module"))
|
||||||
|
}
|
||||||
|
panic(fmt.Errorf("message macaroon.module.v1.Module 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_Module) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||||
|
switch fd.FullName() {
|
||||||
|
default:
|
||||||
|
if fd.IsExtension() {
|
||||||
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.module.v1.Module"))
|
||||||
|
}
|
||||||
|
panic(fmt.Errorf("message macaroon.module.v1.Module 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_Module) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||||
|
switch fd.FullName() {
|
||||||
|
default:
|
||||||
|
if fd.IsExtension() {
|
||||||
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.module.v1.Module"))
|
||||||
|
}
|
||||||
|
panic(fmt.Errorf("message macaroon.module.v1.Module 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_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
||||||
|
switch d.FullName() {
|
||||||
|
default:
|
||||||
|
panic(fmt.Errorf("%s is not a oneof field in macaroon.module.v1.Module", 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_Module) 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_Module) 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_Module) 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_Module) ProtoMethods() *protoiface.Methods {
|
||||||
|
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
|
||||||
|
x := input.Message.Interface().(*Module)
|
||||||
|
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.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().(*Module)
|
||||||
|
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 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().(*Module)
|
||||||
|
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: Module: wiretype end group for non-group")
|
||||||
|
}
|
||||||
|
if fieldNum <= 0 {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||||
|
}
|
||||||
|
switch fieldNum {
|
||||||
|
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
|
||||||
|
// protoc (unknown)
|
||||||
|
// source: macaroon/module/v1/module.proto
|
||||||
|
|
||||||
|
const (
|
||||||
|
// Verify that this generated code is sufficiently up-to-date.
|
||||||
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||||
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||||
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||||
|
)
|
||||||
|
|
||||||
|
// Module is the app config object of the module.
|
||||||
|
// Learn more: https://docs.cosmos.network/main/building-modules/depinject
|
||||||
|
type Module struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *Module) Reset() {
|
||||||
|
*x = Module{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_macaroon_module_v1_module_proto_msgTypes[0]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *Module) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*Module) ProtoMessage() {}
|
||||||
|
|
||||||
|
// Deprecated: Use Module.ProtoReflect.Descriptor instead.
|
||||||
|
func (*Module) Descriptor() ([]byte, []int) {
|
||||||
|
return file_macaroon_module_v1_module_proto_rawDescGZIP(), []int{0}
|
||||||
|
}
|
||||||
|
|
||||||
|
var File_macaroon_module_v1_module_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
|
var file_macaroon_module_v1_module_proto_rawDesc = []byte{
|
||||||
|
0x0a, 0x1f, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c,
|
||||||
|
0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||||
|
0x6f, 0x12, 0x12, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2e, 0x6d, 0x6f, 0x64, 0x75,
|
||||||
|
0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70,
|
||||||
|
0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c,
|
||||||
|
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x28, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c,
|
||||||
|
0x65, 0x3a, 0x1e, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x18, 0x0a, 0x16, 0x67, 0x69, 0x74, 0x68, 0x75,
|
||||||
|
0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e,
|
||||||
|
0x72, 0x42, 0xc7, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f,
|
||||||
|
0x6f, 0x6e, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f,
|
||||||
|
0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x36, 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, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c,
|
||||||
|
0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x4d, 0x58, 0xaa, 0x02, 0x12, 0x4d, 0x61, 0x63, 0x61,
|
||||||
|
0x72, 0x6f, 0x6f, 0x6e, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02,
|
||||||
|
0x12, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65,
|
||||||
|
0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1e, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x5c, 0x4d,
|
||||||
|
0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61,
|
||||||
|
0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x3a,
|
||||||
|
0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||||
|
0x74, 0x6f, 0x33,
|
||||||
|
}
|
||||||
|
|
||||||
|
var (
|
||||||
|
file_macaroon_module_v1_module_proto_rawDescOnce sync.Once
|
||||||
|
file_macaroon_module_v1_module_proto_rawDescData = file_macaroon_module_v1_module_proto_rawDesc
|
||||||
|
)
|
||||||
|
|
||||||
|
func file_macaroon_module_v1_module_proto_rawDescGZIP() []byte {
|
||||||
|
file_macaroon_module_v1_module_proto_rawDescOnce.Do(func() {
|
||||||
|
file_macaroon_module_v1_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_macaroon_module_v1_module_proto_rawDescData)
|
||||||
|
})
|
||||||
|
return file_macaroon_module_v1_module_proto_rawDescData
|
||||||
|
}
|
||||||
|
|
||||||
|
var file_macaroon_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||||
|
var file_macaroon_module_v1_module_proto_goTypes = []interface{}{
|
||||||
|
(*Module)(nil), // 0: macaroon.module.v1.Module
|
||||||
|
}
|
||||||
|
var file_macaroon_module_v1_module_proto_depIdxs = []int32{
|
||||||
|
0, // [0:0] is the sub-list for method output_type
|
||||||
|
0, // [0:0] is the sub-list for method input_type
|
||||||
|
0, // [0:0] is the sub-list for extension type_name
|
||||||
|
0, // [0:0] is the sub-list for extension extendee
|
||||||
|
0, // [0:0] is the sub-list for field type_name
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() { file_macaroon_module_v1_module_proto_init() }
|
||||||
|
func file_macaroon_module_v1_module_proto_init() {
|
||||||
|
if File_macaroon_module_v1_module_proto != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if !protoimpl.UnsafeEnabled {
|
||||||
|
file_macaroon_module_v1_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*Module); 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{
|
||||||
|
File: protoimpl.DescBuilder{
|
||||||
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
|
RawDescriptor: file_macaroon_module_v1_module_proto_rawDesc,
|
||||||
|
NumEnums: 0,
|
||||||
|
NumMessages: 1,
|
||||||
|
NumExtensions: 0,
|
||||||
|
NumServices: 0,
|
||||||
|
},
|
||||||
|
GoTypes: file_macaroon_module_v1_module_proto_goTypes,
|
||||||
|
DependencyIndexes: file_macaroon_module_v1_module_proto_depIdxs,
|
||||||
|
MessageInfos: file_macaroon_module_v1_module_proto_msgTypes,
|
||||||
|
}.Build()
|
||||||
|
File_macaroon_module_v1_module_proto = out.File
|
||||||
|
file_macaroon_module_v1_module_proto_rawDesc = nil
|
||||||
|
file_macaroon_module_v1_module_proto_goTypes = nil
|
||||||
|
file_macaroon_module_v1_module_proto_depIdxs = nil
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,189 @@
|
|||||||
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// - protoc-gen-go-grpc v1.3.0
|
||||||
|
// - protoc (unknown)
|
||||||
|
// source: macaroon/v1/query.proto
|
||||||
|
|
||||||
|
package macaroonv1
|
||||||
|
|
||||||
|
import (
|
||||||
|
context "context"
|
||||||
|
grpc "google.golang.org/grpc"
|
||||||
|
codes "google.golang.org/grpc/codes"
|
||||||
|
status "google.golang.org/grpc/status"
|
||||||
|
)
|
||||||
|
|
||||||
|
// This is a compile-time assertion to ensure that this generated file
|
||||||
|
// is compatible with the grpc package it is being compiled against.
|
||||||
|
// Requires gRPC-Go v1.32.0 or later.
|
||||||
|
const _ = grpc.SupportPackageIsVersion7
|
||||||
|
|
||||||
|
const (
|
||||||
|
Query_Params_FullMethodName = "/macaroon.v1.Query/Params"
|
||||||
|
Query_RefreshToken_FullMethodName = "/macaroon.v1.Query/RefreshToken"
|
||||||
|
Query_ValidateToken_FullMethodName = "/macaroon.v1.Query/ValidateToken"
|
||||||
|
)
|
||||||
|
|
||||||
|
// QueryClient is the client API for Query service.
|
||||||
|
//
|
||||||
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||||
|
type QueryClient interface {
|
||||||
|
// Params queries all parameters of the module.
|
||||||
|
Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
|
||||||
|
// RefreshToken refreshes a macaroon token as post authentication.
|
||||||
|
RefreshToken(ctx context.Context, in *QueryRefreshTokenRequest, opts ...grpc.CallOption) (*QueryRefreshTokenResponse, error)
|
||||||
|
// ValidateToken validates a macaroon token as pre authentication.
|
||||||
|
ValidateToken(ctx context.Context, in *QueryValidateTokenRequest, opts ...grpc.CallOption) (*QueryValidateTokenResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
type queryClient struct {
|
||||||
|
cc grpc.ClientConnInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewQueryClient(cc grpc.ClientConnInterface) QueryClient {
|
||||||
|
return &queryClient{cc}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) {
|
||||||
|
out := new(QueryParamsResponse)
|
||||||
|
err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *queryClient) RefreshToken(ctx context.Context, in *QueryRefreshTokenRequest, opts ...grpc.CallOption) (*QueryRefreshTokenResponse, error) {
|
||||||
|
out := new(QueryRefreshTokenResponse)
|
||||||
|
err := c.cc.Invoke(ctx, Query_RefreshToken_FullMethodName, in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *queryClient) ValidateToken(ctx context.Context, in *QueryValidateTokenRequest, opts ...grpc.CallOption) (*QueryValidateTokenResponse, error) {
|
||||||
|
out := new(QueryValidateTokenResponse)
|
||||||
|
err := c.cc.Invoke(ctx, Query_ValidateToken_FullMethodName, in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// QueryServer is the server API for Query service.
|
||||||
|
// All implementations must embed UnimplementedQueryServer
|
||||||
|
// for forward compatibility
|
||||||
|
type QueryServer interface {
|
||||||
|
// Params queries all parameters of the module.
|
||||||
|
Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
|
||||||
|
// RefreshToken refreshes a macaroon token as post authentication.
|
||||||
|
RefreshToken(context.Context, *QueryRefreshTokenRequest) (*QueryRefreshTokenResponse, error)
|
||||||
|
// ValidateToken validates a macaroon token as pre authentication.
|
||||||
|
ValidateToken(context.Context, *QueryValidateTokenRequest) (*QueryValidateTokenResponse, error)
|
||||||
|
mustEmbedUnimplementedQueryServer()
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnimplementedQueryServer must be embedded to have forward compatible implementations.
|
||||||
|
type UnimplementedQueryServer struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method Params not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedQueryServer) RefreshToken(context.Context, *QueryRefreshTokenRequest) (*QueryRefreshTokenResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method RefreshToken not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedQueryServer) ValidateToken(context.Context, *QueryValidateTokenRequest) (*QueryValidateTokenResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method ValidateToken not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {}
|
||||||
|
|
||||||
|
// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service.
|
||||||
|
// Use of this interface is not recommended, as added methods to QueryServer will
|
||||||
|
// result in compilation errors.
|
||||||
|
type UnsafeQueryServer interface {
|
||||||
|
mustEmbedUnimplementedQueryServer()
|
||||||
|
}
|
||||||
|
|
||||||
|
func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) {
|
||||||
|
s.RegisterService(&Query_ServiceDesc, srv)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(QueryParamsRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(QueryServer).Params(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: Query_Params_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Query_RefreshToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(QueryRefreshTokenRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(QueryServer).RefreshToken(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: Query_RefreshToken_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(QueryServer).RefreshToken(ctx, req.(*QueryRefreshTokenRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Query_ValidateToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(QueryValidateTokenRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(QueryServer).ValidateToken(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: Query_ValidateToken_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(QueryServer).ValidateToken(ctx, req.(*QueryValidateTokenRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Query_ServiceDesc is the grpc.ServiceDesc for Query service.
|
||||||
|
// It's only intended for direct use with grpc.RegisterService,
|
||||||
|
// and not to be introspected or modified (even as a copy)
|
||||||
|
var Query_ServiceDesc = grpc.ServiceDesc{
|
||||||
|
ServiceName: "macaroon.v1.Query",
|
||||||
|
HandlerType: (*QueryServer)(nil),
|
||||||
|
Methods: []grpc.MethodDesc{
|
||||||
|
{
|
||||||
|
MethodName: "Params",
|
||||||
|
Handler: _Query_Params_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "RefreshToken",
|
||||||
|
Handler: _Query_RefreshToken_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "ValidateToken",
|
||||||
|
Handler: _Query_ValidateToken_Handler,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Streams: []grpc.StreamDesc{},
|
||||||
|
Metadata: "macaroon/v1/query.proto",
|
||||||
|
}
|
||||||
@@ -0,0 +1,206 @@
|
|||||||
|
// Code generated by protoc-gen-go-cosmos-orm. DO NOT EDIT.
|
||||||
|
|
||||||
|
package macaroonv1
|
||||||
|
|
||||||
|
import (
|
||||||
|
context "context"
|
||||||
|
ormlist "cosmossdk.io/orm/model/ormlist"
|
||||||
|
ormtable "cosmossdk.io/orm/model/ormtable"
|
||||||
|
ormerrors "cosmossdk.io/orm/types/ormerrors"
|
||||||
|
)
|
||||||
|
|
||||||
|
type GrantTable interface {
|
||||||
|
Insert(ctx context.Context, grant *Grant) error
|
||||||
|
InsertReturningId(ctx context.Context, grant *Grant) (uint64, error)
|
||||||
|
LastInsertedSequence(ctx context.Context) (uint64, error)
|
||||||
|
Update(ctx context.Context, grant *Grant) error
|
||||||
|
Save(ctx context.Context, grant *Grant) error
|
||||||
|
Delete(ctx context.Context, grant *Grant) 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) (*Grant, 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) (*Grant, error)
|
||||||
|
List(ctx context.Context, prefixKey GrantIndexKey, opts ...ormlist.Option) (GrantIterator, error)
|
||||||
|
ListRange(ctx context.Context, from, to GrantIndexKey, opts ...ormlist.Option) (GrantIterator, error)
|
||||||
|
DeleteBy(ctx context.Context, prefixKey GrantIndexKey) error
|
||||||
|
DeleteRange(ctx context.Context, from, to GrantIndexKey) error
|
||||||
|
|
||||||
|
doNotImplement()
|
||||||
|
}
|
||||||
|
|
||||||
|
type GrantIterator struct {
|
||||||
|
ormtable.Iterator
|
||||||
|
}
|
||||||
|
|
||||||
|
func (i GrantIterator) Value() (*Grant, error) {
|
||||||
|
var grant Grant
|
||||||
|
err := i.UnmarshalMessage(&grant)
|
||||||
|
return &grant, err
|
||||||
|
}
|
||||||
|
|
||||||
|
type GrantIndexKey interface {
|
||||||
|
id() uint32
|
||||||
|
values() []interface{}
|
||||||
|
grantIndexKey()
|
||||||
|
}
|
||||||
|
|
||||||
|
// primary key starting index..
|
||||||
|
type GrantPrimaryKey = GrantIdIndexKey
|
||||||
|
|
||||||
|
type GrantIdIndexKey struct {
|
||||||
|
vs []interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x GrantIdIndexKey) id() uint32 { return 0 }
|
||||||
|
func (x GrantIdIndexKey) values() []interface{} { return x.vs }
|
||||||
|
func (x GrantIdIndexKey) grantIndexKey() {}
|
||||||
|
|
||||||
|
func (this GrantIdIndexKey) WithId(id uint64) GrantIdIndexKey {
|
||||||
|
this.vs = []interface{}{id}
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
type GrantSubjectOriginIndexKey struct {
|
||||||
|
vs []interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x GrantSubjectOriginIndexKey) id() uint32 { return 1 }
|
||||||
|
func (x GrantSubjectOriginIndexKey) values() []interface{} { return x.vs }
|
||||||
|
func (x GrantSubjectOriginIndexKey) grantIndexKey() {}
|
||||||
|
|
||||||
|
func (this GrantSubjectOriginIndexKey) WithSubject(subject string) GrantSubjectOriginIndexKey {
|
||||||
|
this.vs = []interface{}{subject}
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this GrantSubjectOriginIndexKey) WithSubjectOrigin(subject string, origin string) GrantSubjectOriginIndexKey {
|
||||||
|
this.vs = []interface{}{subject, origin}
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
type grantTable struct {
|
||||||
|
table ormtable.AutoIncrementTable
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this grantTable) Insert(ctx context.Context, grant *Grant) error {
|
||||||
|
return this.table.Insert(ctx, grant)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this grantTable) Update(ctx context.Context, grant *Grant) error {
|
||||||
|
return this.table.Update(ctx, grant)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this grantTable) Save(ctx context.Context, grant *Grant) error {
|
||||||
|
return this.table.Save(ctx, grant)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this grantTable) Delete(ctx context.Context, grant *Grant) error {
|
||||||
|
return this.table.Delete(ctx, grant)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this grantTable) InsertReturningId(ctx context.Context, grant *Grant) (uint64, error) {
|
||||||
|
return this.table.InsertReturningPKey(ctx, grant)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this grantTable) LastInsertedSequence(ctx context.Context) (uint64, error) {
|
||||||
|
return this.table.LastInsertedSequence(ctx)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this grantTable) Has(ctx context.Context, id uint64) (found bool, err error) {
|
||||||
|
return this.table.PrimaryKey().Has(ctx, id)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this grantTable) Get(ctx context.Context, id uint64) (*Grant, error) {
|
||||||
|
var grant Grant
|
||||||
|
found, err := this.table.PrimaryKey().Get(ctx, &grant, id)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if !found {
|
||||||
|
return nil, ormerrors.NotFound
|
||||||
|
}
|
||||||
|
return &grant, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this grantTable) 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 grantTable) GetBySubjectOrigin(ctx context.Context, subject string, origin string) (*Grant, error) {
|
||||||
|
var grant Grant
|
||||||
|
found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &grant,
|
||||||
|
subject,
|
||||||
|
origin,
|
||||||
|
)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if !found {
|
||||||
|
return nil, ormerrors.NotFound
|
||||||
|
}
|
||||||
|
return &grant, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this grantTable) List(ctx context.Context, prefixKey GrantIndexKey, opts ...ormlist.Option) (GrantIterator, error) {
|
||||||
|
it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...)
|
||||||
|
return GrantIterator{it}, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this grantTable) ListRange(ctx context.Context, from, to GrantIndexKey, opts ...ormlist.Option) (GrantIterator, error) {
|
||||||
|
it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...)
|
||||||
|
return GrantIterator{it}, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this grantTable) DeleteBy(ctx context.Context, prefixKey GrantIndexKey) error {
|
||||||
|
return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this grantTable) DeleteRange(ctx context.Context, from, to GrantIndexKey) error {
|
||||||
|
return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values())
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this grantTable) doNotImplement() {}
|
||||||
|
|
||||||
|
var _ GrantTable = grantTable{}
|
||||||
|
|
||||||
|
func NewGrantTable(db ormtable.Schema) (GrantTable, error) {
|
||||||
|
table := db.GetTable(&Grant{})
|
||||||
|
if table == nil {
|
||||||
|
return nil, ormerrors.TableNotFound.Wrap(string((&Grant{}).ProtoReflect().Descriptor().FullName()))
|
||||||
|
}
|
||||||
|
return grantTable{table.(ormtable.AutoIncrementTable)}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type StateStore interface {
|
||||||
|
GrantTable() GrantTable
|
||||||
|
|
||||||
|
doNotImplement()
|
||||||
|
}
|
||||||
|
|
||||||
|
type stateStore struct {
|
||||||
|
grant GrantTable
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x stateStore) GrantTable() GrantTable {
|
||||||
|
return x.grant
|
||||||
|
}
|
||||||
|
|
||||||
|
func (stateStore) doNotImplement() {}
|
||||||
|
|
||||||
|
var _ StateStore = stateStore{}
|
||||||
|
|
||||||
|
func NewStateStore(db ormtable.Schema) (StateStore, error) {
|
||||||
|
grantTable, err := NewGrantTable(db)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return stateStore{
|
||||||
|
grantTable,
|
||||||
|
}, nil
|
||||||
|
}
|
||||||
@@ -0,0 +1,832 @@
|
|||||||
|
// Code generated by protoc-gen-go-pulsar. DO NOT EDIT.
|
||||||
|
package macaroonv1
|
||||||
|
|
||||||
|
import (
|
||||||
|
_ "cosmossdk.io/api/cosmos/orm/v1"
|
||||||
|
fmt "fmt"
|
||||||
|
runtime "github.com/cosmos/cosmos-proto/runtime"
|
||||||
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
|
protoiface "google.golang.org/protobuf/runtime/protoiface"
|
||||||
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||||
|
io "io"
|
||||||
|
reflect "reflect"
|
||||||
|
sync "sync"
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
md_Grant protoreflect.MessageDescriptor
|
||||||
|
fd_Grant_id protoreflect.FieldDescriptor
|
||||||
|
fd_Grant_controller protoreflect.FieldDescriptor
|
||||||
|
fd_Grant_subject protoreflect.FieldDescriptor
|
||||||
|
fd_Grant_origin protoreflect.FieldDescriptor
|
||||||
|
fd_Grant_expiry_height protoreflect.FieldDescriptor
|
||||||
|
)
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
file_macaroon_v1_state_proto_init()
|
||||||
|
md_Grant = File_macaroon_v1_state_proto.Messages().ByName("Grant")
|
||||||
|
fd_Grant_id = md_Grant.Fields().ByName("id")
|
||||||
|
fd_Grant_controller = md_Grant.Fields().ByName("controller")
|
||||||
|
fd_Grant_subject = md_Grant.Fields().ByName("subject")
|
||||||
|
fd_Grant_origin = md_Grant.Fields().ByName("origin")
|
||||||
|
fd_Grant_expiry_height = md_Grant.Fields().ByName("expiry_height")
|
||||||
|
}
|
||||||
|
|
||||||
|
var _ protoreflect.Message = (*fastReflection_Grant)(nil)
|
||||||
|
|
||||||
|
type fastReflection_Grant Grant
|
||||||
|
|
||||||
|
func (x *Grant) ProtoReflect() protoreflect.Message {
|
||||||
|
return (*fastReflection_Grant)(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *Grant) slowProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_macaroon_v1_state_proto_msgTypes[0]
|
||||||
|
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_Grant_messageType fastReflection_Grant_messageType
|
||||||
|
var _ protoreflect.MessageType = fastReflection_Grant_messageType{}
|
||||||
|
|
||||||
|
type fastReflection_Grant_messageType struct{}
|
||||||
|
|
||||||
|
func (x fastReflection_Grant_messageType) Zero() protoreflect.Message {
|
||||||
|
return (*fastReflection_Grant)(nil)
|
||||||
|
}
|
||||||
|
func (x fastReflection_Grant_messageType) New() protoreflect.Message {
|
||||||
|
return new(fastReflection_Grant)
|
||||||
|
}
|
||||||
|
func (x fastReflection_Grant_messageType) Descriptor() protoreflect.MessageDescriptor {
|
||||||
|
return md_Grant
|
||||||
|
}
|
||||||
|
|
||||||
|
// Descriptor returns message descriptor, which contains only the protobuf
|
||||||
|
// type information for the message.
|
||||||
|
func (x *fastReflection_Grant) Descriptor() protoreflect.MessageDescriptor {
|
||||||
|
return md_Grant
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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_Grant) Type() protoreflect.MessageType {
|
||||||
|
return _fastReflection_Grant_messageType
|
||||||
|
}
|
||||||
|
|
||||||
|
// New returns a newly allocated and mutable empty message.
|
||||||
|
func (x *fastReflection_Grant) New() protoreflect.Message {
|
||||||
|
return new(fastReflection_Grant)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Interface unwraps the message reflection interface and
|
||||||
|
// returns the underlying ProtoMessage interface.
|
||||||
|
func (x *fastReflection_Grant) Interface() protoreflect.ProtoMessage {
|
||||||
|
return (*Grant)(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_Grant) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
|
||||||
|
if x.Id != uint64(0) {
|
||||||
|
value := protoreflect.ValueOfUint64(x.Id)
|
||||||
|
if !f(fd_Grant_id, value) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if x.Controller != "" {
|
||||||
|
value := protoreflect.ValueOfString(x.Controller)
|
||||||
|
if !f(fd_Grant_controller, value) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if x.Subject != "" {
|
||||||
|
value := protoreflect.ValueOfString(x.Subject)
|
||||||
|
if !f(fd_Grant_subject, value) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if x.Origin != "" {
|
||||||
|
value := protoreflect.ValueOfString(x.Origin)
|
||||||
|
if !f(fd_Grant_origin, value) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if x.ExpiryHeight != int64(0) {
|
||||||
|
value := protoreflect.ValueOfInt64(x.ExpiryHeight)
|
||||||
|
if !f(fd_Grant_expiry_height, 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_Grant) Has(fd protoreflect.FieldDescriptor) bool {
|
||||||
|
switch fd.FullName() {
|
||||||
|
case "macaroon.v1.Grant.id":
|
||||||
|
return x.Id != uint64(0)
|
||||||
|
case "macaroon.v1.Grant.controller":
|
||||||
|
return x.Controller != ""
|
||||||
|
case "macaroon.v1.Grant.subject":
|
||||||
|
return x.Subject != ""
|
||||||
|
case "macaroon.v1.Grant.origin":
|
||||||
|
return x.Origin != ""
|
||||||
|
case "macaroon.v1.Grant.expiry_height":
|
||||||
|
return x.ExpiryHeight != int64(0)
|
||||||
|
default:
|
||||||
|
if fd.IsExtension() {
|
||||||
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.v1.Grant"))
|
||||||
|
}
|
||||||
|
panic(fmt.Errorf("message macaroon.v1.Grant 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_Grant) Clear(fd protoreflect.FieldDescriptor) {
|
||||||
|
switch fd.FullName() {
|
||||||
|
case "macaroon.v1.Grant.id":
|
||||||
|
x.Id = uint64(0)
|
||||||
|
case "macaroon.v1.Grant.controller":
|
||||||
|
x.Controller = ""
|
||||||
|
case "macaroon.v1.Grant.subject":
|
||||||
|
x.Subject = ""
|
||||||
|
case "macaroon.v1.Grant.origin":
|
||||||
|
x.Origin = ""
|
||||||
|
case "macaroon.v1.Grant.expiry_height":
|
||||||
|
x.ExpiryHeight = int64(0)
|
||||||
|
default:
|
||||||
|
if fd.IsExtension() {
|
||||||
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.v1.Grant"))
|
||||||
|
}
|
||||||
|
panic(fmt.Errorf("message macaroon.v1.Grant 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_Grant) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
|
||||||
|
switch descriptor.FullName() {
|
||||||
|
case "macaroon.v1.Grant.id":
|
||||||
|
value := x.Id
|
||||||
|
return protoreflect.ValueOfUint64(value)
|
||||||
|
case "macaroon.v1.Grant.controller":
|
||||||
|
value := x.Controller
|
||||||
|
return protoreflect.ValueOfString(value)
|
||||||
|
case "macaroon.v1.Grant.subject":
|
||||||
|
value := x.Subject
|
||||||
|
return protoreflect.ValueOfString(value)
|
||||||
|
case "macaroon.v1.Grant.origin":
|
||||||
|
value := x.Origin
|
||||||
|
return protoreflect.ValueOfString(value)
|
||||||
|
case "macaroon.v1.Grant.expiry_height":
|
||||||
|
value := x.ExpiryHeight
|
||||||
|
return protoreflect.ValueOfInt64(value)
|
||||||
|
default:
|
||||||
|
if descriptor.IsExtension() {
|
||||||
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.v1.Grant"))
|
||||||
|
}
|
||||||
|
panic(fmt.Errorf("message macaroon.v1.Grant 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_Grant) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
|
||||||
|
switch fd.FullName() {
|
||||||
|
case "macaroon.v1.Grant.id":
|
||||||
|
x.Id = value.Uint()
|
||||||
|
case "macaroon.v1.Grant.controller":
|
||||||
|
x.Controller = value.Interface().(string)
|
||||||
|
case "macaroon.v1.Grant.subject":
|
||||||
|
x.Subject = value.Interface().(string)
|
||||||
|
case "macaroon.v1.Grant.origin":
|
||||||
|
x.Origin = value.Interface().(string)
|
||||||
|
case "macaroon.v1.Grant.expiry_height":
|
||||||
|
x.ExpiryHeight = value.Int()
|
||||||
|
default:
|
||||||
|
if fd.IsExtension() {
|
||||||
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.v1.Grant"))
|
||||||
|
}
|
||||||
|
panic(fmt.Errorf("message macaroon.v1.Grant 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_Grant) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||||
|
switch fd.FullName() {
|
||||||
|
case "macaroon.v1.Grant.id":
|
||||||
|
panic(fmt.Errorf("field id of message macaroon.v1.Grant is not mutable"))
|
||||||
|
case "macaroon.v1.Grant.controller":
|
||||||
|
panic(fmt.Errorf("field controller of message macaroon.v1.Grant is not mutable"))
|
||||||
|
case "macaroon.v1.Grant.subject":
|
||||||
|
panic(fmt.Errorf("field subject of message macaroon.v1.Grant is not mutable"))
|
||||||
|
case "macaroon.v1.Grant.origin":
|
||||||
|
panic(fmt.Errorf("field origin of message macaroon.v1.Grant is not mutable"))
|
||||||
|
case "macaroon.v1.Grant.expiry_height":
|
||||||
|
panic(fmt.Errorf("field expiry_height of message macaroon.v1.Grant is not mutable"))
|
||||||
|
default:
|
||||||
|
if fd.IsExtension() {
|
||||||
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.v1.Grant"))
|
||||||
|
}
|
||||||
|
panic(fmt.Errorf("message macaroon.v1.Grant 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_Grant) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||||
|
switch fd.FullName() {
|
||||||
|
case "macaroon.v1.Grant.id":
|
||||||
|
return protoreflect.ValueOfUint64(uint64(0))
|
||||||
|
case "macaroon.v1.Grant.controller":
|
||||||
|
return protoreflect.ValueOfString("")
|
||||||
|
case "macaroon.v1.Grant.subject":
|
||||||
|
return protoreflect.ValueOfString("")
|
||||||
|
case "macaroon.v1.Grant.origin":
|
||||||
|
return protoreflect.ValueOfString("")
|
||||||
|
case "macaroon.v1.Grant.expiry_height":
|
||||||
|
return protoreflect.ValueOfInt64(int64(0))
|
||||||
|
default:
|
||||||
|
if fd.IsExtension() {
|
||||||
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.v1.Grant"))
|
||||||
|
}
|
||||||
|
panic(fmt.Errorf("message macaroon.v1.Grant 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_Grant) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
||||||
|
switch d.FullName() {
|
||||||
|
default:
|
||||||
|
panic(fmt.Errorf("%s is not a oneof field in macaroon.v1.Grant", 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_Grant) 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_Grant) 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_Grant) 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_Grant) ProtoMethods() *protoiface.Methods {
|
||||||
|
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
|
||||||
|
x := input.Message.Interface().(*Grant)
|
||||||
|
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))
|
||||||
|
}
|
||||||
|
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().(*Grant)
|
||||||
|
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 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().(*Grant)
|
||||||
|
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: Grant: wiretype end group for non-group")
|
||||||
|
}
|
||||||
|
if fieldNum <= 0 {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Grant: 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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
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
|
||||||
|
// protoc (unknown)
|
||||||
|
// source: macaroon/v1/state.proto
|
||||||
|
|
||||||
|
const (
|
||||||
|
// Verify that this generated code is sufficiently up-to-date.
|
||||||
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||||
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||||
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||||
|
)
|
||||||
|
|
||||||
|
type Grant 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"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *Grant) Reset() {
|
||||||
|
*x = Grant{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_macaroon_v1_state_proto_msgTypes[0]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *Grant) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*Grant) ProtoMessage() {}
|
||||||
|
|
||||||
|
// Deprecated: Use Grant.ProtoReflect.Descriptor instead.
|
||||||
|
func (*Grant) Descriptor() ([]byte, []int) {
|
||||||
|
return file_macaroon_v1_state_proto_rawDescGZIP(), []int{0}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *Grant) GetId() uint64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Id
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *Grant) GetController() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Controller
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *Grant) GetSubject() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Subject
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *Grant) GetOrigin() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Origin
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *Grant) GetExpiryHeight() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.ExpiryHeight
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
var File_macaroon_v1_state_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
|
var file_macaroon_v1_state_proto_rawDesc = []byte{
|
||||||
|
0x0a, 0x17, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74,
|
||||||
|
0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x6d, 0x61, 0x63, 0x61, 0x72,
|
||||||
|
0x6f, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6f,
|
||||||
|
0x72, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
|
||||||
|
0xb6, 0x01, 0x0a, 0x05, 0x47, 0x72, 0x61, 0x6e, 0x74, 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,
|
||||||
|
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,
|
||||||
|
}
|
||||||
|
|
||||||
|
var (
|
||||||
|
file_macaroon_v1_state_proto_rawDescOnce sync.Once
|
||||||
|
file_macaroon_v1_state_proto_rawDescData = file_macaroon_v1_state_proto_rawDesc
|
||||||
|
)
|
||||||
|
|
||||||
|
func file_macaroon_v1_state_proto_rawDescGZIP() []byte {
|
||||||
|
file_macaroon_v1_state_proto_rawDescOnce.Do(func() {
|
||||||
|
file_macaroon_v1_state_proto_rawDescData = protoimpl.X.CompressGZIP(file_macaroon_v1_state_proto_rawDescData)
|
||||||
|
})
|
||||||
|
return file_macaroon_v1_state_proto_rawDescData
|
||||||
|
}
|
||||||
|
|
||||||
|
var file_macaroon_v1_state_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||||
|
var file_macaroon_v1_state_proto_goTypes = []interface{}{
|
||||||
|
(*Grant)(nil), // 0: macaroon.v1.Grant
|
||||||
|
}
|
||||||
|
var file_macaroon_v1_state_proto_depIdxs = []int32{
|
||||||
|
0, // [0:0] is the sub-list for method output_type
|
||||||
|
0, // [0:0] is the sub-list for method input_type
|
||||||
|
0, // [0:0] is the sub-list for extension type_name
|
||||||
|
0, // [0:0] is the sub-list for extension extendee
|
||||||
|
0, // [0:0] is the sub-list for field type_name
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() { file_macaroon_v1_state_proto_init() }
|
||||||
|
func file_macaroon_v1_state_proto_init() {
|
||||||
|
if File_macaroon_v1_state_proto != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if !protoimpl.UnsafeEnabled {
|
||||||
|
file_macaroon_v1_state_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*Grant); 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{
|
||||||
|
File: protoimpl.DescBuilder{
|
||||||
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
|
RawDescriptor: file_macaroon_v1_state_proto_rawDesc,
|
||||||
|
NumEnums: 0,
|
||||||
|
NumMessages: 1,
|
||||||
|
NumExtensions: 0,
|
||||||
|
NumServices: 0,
|
||||||
|
},
|
||||||
|
GoTypes: file_macaroon_v1_state_proto_goTypes,
|
||||||
|
DependencyIndexes: file_macaroon_v1_state_proto_depIdxs,
|
||||||
|
MessageInfos: file_macaroon_v1_state_proto_msgTypes,
|
||||||
|
}.Build()
|
||||||
|
File_macaroon_v1_state_proto = out.File
|
||||||
|
file_macaroon_v1_state_proto_rawDesc = nil
|
||||||
|
file_macaroon_v1_state_proto_goTypes = nil
|
||||||
|
file_macaroon_v1_state_proto_depIdxs = nil
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,10 +1,10 @@
|
|||||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// - protoc-gen-go-grpc v1.5.1
|
// - protoc-gen-go-grpc v1.3.0
|
||||||
// - protoc (unknown)
|
// - protoc (unknown)
|
||||||
// source: dwn/v1/tx.proto
|
// source: macaroon/v1/tx.proto
|
||||||
|
|
||||||
package dwnv1
|
package macaroonv1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
context "context"
|
context "context"
|
||||||
@@ -15,26 +15,25 @@ import (
|
|||||||
|
|
||||||
// This is a compile-time assertion to ensure that this generated file
|
// This is a compile-time assertion to ensure that this generated file
|
||||||
// is compatible with the grpc package it is being compiled against.
|
// is compatible with the grpc package it is being compiled against.
|
||||||
// Requires gRPC-Go v1.64.0 or later.
|
// Requires gRPC-Go v1.32.0 or later.
|
||||||
const _ = grpc.SupportPackageIsVersion9
|
const _ = grpc.SupportPackageIsVersion7
|
||||||
|
|
||||||
const (
|
const (
|
||||||
Msg_UpdateParams_FullMethodName = "/dwn.v1.Msg/UpdateParams"
|
Msg_UpdateParams_FullMethodName = "/macaroon.v1.Msg/UpdateParams"
|
||||||
Msg_Initialize_FullMethodName = "/dwn.v1.Msg/Initialize"
|
Msg_IssueMacaroon_FullMethodName = "/macaroon.v1.Msg/IssueMacaroon"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MsgClient is the client API for Msg service.
|
// MsgClient is the client API for Msg service.
|
||||||
//
|
//
|
||||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||||
//
|
|
||||||
// Msg defines the Msg service.
|
|
||||||
type MsgClient interface {
|
type MsgClient interface {
|
||||||
// UpdateParams defines a governance operation for updating the parameters.
|
// UpdateParams defines a governance operation for updating the parameters.
|
||||||
//
|
//
|
||||||
// Since: cosmos-sdk 0.47
|
// Since: cosmos-sdk 0.47
|
||||||
UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error)
|
UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error)
|
||||||
// Initialize spawns a new Vault
|
// IssueMacaroon asserts the given controller is the owner of the given
|
||||||
Initialize(ctx context.Context, in *MsgInitialize, opts ...grpc.CallOption) (*MsgInitializeResponse, error)
|
// address.
|
||||||
|
IssueMacaroon(ctx context.Context, in *MsgIssueMacaroon, opts ...grpc.CallOption) (*MsgIssueMacaroonResponse, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
type msgClient struct {
|
type msgClient struct {
|
||||||
@@ -46,19 +45,17 @@ func NewMsgClient(cc grpc.ClientConnInterface) MsgClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) {
|
func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) {
|
||||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
||||||
out := new(MsgUpdateParamsResponse)
|
out := new(MsgUpdateParamsResponse)
|
||||||
err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, cOpts...)
|
err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, opts...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *msgClient) Initialize(ctx context.Context, in *MsgInitialize, opts ...grpc.CallOption) (*MsgInitializeResponse, error) {
|
func (c *msgClient) IssueMacaroon(ctx context.Context, in *MsgIssueMacaroon, opts ...grpc.CallOption) (*MsgIssueMacaroonResponse, error) {
|
||||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
out := new(MsgIssueMacaroonResponse)
|
||||||
out := new(MsgInitializeResponse)
|
err := c.cc.Invoke(ctx, Msg_IssueMacaroon_FullMethodName, in, out, opts...)
|
||||||
err := c.cc.Invoke(ctx, Msg_Initialize_FullMethodName, in, out, cOpts...)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -67,34 +64,29 @@ func (c *msgClient) Initialize(ctx context.Context, in *MsgInitialize, opts ...g
|
|||||||
|
|
||||||
// MsgServer is the server API for Msg service.
|
// MsgServer is the server API for Msg service.
|
||||||
// All implementations must embed UnimplementedMsgServer
|
// All implementations must embed UnimplementedMsgServer
|
||||||
// for forward compatibility.
|
// for forward compatibility
|
||||||
//
|
|
||||||
// Msg defines the Msg service.
|
|
||||||
type MsgServer interface {
|
type MsgServer interface {
|
||||||
// UpdateParams defines a governance operation for updating the parameters.
|
// UpdateParams defines a governance operation for updating the parameters.
|
||||||
//
|
//
|
||||||
// Since: cosmos-sdk 0.47
|
// Since: cosmos-sdk 0.47
|
||||||
UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
|
UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
|
||||||
// Initialize spawns a new Vault
|
// IssueMacaroon asserts the given controller is the owner of the given
|
||||||
Initialize(context.Context, *MsgInitialize) (*MsgInitializeResponse, error)
|
// address.
|
||||||
|
IssueMacaroon(context.Context, *MsgIssueMacaroon) (*MsgIssueMacaroonResponse, error)
|
||||||
mustEmbedUnimplementedMsgServer()
|
mustEmbedUnimplementedMsgServer()
|
||||||
}
|
}
|
||||||
|
|
||||||
// UnimplementedMsgServer must be embedded to have
|
// UnimplementedMsgServer must be embedded to have forward compatible implementations.
|
||||||
// forward compatible implementations.
|
type UnimplementedMsgServer struct {
|
||||||
//
|
}
|
||||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
|
||||||
// pointer dereference when methods are called.
|
|
||||||
type UnimplementedMsgServer struct{}
|
|
||||||
|
|
||||||
func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) {
|
func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented")
|
||||||
}
|
}
|
||||||
func (UnimplementedMsgServer) Initialize(context.Context, *MsgInitialize) (*MsgInitializeResponse, error) {
|
func (UnimplementedMsgServer) IssueMacaroon(context.Context, *MsgIssueMacaroon) (*MsgIssueMacaroonResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method Initialize not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method IssueMacaroon not implemented")
|
||||||
}
|
}
|
||||||
func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {}
|
func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {}
|
||||||
func (UnimplementedMsgServer) testEmbeddedByValue() {}
|
|
||||||
|
|
||||||
// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service.
|
// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service.
|
||||||
// Use of this interface is not recommended, as added methods to MsgServer will
|
// Use of this interface is not recommended, as added methods to MsgServer will
|
||||||
@@ -104,13 +96,6 @@ type UnsafeMsgServer interface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) {
|
func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) {
|
||||||
// If the following call pancis, it indicates UnimplementedMsgServer was
|
|
||||||
// embedded by pointer and is nil. This will cause panics if an
|
|
||||||
// unimplemented method is ever invoked, so we test this at initialization
|
|
||||||
// time to prevent it from happening at runtime later due to I/O.
|
|
||||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
|
||||||
t.testEmbeddedByValue()
|
|
||||||
}
|
|
||||||
s.RegisterService(&Msg_ServiceDesc, srv)
|
s.RegisterService(&Msg_ServiceDesc, srv)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -132,20 +117,20 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
func _Msg_Initialize_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
func _Msg_IssueMacaroon_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(MsgInitialize)
|
in := new(MsgIssueMacaroon)
|
||||||
if err := dec(in); err != nil {
|
if err := dec(in); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if interceptor == nil {
|
if interceptor == nil {
|
||||||
return srv.(MsgServer).Initialize(ctx, in)
|
return srv.(MsgServer).IssueMacaroon(ctx, in)
|
||||||
}
|
}
|
||||||
info := &grpc.UnaryServerInfo{
|
info := &grpc.UnaryServerInfo{
|
||||||
Server: srv,
|
Server: srv,
|
||||||
FullMethod: Msg_Initialize_FullMethodName,
|
FullMethod: Msg_IssueMacaroon_FullMethodName,
|
||||||
}
|
}
|
||||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
return srv.(MsgServer).Initialize(ctx, req.(*MsgInitialize))
|
return srv.(MsgServer).IssueMacaroon(ctx, req.(*MsgIssueMacaroon))
|
||||||
}
|
}
|
||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
@@ -154,7 +139,7 @@ func _Msg_Initialize_Handler(srv interface{}, ctx context.Context, dec func(inte
|
|||||||
// It's only intended for direct use with grpc.RegisterService,
|
// It's only intended for direct use with grpc.RegisterService,
|
||||||
// and not to be introspected or modified (even as a copy)
|
// and not to be introspected or modified (even as a copy)
|
||||||
var Msg_ServiceDesc = grpc.ServiceDesc{
|
var Msg_ServiceDesc = grpc.ServiceDesc{
|
||||||
ServiceName: "dwn.v1.Msg",
|
ServiceName: "macaroon.v1.Msg",
|
||||||
HandlerType: (*MsgServer)(nil),
|
HandlerType: (*MsgServer)(nil),
|
||||||
Methods: []grpc.MethodDesc{
|
Methods: []grpc.MethodDesc{
|
||||||
{
|
{
|
||||||
@@ -162,10 +147,10 @@ var Msg_ServiceDesc = grpc.ServiceDesc{
|
|||||||
Handler: _Msg_UpdateParams_Handler,
|
Handler: _Msg_UpdateParams_Handler,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
MethodName: "Initialize",
|
MethodName: "IssueMacaroon",
|
||||||
Handler: _Msg_Initialize_Handler,
|
Handler: _Msg_IssueMacaroon_Handler,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Streams: []grpc.StreamDesc{},
|
Streams: []grpc.StreamDesc{},
|
||||||
Metadata: "dwn/v1/tx.proto",
|
Metadata: "macaroon/v1/tx.proto",
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,500 @@
|
|||||||
|
// Code generated by protoc-gen-go-pulsar. DO NOT EDIT.
|
||||||
|
package modulev1
|
||||||
|
|
||||||
|
import (
|
||||||
|
_ "cosmossdk.io/api/cosmos/app/v1alpha1"
|
||||||
|
fmt "fmt"
|
||||||
|
runtime "github.com/cosmos/cosmos-proto/runtime"
|
||||||
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
|
protoiface "google.golang.org/protobuf/runtime/protoiface"
|
||||||
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||||
|
io "io"
|
||||||
|
reflect "reflect"
|
||||||
|
sync "sync"
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
md_Module protoreflect.MessageDescriptor
|
||||||
|
)
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
file_oracle_module_v1_module_proto_init()
|
||||||
|
md_Module = File_oracle_module_v1_module_proto.Messages().ByName("Module")
|
||||||
|
}
|
||||||
|
|
||||||
|
var _ protoreflect.Message = (*fastReflection_Module)(nil)
|
||||||
|
|
||||||
|
type fastReflection_Module Module
|
||||||
|
|
||||||
|
func (x *Module) ProtoReflect() protoreflect.Message {
|
||||||
|
return (*fastReflection_Module)(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *Module) slowProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_oracle_module_v1_module_proto_msgTypes[0]
|
||||||
|
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_Module_messageType fastReflection_Module_messageType
|
||||||
|
var _ protoreflect.MessageType = fastReflection_Module_messageType{}
|
||||||
|
|
||||||
|
type fastReflection_Module_messageType struct{}
|
||||||
|
|
||||||
|
func (x fastReflection_Module_messageType) Zero() protoreflect.Message {
|
||||||
|
return (*fastReflection_Module)(nil)
|
||||||
|
}
|
||||||
|
func (x fastReflection_Module_messageType) New() protoreflect.Message {
|
||||||
|
return new(fastReflection_Module)
|
||||||
|
}
|
||||||
|
func (x fastReflection_Module_messageType) Descriptor() protoreflect.MessageDescriptor {
|
||||||
|
return md_Module
|
||||||
|
}
|
||||||
|
|
||||||
|
// Descriptor returns message descriptor, which contains only the protobuf
|
||||||
|
// type information for the message.
|
||||||
|
func (x *fastReflection_Module) Descriptor() protoreflect.MessageDescriptor {
|
||||||
|
return md_Module
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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_Module) Type() protoreflect.MessageType {
|
||||||
|
return _fastReflection_Module_messageType
|
||||||
|
}
|
||||||
|
|
||||||
|
// New returns a newly allocated and mutable empty message.
|
||||||
|
func (x *fastReflection_Module) New() protoreflect.Message {
|
||||||
|
return new(fastReflection_Module)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Interface unwraps the message reflection interface and
|
||||||
|
// returns the underlying ProtoMessage interface.
|
||||||
|
func (x *fastReflection_Module) Interface() protoreflect.ProtoMessage {
|
||||||
|
return (*Module)(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_Module) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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_Module) Has(fd protoreflect.FieldDescriptor) bool {
|
||||||
|
switch fd.FullName() {
|
||||||
|
default:
|
||||||
|
if fd.IsExtension() {
|
||||||
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.module.v1.Module"))
|
||||||
|
}
|
||||||
|
panic(fmt.Errorf("message oracle.module.v1.Module 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_Module) Clear(fd protoreflect.FieldDescriptor) {
|
||||||
|
switch fd.FullName() {
|
||||||
|
default:
|
||||||
|
if fd.IsExtension() {
|
||||||
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.module.v1.Module"))
|
||||||
|
}
|
||||||
|
panic(fmt.Errorf("message oracle.module.v1.Module 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_Module) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
|
||||||
|
switch descriptor.FullName() {
|
||||||
|
default:
|
||||||
|
if descriptor.IsExtension() {
|
||||||
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.module.v1.Module"))
|
||||||
|
}
|
||||||
|
panic(fmt.Errorf("message oracle.module.v1.Module 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_Module) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
|
||||||
|
switch fd.FullName() {
|
||||||
|
default:
|
||||||
|
if fd.IsExtension() {
|
||||||
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.module.v1.Module"))
|
||||||
|
}
|
||||||
|
panic(fmt.Errorf("message oracle.module.v1.Module 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_Module) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||||
|
switch fd.FullName() {
|
||||||
|
default:
|
||||||
|
if fd.IsExtension() {
|
||||||
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.module.v1.Module"))
|
||||||
|
}
|
||||||
|
panic(fmt.Errorf("message oracle.module.v1.Module 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_Module) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||||
|
switch fd.FullName() {
|
||||||
|
default:
|
||||||
|
if fd.IsExtension() {
|
||||||
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.module.v1.Module"))
|
||||||
|
}
|
||||||
|
panic(fmt.Errorf("message oracle.module.v1.Module 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_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
||||||
|
switch d.FullName() {
|
||||||
|
default:
|
||||||
|
panic(fmt.Errorf("%s is not a oneof field in oracle.module.v1.Module", 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_Module) 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_Module) 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_Module) 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_Module) ProtoMethods() *protoiface.Methods {
|
||||||
|
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
|
||||||
|
x := input.Message.Interface().(*Module)
|
||||||
|
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.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().(*Module)
|
||||||
|
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 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().(*Module)
|
||||||
|
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: Module: wiretype end group for non-group")
|
||||||
|
}
|
||||||
|
if fieldNum <= 0 {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||||
|
}
|
||||||
|
switch fieldNum {
|
||||||
|
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
|
||||||
|
// protoc (unknown)
|
||||||
|
// source: oracle/module/v1/module.proto
|
||||||
|
|
||||||
|
const (
|
||||||
|
// Verify that this generated code is sufficiently up-to-date.
|
||||||
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||||
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||||
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||||
|
)
|
||||||
|
|
||||||
|
// Module is the app config object of the module.
|
||||||
|
// Learn more: https://docs.cosmos.network/main/building-modules/depinject
|
||||||
|
type Module struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *Module) Reset() {
|
||||||
|
*x = Module{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_oracle_module_v1_module_proto_msgTypes[0]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *Module) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*Module) ProtoMessage() {}
|
||||||
|
|
||||||
|
// Deprecated: Use Module.ProtoReflect.Descriptor instead.
|
||||||
|
func (*Module) Descriptor() ([]byte, []int) {
|
||||||
|
return file_oracle_module_v1_module_proto_rawDescGZIP(), []int{0}
|
||||||
|
}
|
||||||
|
|
||||||
|
var File_oracle_module_v1_module_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
|
var file_oracle_module_v1_module_proto_rawDesc = []byte{
|
||||||
|
0x0a, 0x1d, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f,
|
||||||
|
0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
|
||||||
|
0x10, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76,
|
||||||
|
0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31,
|
||||||
|
0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72,
|
||||||
|
0x6f, 0x74, 0x6f, 0x22, 0x28, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x1e, 0xba,
|
||||||
|
0xc0, 0x96, 0xda, 0x01, 0x18, 0x0a, 0x16, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
|
||||||
|
0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x42, 0xbb, 0x01,
|
||||||
|
0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x64,
|
||||||
|
0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72,
|
||||||
|
0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x34, 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, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f,
|
||||||
|
0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4f, 0x4d,
|
||||||
|
0x58, 0xaa, 0x02, 0x10, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c,
|
||||||
|
0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c, 0x4d, 0x6f,
|
||||||
|
0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65,
|
||||||
|
0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65,
|
||||||
|
0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x12, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x3a,
|
||||||
|
0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||||
|
0x74, 0x6f, 0x33,
|
||||||
|
}
|
||||||
|
|
||||||
|
var (
|
||||||
|
file_oracle_module_v1_module_proto_rawDescOnce sync.Once
|
||||||
|
file_oracle_module_v1_module_proto_rawDescData = file_oracle_module_v1_module_proto_rawDesc
|
||||||
|
)
|
||||||
|
|
||||||
|
func file_oracle_module_v1_module_proto_rawDescGZIP() []byte {
|
||||||
|
file_oracle_module_v1_module_proto_rawDescOnce.Do(func() {
|
||||||
|
file_oracle_module_v1_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_oracle_module_v1_module_proto_rawDescData)
|
||||||
|
})
|
||||||
|
return file_oracle_module_v1_module_proto_rawDescData
|
||||||
|
}
|
||||||
|
|
||||||
|
var file_oracle_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||||
|
var file_oracle_module_v1_module_proto_goTypes = []interface{}{
|
||||||
|
(*Module)(nil), // 0: oracle.module.v1.Module
|
||||||
|
}
|
||||||
|
var file_oracle_module_v1_module_proto_depIdxs = []int32{
|
||||||
|
0, // [0:0] is the sub-list for method output_type
|
||||||
|
0, // [0:0] is the sub-list for method input_type
|
||||||
|
0, // [0:0] is the sub-list for extension type_name
|
||||||
|
0, // [0:0] is the sub-list for extension extendee
|
||||||
|
0, // [0:0] is the sub-list for field type_name
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() { file_oracle_module_v1_module_proto_init() }
|
||||||
|
func file_oracle_module_v1_module_proto_init() {
|
||||||
|
if File_oracle_module_v1_module_proto != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if !protoimpl.UnsafeEnabled {
|
||||||
|
file_oracle_module_v1_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*Module); 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{
|
||||||
|
File: protoimpl.DescBuilder{
|
||||||
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
|
RawDescriptor: file_oracle_module_v1_module_proto_rawDesc,
|
||||||
|
NumEnums: 0,
|
||||||
|
NumMessages: 1,
|
||||||
|
NumExtensions: 0,
|
||||||
|
NumServices: 0,
|
||||||
|
},
|
||||||
|
GoTypes: file_oracle_module_v1_module_proto_goTypes,
|
||||||
|
DependencyIndexes: file_oracle_module_v1_module_proto_depIdxs,
|
||||||
|
MessageInfos: file_oracle_module_v1_module_proto_msgTypes,
|
||||||
|
}.Build()
|
||||||
|
File_oracle_module_v1_module_proto = out.File
|
||||||
|
file_oracle_module_v1_module_proto_rawDesc = nil
|
||||||
|
file_oracle_module_v1_module_proto_goTypes = nil
|
||||||
|
file_oracle_module_v1_module_proto_depIdxs = nil
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
|||||||
// Code generated by protoc-gen-go-pulsar. DO NOT EDIT.
|
// Code generated by protoc-gen-go-pulsar. DO NOT EDIT.
|
||||||
package svcv1
|
package oraclev1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
fmt "fmt"
|
fmt "fmt"
|
||||||
@@ -18,8 +18,8 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
file_svc_v1_query_proto_init()
|
file_oracle_v1_query_proto_init()
|
||||||
md_QueryParamsRequest = File_svc_v1_query_proto.Messages().ByName("QueryParamsRequest")
|
md_QueryParamsRequest = File_oracle_v1_query_proto.Messages().ByName("QueryParamsRequest")
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ protoreflect.Message = (*fastReflection_QueryParamsRequest)(nil)
|
var _ protoreflect.Message = (*fastReflection_QueryParamsRequest)(nil)
|
||||||
@@ -31,7 +31,7 @@ func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message {
|
func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message {
|
||||||
mi := &file_svc_v1_query_proto_msgTypes[0]
|
mi := &file_oracle_v1_query_proto_msgTypes[0]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -104,9 +104,9 @@ func (x *fastReflection_QueryParamsRequest) Has(fd protoreflect.FieldDescriptor)
|
|||||||
switch fd.FullName() {
|
switch fd.FullName() {
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.QueryParamsRequest"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParamsRequest"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message svc.v1.QueryParamsRequest does not contain field %s", fd.FullName()))
|
panic(fmt.Errorf("message oracle.v1.QueryParamsRequest does not contain field %s", fd.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -120,9 +120,9 @@ func (x *fastReflection_QueryParamsRequest) Clear(fd protoreflect.FieldDescripto
|
|||||||
switch fd.FullName() {
|
switch fd.FullName() {
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.QueryParamsRequest"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParamsRequest"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message svc.v1.QueryParamsRequest does not contain field %s", fd.FullName()))
|
panic(fmt.Errorf("message oracle.v1.QueryParamsRequest does not contain field %s", fd.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -136,9 +136,9 @@ func (x *fastReflection_QueryParamsRequest) Get(descriptor protoreflect.FieldDes
|
|||||||
switch descriptor.FullName() {
|
switch descriptor.FullName() {
|
||||||
default:
|
default:
|
||||||
if descriptor.IsExtension() {
|
if descriptor.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.QueryParamsRequest"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParamsRequest"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message svc.v1.QueryParamsRequest does not contain field %s", descriptor.FullName()))
|
panic(fmt.Errorf("message oracle.v1.QueryParamsRequest does not contain field %s", descriptor.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -156,9 +156,9 @@ func (x *fastReflection_QueryParamsRequest) Set(fd protoreflect.FieldDescriptor,
|
|||||||
switch fd.FullName() {
|
switch fd.FullName() {
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.QueryParamsRequest"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParamsRequest"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message svc.v1.QueryParamsRequest does not contain field %s", fd.FullName()))
|
panic(fmt.Errorf("message oracle.v1.QueryParamsRequest does not contain field %s", fd.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -176,9 +176,9 @@ func (x *fastReflection_QueryParamsRequest) Mutable(fd protoreflect.FieldDescrip
|
|||||||
switch fd.FullName() {
|
switch fd.FullName() {
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.QueryParamsRequest"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParamsRequest"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message svc.v1.QueryParamsRequest does not contain field %s", fd.FullName()))
|
panic(fmt.Errorf("message oracle.v1.QueryParamsRequest does not contain field %s", fd.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -189,9 +189,9 @@ func (x *fastReflection_QueryParamsRequest) NewField(fd protoreflect.FieldDescri
|
|||||||
switch fd.FullName() {
|
switch fd.FullName() {
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.QueryParamsRequest"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParamsRequest"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message svc.v1.QueryParamsRequest does not contain field %s", fd.FullName()))
|
panic(fmt.Errorf("message oracle.v1.QueryParamsRequest does not contain field %s", fd.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -201,7 +201,7 @@ func (x *fastReflection_QueryParamsRequest) NewField(fd protoreflect.FieldDescri
|
|||||||
func (x *fastReflection_QueryParamsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
func (x *fastReflection_QueryParamsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
||||||
switch d.FullName() {
|
switch d.FullName() {
|
||||||
default:
|
default:
|
||||||
panic(fmt.Errorf("%s is not a oneof field in svc.v1.QueryParamsRequest", d.FullName()))
|
panic(fmt.Errorf("%s is not a oneof field in oracle.v1.QueryParamsRequest", d.FullName()))
|
||||||
}
|
}
|
||||||
panic("unreachable")
|
panic("unreachable")
|
||||||
}
|
}
|
||||||
@@ -375,8 +375,8 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
file_svc_v1_query_proto_init()
|
file_oracle_v1_query_proto_init()
|
||||||
md_QueryParamsResponse = File_svc_v1_query_proto.Messages().ByName("QueryParamsResponse")
|
md_QueryParamsResponse = File_oracle_v1_query_proto.Messages().ByName("QueryParamsResponse")
|
||||||
fd_QueryParamsResponse_params = md_QueryParamsResponse.Fields().ByName("params")
|
fd_QueryParamsResponse_params = md_QueryParamsResponse.Fields().ByName("params")
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -389,7 +389,7 @@ func (x *QueryParamsResponse) ProtoReflect() protoreflect.Message {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (x *QueryParamsResponse) slowProtoReflect() protoreflect.Message {
|
func (x *QueryParamsResponse) slowProtoReflect() protoreflect.Message {
|
||||||
mi := &file_svc_v1_query_proto_msgTypes[1]
|
mi := &file_oracle_v1_query_proto_msgTypes[1]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -466,13 +466,13 @@ func (x *fastReflection_QueryParamsResponse) Range(f func(protoreflect.FieldDesc
|
|||||||
// a repeated field is populated if it is non-empty.
|
// a repeated field is populated if it is non-empty.
|
||||||
func (x *fastReflection_QueryParamsResponse) Has(fd protoreflect.FieldDescriptor) bool {
|
func (x *fastReflection_QueryParamsResponse) Has(fd protoreflect.FieldDescriptor) bool {
|
||||||
switch fd.FullName() {
|
switch fd.FullName() {
|
||||||
case "svc.v1.QueryParamsResponse.params":
|
case "oracle.v1.QueryParamsResponse.params":
|
||||||
return x.Params != nil
|
return x.Params != nil
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.QueryParamsResponse"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParamsResponse"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message svc.v1.QueryParamsResponse does not contain field %s", fd.FullName()))
|
panic(fmt.Errorf("message oracle.v1.QueryParamsResponse does not contain field %s", fd.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -484,13 +484,13 @@ func (x *fastReflection_QueryParamsResponse) Has(fd protoreflect.FieldDescriptor
|
|||||||
// Clear is a mutating operation and unsafe for concurrent use.
|
// Clear is a mutating operation and unsafe for concurrent use.
|
||||||
func (x *fastReflection_QueryParamsResponse) Clear(fd protoreflect.FieldDescriptor) {
|
func (x *fastReflection_QueryParamsResponse) Clear(fd protoreflect.FieldDescriptor) {
|
||||||
switch fd.FullName() {
|
switch fd.FullName() {
|
||||||
case "svc.v1.QueryParamsResponse.params":
|
case "oracle.v1.QueryParamsResponse.params":
|
||||||
x.Params = nil
|
x.Params = nil
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.QueryParamsResponse"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParamsResponse"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message svc.v1.QueryParamsResponse does not contain field %s", fd.FullName()))
|
panic(fmt.Errorf("message oracle.v1.QueryParamsResponse does not contain field %s", fd.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -502,14 +502,14 @@ func (x *fastReflection_QueryParamsResponse) Clear(fd protoreflect.FieldDescript
|
|||||||
// of the value; to obtain a mutable reference, use Mutable.
|
// of the value; to obtain a mutable reference, use Mutable.
|
||||||
func (x *fastReflection_QueryParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
|
func (x *fastReflection_QueryParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
|
||||||
switch descriptor.FullName() {
|
switch descriptor.FullName() {
|
||||||
case "svc.v1.QueryParamsResponse.params":
|
case "oracle.v1.QueryParamsResponse.params":
|
||||||
value := x.Params
|
value := x.Params
|
||||||
return protoreflect.ValueOfMessage(value.ProtoReflect())
|
return protoreflect.ValueOfMessage(value.ProtoReflect())
|
||||||
default:
|
default:
|
||||||
if descriptor.IsExtension() {
|
if descriptor.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.QueryParamsResponse"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParamsResponse"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message svc.v1.QueryParamsResponse does not contain field %s", descriptor.FullName()))
|
panic(fmt.Errorf("message oracle.v1.QueryParamsResponse does not contain field %s", descriptor.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -525,13 +525,13 @@ func (x *fastReflection_QueryParamsResponse) Get(descriptor protoreflect.FieldDe
|
|||||||
// Set is a mutating operation and unsafe for concurrent use.
|
// Set is a mutating operation and unsafe for concurrent use.
|
||||||
func (x *fastReflection_QueryParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
|
func (x *fastReflection_QueryParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
|
||||||
switch fd.FullName() {
|
switch fd.FullName() {
|
||||||
case "svc.v1.QueryParamsResponse.params":
|
case "oracle.v1.QueryParamsResponse.params":
|
||||||
x.Params = value.Message().Interface().(*Params)
|
x.Params = value.Message().Interface().(*Params)
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.QueryParamsResponse"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParamsResponse"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message svc.v1.QueryParamsResponse does not contain field %s", fd.FullName()))
|
panic(fmt.Errorf("message oracle.v1.QueryParamsResponse does not contain field %s", fd.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -547,16 +547,16 @@ func (x *fastReflection_QueryParamsResponse) Set(fd protoreflect.FieldDescriptor
|
|||||||
// Mutable is a mutating operation and unsafe for concurrent use.
|
// Mutable is a mutating operation and unsafe for concurrent use.
|
||||||
func (x *fastReflection_QueryParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
func (x *fastReflection_QueryParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||||
switch fd.FullName() {
|
switch fd.FullName() {
|
||||||
case "svc.v1.QueryParamsResponse.params":
|
case "oracle.v1.QueryParamsResponse.params":
|
||||||
if x.Params == nil {
|
if x.Params == nil {
|
||||||
x.Params = new(Params)
|
x.Params = new(Params)
|
||||||
}
|
}
|
||||||
return protoreflect.ValueOfMessage(x.Params.ProtoReflect())
|
return protoreflect.ValueOfMessage(x.Params.ProtoReflect())
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.QueryParamsResponse"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParamsResponse"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message svc.v1.QueryParamsResponse does not contain field %s", fd.FullName()))
|
panic(fmt.Errorf("message oracle.v1.QueryParamsResponse does not contain field %s", fd.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -565,14 +565,14 @@ func (x *fastReflection_QueryParamsResponse) Mutable(fd protoreflect.FieldDescri
|
|||||||
// For lists, maps, and messages, this returns a new, empty, mutable value.
|
// For lists, maps, and messages, this returns a new, empty, mutable value.
|
||||||
func (x *fastReflection_QueryParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
func (x *fastReflection_QueryParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||||
switch fd.FullName() {
|
switch fd.FullName() {
|
||||||
case "svc.v1.QueryParamsResponse.params":
|
case "oracle.v1.QueryParamsResponse.params":
|
||||||
m := new(Params)
|
m := new(Params)
|
||||||
return protoreflect.ValueOfMessage(m.ProtoReflect())
|
return protoreflect.ValueOfMessage(m.ProtoReflect())
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.QueryParamsResponse"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParamsResponse"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message svc.v1.QueryParamsResponse does not contain field %s", fd.FullName()))
|
panic(fmt.Errorf("message oracle.v1.QueryParamsResponse does not contain field %s", fd.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -582,7 +582,7 @@ func (x *fastReflection_QueryParamsResponse) NewField(fd protoreflect.FieldDescr
|
|||||||
func (x *fastReflection_QueryParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
func (x *fastReflection_QueryParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
||||||
switch d.FullName() {
|
switch d.FullName() {
|
||||||
default:
|
default:
|
||||||
panic(fmt.Errorf("%s is not a oneof field in svc.v1.QueryParamsResponse", d.FullName()))
|
panic(fmt.Errorf("%s is not a oneof field in oracle.v1.QueryParamsResponse", d.FullName()))
|
||||||
}
|
}
|
||||||
panic("unreachable")
|
panic("unreachable")
|
||||||
}
|
}
|
||||||
@@ -808,7 +808,7 @@ func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods
|
|||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.27.0
|
// protoc-gen-go v1.27.0
|
||||||
// protoc (unknown)
|
// protoc (unknown)
|
||||||
// source: svc/v1/query.proto
|
// source: oracle/v1/query.proto
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// Verify that this generated code is sufficiently up-to-date.
|
// Verify that this generated code is sufficiently up-to-date.
|
||||||
@@ -827,7 +827,7 @@ type QueryParamsRequest struct {
|
|||||||
func (x *QueryParamsRequest) Reset() {
|
func (x *QueryParamsRequest) Reset() {
|
||||||
*x = QueryParamsRequest{}
|
*x = QueryParamsRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_svc_v1_query_proto_msgTypes[0]
|
mi := &file_oracle_v1_query_proto_msgTypes[0]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -841,7 +841,7 @@ func (*QueryParamsRequest) ProtoMessage() {}
|
|||||||
|
|
||||||
// Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead.
|
// Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead.
|
||||||
func (*QueryParamsRequest) Descriptor() ([]byte, []int) {
|
func (*QueryParamsRequest) Descriptor() ([]byte, []int) {
|
||||||
return file_svc_v1_query_proto_rawDescGZIP(), []int{0}
|
return file_oracle_v1_query_proto_rawDescGZIP(), []int{0}
|
||||||
}
|
}
|
||||||
|
|
||||||
// QueryParamsResponse is the response type for the Query/Params RPC method.
|
// QueryParamsResponse is the response type for the Query/Params RPC method.
|
||||||
@@ -857,7 +857,7 @@ type QueryParamsResponse struct {
|
|||||||
func (x *QueryParamsResponse) Reset() {
|
func (x *QueryParamsResponse) Reset() {
|
||||||
*x = QueryParamsResponse{}
|
*x = QueryParamsResponse{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_svc_v1_query_proto_msgTypes[1]
|
mi := &file_oracle_v1_query_proto_msgTypes[1]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -871,7 +871,7 @@ func (*QueryParamsResponse) ProtoMessage() {}
|
|||||||
|
|
||||||
// Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead.
|
// Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead.
|
||||||
func (*QueryParamsResponse) Descriptor() ([]byte, []int) {
|
func (*QueryParamsResponse) Descriptor() ([]byte, []int) {
|
||||||
return file_svc_v1_query_proto_rawDescGZIP(), []int{1}
|
return file_oracle_v1_query_proto_rawDescGZIP(), []int{1}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *QueryParamsResponse) GetParams() *Params {
|
func (x *QueryParamsResponse) GetParams() *Params {
|
||||||
@@ -881,58 +881,61 @@ func (x *QueryParamsResponse) GetParams() *Params {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
var File_svc_v1_query_proto protoreflect.FileDescriptor
|
var File_oracle_v1_query_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_svc_v1_query_proto_rawDesc = []byte{
|
var file_oracle_v1_query_proto_rawDesc = []byte{
|
||||||
0x0a, 0x12, 0x73, 0x76, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70,
|
0x0a, 0x15, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72,
|
||||||
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f,
|
0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e,
|
||||||
0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
|
0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61,
|
||||||
0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x73, 0x76, 0x63, 0x2f,
|
0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||||
0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
0x1a, 0x17, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65,
|
||||||
0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52,
|
0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65,
|
||||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3d, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50,
|
0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22,
|
||||||
0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a,
|
0x40, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65,
|
||||||
0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e,
|
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73,
|
||||||
0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70,
|
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e,
|
||||||
0x61, 0x72, 0x61, 0x6d, 0x73, 0x32, 0x62, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x59,
|
0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d,
|
||||||
0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1a, 0x2e, 0x73, 0x76, 0x63, 0x2e, 0x76,
|
0x73, 0x32, 0x6b, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x62, 0x0a, 0x06, 0x50, 0x61,
|
||||||
0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71,
|
0x72, 0x61, 0x6d, 0x73, 0x12, 0x1d, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31,
|
||||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75,
|
0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75,
|
||||||
0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e,
|
||||||
0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x73, 0x76, 0x63, 0x2f,
|
0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||||
0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x7a, 0x0a, 0x0a, 0x63, 0x6f, 0x6d,
|
0x6e, 0x73, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x6f, 0x72,
|
||||||
0x2e, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72,
|
0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x8f,
|
||||||
0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
|
0x01, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31,
|
||||||
0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70,
|
0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2d,
|
||||||
0x69, 0x2f, 0x73, 0x76, 0x63, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x76, 0x63, 0x76, 0x31, 0xa2, 0x02,
|
0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e,
|
||||||
0x03, 0x53, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x53, 0x76, 0x63, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06,
|
0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c,
|
||||||
0x53, 0x76, 0x63, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12, 0x53, 0x76, 0x63, 0x5c, 0x56, 0x31, 0x5c,
|
0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03,
|
||||||
0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x53, 0x76,
|
0x4f, 0x58, 0x58, 0xaa, 0x02, 0x09, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca,
|
||||||
0x63, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x02, 0x09, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x15, 0x4f, 0x72,
|
||||||
|
0x61, 0x63, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64,
|
||||||
|
0x61, 0x74, 0x61, 0xea, 0x02, 0x0a, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31,
|
||||||
|
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
file_svc_v1_query_proto_rawDescOnce sync.Once
|
file_oracle_v1_query_proto_rawDescOnce sync.Once
|
||||||
file_svc_v1_query_proto_rawDescData = file_svc_v1_query_proto_rawDesc
|
file_oracle_v1_query_proto_rawDescData = file_oracle_v1_query_proto_rawDesc
|
||||||
)
|
)
|
||||||
|
|
||||||
func file_svc_v1_query_proto_rawDescGZIP() []byte {
|
func file_oracle_v1_query_proto_rawDescGZIP() []byte {
|
||||||
file_svc_v1_query_proto_rawDescOnce.Do(func() {
|
file_oracle_v1_query_proto_rawDescOnce.Do(func() {
|
||||||
file_svc_v1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_svc_v1_query_proto_rawDescData)
|
file_oracle_v1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_oracle_v1_query_proto_rawDescData)
|
||||||
})
|
})
|
||||||
return file_svc_v1_query_proto_rawDescData
|
return file_oracle_v1_query_proto_rawDescData
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_svc_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
var file_oracle_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||||
var file_svc_v1_query_proto_goTypes = []interface{}{
|
var file_oracle_v1_query_proto_goTypes = []interface{}{
|
||||||
(*QueryParamsRequest)(nil), // 0: svc.v1.QueryParamsRequest
|
(*QueryParamsRequest)(nil), // 0: oracle.v1.QueryParamsRequest
|
||||||
(*QueryParamsResponse)(nil), // 1: svc.v1.QueryParamsResponse
|
(*QueryParamsResponse)(nil), // 1: oracle.v1.QueryParamsResponse
|
||||||
(*Params)(nil), // 2: svc.v1.Params
|
(*Params)(nil), // 2: oracle.v1.Params
|
||||||
}
|
}
|
||||||
var file_svc_v1_query_proto_depIdxs = []int32{
|
var file_oracle_v1_query_proto_depIdxs = []int32{
|
||||||
2, // 0: svc.v1.QueryParamsResponse.params:type_name -> svc.v1.Params
|
2, // 0: oracle.v1.QueryParamsResponse.params:type_name -> oracle.v1.Params
|
||||||
0, // 1: svc.v1.Query.Params:input_type -> svc.v1.QueryParamsRequest
|
0, // 1: oracle.v1.Query.Params:input_type -> oracle.v1.QueryParamsRequest
|
||||||
1, // 2: svc.v1.Query.Params:output_type -> svc.v1.QueryParamsResponse
|
1, // 2: oracle.v1.Query.Params:output_type -> oracle.v1.QueryParamsResponse
|
||||||
2, // [2:3] is the sub-list for method output_type
|
2, // [2:3] is the sub-list for method output_type
|
||||||
1, // [1:2] is the sub-list for method input_type
|
1, // [1:2] is the sub-list for method input_type
|
||||||
1, // [1:1] is the sub-list for extension type_name
|
1, // [1:1] is the sub-list for extension type_name
|
||||||
@@ -940,14 +943,14 @@ var file_svc_v1_query_proto_depIdxs = []int32{
|
|||||||
0, // [0:1] is the sub-list for field type_name
|
0, // [0:1] is the sub-list for field type_name
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { file_svc_v1_query_proto_init() }
|
func init() { file_oracle_v1_query_proto_init() }
|
||||||
func file_svc_v1_query_proto_init() {
|
func file_oracle_v1_query_proto_init() {
|
||||||
if File_svc_v1_query_proto != nil {
|
if File_oracle_v1_query_proto != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
file_svc_v1_genesis_proto_init()
|
file_oracle_v1_genesis_proto_init()
|
||||||
if !protoimpl.UnsafeEnabled {
|
if !protoimpl.UnsafeEnabled {
|
||||||
file_svc_v1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
file_oracle_v1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*QueryParamsRequest); i {
|
switch v := v.(*QueryParamsRequest); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
@@ -959,7 +962,7 @@ func file_svc_v1_query_proto_init() {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_svc_v1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
file_oracle_v1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*QueryParamsResponse); i {
|
switch v := v.(*QueryParamsResponse); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
@@ -976,18 +979,18 @@ func file_svc_v1_query_proto_init() {
|
|||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: file_svc_v1_query_proto_rawDesc,
|
RawDescriptor: file_oracle_v1_query_proto_rawDesc,
|
||||||
NumEnums: 0,
|
NumEnums: 0,
|
||||||
NumMessages: 2,
|
NumMessages: 2,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 1,
|
NumServices: 1,
|
||||||
},
|
},
|
||||||
GoTypes: file_svc_v1_query_proto_goTypes,
|
GoTypes: file_oracle_v1_query_proto_goTypes,
|
||||||
DependencyIndexes: file_svc_v1_query_proto_depIdxs,
|
DependencyIndexes: file_oracle_v1_query_proto_depIdxs,
|
||||||
MessageInfos: file_svc_v1_query_proto_msgTypes,
|
MessageInfos: file_oracle_v1_query_proto_msgTypes,
|
||||||
}.Build()
|
}.Build()
|
||||||
File_svc_v1_query_proto = out.File
|
File_oracle_v1_query_proto = out.File
|
||||||
file_svc_v1_query_proto_rawDesc = nil
|
file_oracle_v1_query_proto_rawDesc = nil
|
||||||
file_svc_v1_query_proto_goTypes = nil
|
file_oracle_v1_query_proto_goTypes = nil
|
||||||
file_svc_v1_query_proto_depIdxs = nil
|
file_oracle_v1_query_proto_depIdxs = nil
|
||||||
}
|
}
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// - protoc-gen-go-grpc v1.5.1
|
// - protoc-gen-go-grpc v1.3.0
|
||||||
// - protoc (unknown)
|
// - protoc (unknown)
|
||||||
// source: svc/v1/query.proto
|
// source: oracle/v1/query.proto
|
||||||
|
|
||||||
package svcv1
|
package oraclev1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
context "context"
|
context "context"
|
||||||
@@ -15,18 +15,16 @@ import (
|
|||||||
|
|
||||||
// This is a compile-time assertion to ensure that this generated file
|
// This is a compile-time assertion to ensure that this generated file
|
||||||
// is compatible with the grpc package it is being compiled against.
|
// is compatible with the grpc package it is being compiled against.
|
||||||
// Requires gRPC-Go v1.64.0 or later.
|
// Requires gRPC-Go v1.32.0 or later.
|
||||||
const _ = grpc.SupportPackageIsVersion9
|
const _ = grpc.SupportPackageIsVersion7
|
||||||
|
|
||||||
const (
|
const (
|
||||||
Query_Params_FullMethodName = "/svc.v1.Query/Params"
|
Query_Params_FullMethodName = "/oracle.v1.Query/Params"
|
||||||
)
|
)
|
||||||
|
|
||||||
// QueryClient is the client API for Query service.
|
// QueryClient is the client API for Query service.
|
||||||
//
|
//
|
||||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||||
//
|
|
||||||
// Query provides defines the gRPC querier service.
|
|
||||||
type QueryClient interface {
|
type QueryClient interface {
|
||||||
// Params queries all parameters of the module.
|
// Params queries all parameters of the module.
|
||||||
Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
|
Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
|
||||||
@@ -41,9 +39,8 @@ func NewQueryClient(cc grpc.ClientConnInterface) QueryClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) {
|
func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) {
|
||||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
||||||
out := new(QueryParamsResponse)
|
out := new(QueryParamsResponse)
|
||||||
err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, cOpts...)
|
err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, opts...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -52,27 +49,21 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts .
|
|||||||
|
|
||||||
// QueryServer is the server API for Query service.
|
// QueryServer is the server API for Query service.
|
||||||
// All implementations must embed UnimplementedQueryServer
|
// All implementations must embed UnimplementedQueryServer
|
||||||
// for forward compatibility.
|
// for forward compatibility
|
||||||
//
|
|
||||||
// Query provides defines the gRPC querier service.
|
|
||||||
type QueryServer interface {
|
type QueryServer interface {
|
||||||
// Params queries all parameters of the module.
|
// Params queries all parameters of the module.
|
||||||
Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
|
Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
|
||||||
mustEmbedUnimplementedQueryServer()
|
mustEmbedUnimplementedQueryServer()
|
||||||
}
|
}
|
||||||
|
|
||||||
// UnimplementedQueryServer must be embedded to have
|
// UnimplementedQueryServer must be embedded to have forward compatible implementations.
|
||||||
// forward compatible implementations.
|
type UnimplementedQueryServer struct {
|
||||||
//
|
}
|
||||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
|
||||||
// pointer dereference when methods are called.
|
|
||||||
type UnimplementedQueryServer struct{}
|
|
||||||
|
|
||||||
func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) {
|
func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method Params not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method Params not implemented")
|
||||||
}
|
}
|
||||||
func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {}
|
func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {}
|
||||||
func (UnimplementedQueryServer) testEmbeddedByValue() {}
|
|
||||||
|
|
||||||
// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service.
|
// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service.
|
||||||
// Use of this interface is not recommended, as added methods to QueryServer will
|
// Use of this interface is not recommended, as added methods to QueryServer will
|
||||||
@@ -82,13 +73,6 @@ type UnsafeQueryServer interface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) {
|
func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) {
|
||||||
// If the following call pancis, it indicates UnimplementedQueryServer was
|
|
||||||
// embedded by pointer and is nil. This will cause panics if an
|
|
||||||
// unimplemented method is ever invoked, so we test this at initialization
|
|
||||||
// time to prevent it from happening at runtime later due to I/O.
|
|
||||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
|
||||||
t.testEmbeddedByValue()
|
|
||||||
}
|
|
||||||
s.RegisterService(&Query_ServiceDesc, srv)
|
s.RegisterService(&Query_ServiceDesc, srv)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -114,7 +98,7 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf
|
|||||||
// It's only intended for direct use with grpc.RegisterService,
|
// It's only intended for direct use with grpc.RegisterService,
|
||||||
// and not to be introspected or modified (even as a copy)
|
// and not to be introspected or modified (even as a copy)
|
||||||
var Query_ServiceDesc = grpc.ServiceDesc{
|
var Query_ServiceDesc = grpc.ServiceDesc{
|
||||||
ServiceName: "svc.v1.Query",
|
ServiceName: "oracle.v1.Query",
|
||||||
HandlerType: (*QueryServer)(nil),
|
HandlerType: (*QueryServer)(nil),
|
||||||
Methods: []grpc.MethodDesc{
|
Methods: []grpc.MethodDesc{
|
||||||
{
|
{
|
||||||
@@ -123,5 +107,5 @@ var Query_ServiceDesc = grpc.ServiceDesc{
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
Streams: []grpc.StreamDesc{},
|
Streams: []grpc.StreamDesc{},
|
||||||
Metadata: "svc/v1/query.proto",
|
Metadata: "oracle/v1/query.proto",
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,342 @@
|
|||||||
|
// Code generated by protoc-gen-go-cosmos-orm. DO NOT EDIT.
|
||||||
|
|
||||||
|
package oraclev1
|
||||||
|
|
||||||
|
import (
|
||||||
|
context "context"
|
||||||
|
ormlist "cosmossdk.io/orm/model/ormlist"
|
||||||
|
ormtable "cosmossdk.io/orm/model/ormtable"
|
||||||
|
ormerrors "cosmossdk.io/orm/types/ormerrors"
|
||||||
|
)
|
||||||
|
|
||||||
|
type BalanceTable interface {
|
||||||
|
Insert(ctx context.Context, balance *Balance) error
|
||||||
|
Update(ctx context.Context, balance *Balance) error
|
||||||
|
Save(ctx context.Context, balance *Balance) error
|
||||||
|
Delete(ctx context.Context, balance *Balance) error
|
||||||
|
Has(ctx context.Context, account string) (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, account string) (*Balance, error)
|
||||||
|
List(ctx context.Context, prefixKey BalanceIndexKey, opts ...ormlist.Option) (BalanceIterator, error)
|
||||||
|
ListRange(ctx context.Context, from, to BalanceIndexKey, opts ...ormlist.Option) (BalanceIterator, error)
|
||||||
|
DeleteBy(ctx context.Context, prefixKey BalanceIndexKey) error
|
||||||
|
DeleteRange(ctx context.Context, from, to BalanceIndexKey) error
|
||||||
|
|
||||||
|
doNotImplement()
|
||||||
|
}
|
||||||
|
|
||||||
|
type BalanceIterator struct {
|
||||||
|
ormtable.Iterator
|
||||||
|
}
|
||||||
|
|
||||||
|
func (i BalanceIterator) Value() (*Balance, error) {
|
||||||
|
var balance Balance
|
||||||
|
err := i.UnmarshalMessage(&balance)
|
||||||
|
return &balance, err
|
||||||
|
}
|
||||||
|
|
||||||
|
type BalanceIndexKey interface {
|
||||||
|
id() uint32
|
||||||
|
values() []interface{}
|
||||||
|
balanceIndexKey()
|
||||||
|
}
|
||||||
|
|
||||||
|
// primary key starting index..
|
||||||
|
type BalancePrimaryKey = BalanceAccountIndexKey
|
||||||
|
|
||||||
|
type BalanceAccountIndexKey struct {
|
||||||
|
vs []interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x BalanceAccountIndexKey) id() uint32 { return 0 }
|
||||||
|
func (x BalanceAccountIndexKey) values() []interface{} { return x.vs }
|
||||||
|
func (x BalanceAccountIndexKey) balanceIndexKey() {}
|
||||||
|
|
||||||
|
func (this BalanceAccountIndexKey) WithAccount(account string) BalanceAccountIndexKey {
|
||||||
|
this.vs = []interface{}{account}
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
type BalanceAmountIndexKey struct {
|
||||||
|
vs []interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x BalanceAmountIndexKey) id() uint32 { return 1 }
|
||||||
|
func (x BalanceAmountIndexKey) values() []interface{} { return x.vs }
|
||||||
|
func (x BalanceAmountIndexKey) balanceIndexKey() {}
|
||||||
|
|
||||||
|
func (this BalanceAmountIndexKey) WithAmount(amount uint64) BalanceAmountIndexKey {
|
||||||
|
this.vs = []interface{}{amount}
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
type balanceTable struct {
|
||||||
|
table ormtable.Table
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this balanceTable) Insert(ctx context.Context, balance *Balance) error {
|
||||||
|
return this.table.Insert(ctx, balance)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this balanceTable) Update(ctx context.Context, balance *Balance) error {
|
||||||
|
return this.table.Update(ctx, balance)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this balanceTable) Save(ctx context.Context, balance *Balance) error {
|
||||||
|
return this.table.Save(ctx, balance)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this balanceTable) Delete(ctx context.Context, balance *Balance) error {
|
||||||
|
return this.table.Delete(ctx, balance)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this balanceTable) Has(ctx context.Context, account string) (found bool, err error) {
|
||||||
|
return this.table.PrimaryKey().Has(ctx, account)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this balanceTable) Get(ctx context.Context, account string) (*Balance, error) {
|
||||||
|
var balance Balance
|
||||||
|
found, err := this.table.PrimaryKey().Get(ctx, &balance, account)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if !found {
|
||||||
|
return nil, ormerrors.NotFound
|
||||||
|
}
|
||||||
|
return &balance, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this balanceTable) List(ctx context.Context, prefixKey BalanceIndexKey, opts ...ormlist.Option) (BalanceIterator, error) {
|
||||||
|
it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...)
|
||||||
|
return BalanceIterator{it}, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this balanceTable) ListRange(ctx context.Context, from, to BalanceIndexKey, opts ...ormlist.Option) (BalanceIterator, error) {
|
||||||
|
it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...)
|
||||||
|
return BalanceIterator{it}, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this balanceTable) DeleteBy(ctx context.Context, prefixKey BalanceIndexKey) error {
|
||||||
|
return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this balanceTable) DeleteRange(ctx context.Context, from, to BalanceIndexKey) error {
|
||||||
|
return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values())
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this balanceTable) doNotImplement() {}
|
||||||
|
|
||||||
|
var _ BalanceTable = balanceTable{}
|
||||||
|
|
||||||
|
func NewBalanceTable(db ormtable.Schema) (BalanceTable, error) {
|
||||||
|
table := db.GetTable(&Balance{})
|
||||||
|
if table == nil {
|
||||||
|
return nil, ormerrors.TableNotFound.Wrap(string((&Balance{}).ProtoReflect().Descriptor().FullName()))
|
||||||
|
}
|
||||||
|
return balanceTable{table}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type AccountTable interface {
|
||||||
|
Insert(ctx context.Context, account *Account) error
|
||||||
|
Update(ctx context.Context, account *Account) error
|
||||||
|
Save(ctx context.Context, account *Account) error
|
||||||
|
Delete(ctx context.Context, account *Account) 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) (*Account, error)
|
||||||
|
HasByAddressChainNetwork(ctx context.Context, address string, chain string, network string) (found bool, err error)
|
||||||
|
// GetByAddressChainNetwork returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
||||||
|
GetByAddressChainNetwork(ctx context.Context, address string, chain string, network string) (*Account, error)
|
||||||
|
List(ctx context.Context, prefixKey AccountIndexKey, opts ...ormlist.Option) (AccountIterator, error)
|
||||||
|
ListRange(ctx context.Context, from, to AccountIndexKey, opts ...ormlist.Option) (AccountIterator, error)
|
||||||
|
DeleteBy(ctx context.Context, prefixKey AccountIndexKey) error
|
||||||
|
DeleteRange(ctx context.Context, from, to AccountIndexKey) error
|
||||||
|
|
||||||
|
doNotImplement()
|
||||||
|
}
|
||||||
|
|
||||||
|
type AccountIterator struct {
|
||||||
|
ormtable.Iterator
|
||||||
|
}
|
||||||
|
|
||||||
|
func (i AccountIterator) Value() (*Account, error) {
|
||||||
|
var account Account
|
||||||
|
err := i.UnmarshalMessage(&account)
|
||||||
|
return &account, err
|
||||||
|
}
|
||||||
|
|
||||||
|
type AccountIndexKey interface {
|
||||||
|
id() uint32
|
||||||
|
values() []interface{}
|
||||||
|
accountIndexKey()
|
||||||
|
}
|
||||||
|
|
||||||
|
// primary key starting index..
|
||||||
|
type AccountPrimaryKey = AccountIdIndexKey
|
||||||
|
|
||||||
|
type AccountIdIndexKey struct {
|
||||||
|
vs []interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x AccountIdIndexKey) id() uint32 { return 0 }
|
||||||
|
func (x AccountIdIndexKey) values() []interface{} { return x.vs }
|
||||||
|
func (x AccountIdIndexKey) accountIndexKey() {}
|
||||||
|
|
||||||
|
func (this AccountIdIndexKey) WithId(id uint64) AccountIdIndexKey {
|
||||||
|
this.vs = []interface{}{id}
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
type AccountAddressChainNetworkIndexKey struct {
|
||||||
|
vs []interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x AccountAddressChainNetworkIndexKey) id() uint32 { return 1 }
|
||||||
|
func (x AccountAddressChainNetworkIndexKey) values() []interface{} { return x.vs }
|
||||||
|
func (x AccountAddressChainNetworkIndexKey) accountIndexKey() {}
|
||||||
|
|
||||||
|
func (this AccountAddressChainNetworkIndexKey) WithAddress(address string) AccountAddressChainNetworkIndexKey {
|
||||||
|
this.vs = []interface{}{address}
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this AccountAddressChainNetworkIndexKey) WithAddressChain(address string, chain string) AccountAddressChainNetworkIndexKey {
|
||||||
|
this.vs = []interface{}{address, chain}
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this AccountAddressChainNetworkIndexKey) WithAddressChainNetwork(address string, chain string, network string) AccountAddressChainNetworkIndexKey {
|
||||||
|
this.vs = []interface{}{address, chain, network}
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
type accountTable struct {
|
||||||
|
table ormtable.Table
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this accountTable) Insert(ctx context.Context, account *Account) error {
|
||||||
|
return this.table.Insert(ctx, account)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this accountTable) Update(ctx context.Context, account *Account) error {
|
||||||
|
return this.table.Update(ctx, account)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this accountTable) Save(ctx context.Context, account *Account) error {
|
||||||
|
return this.table.Save(ctx, account)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this accountTable) Delete(ctx context.Context, account *Account) error {
|
||||||
|
return this.table.Delete(ctx, account)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this accountTable) Has(ctx context.Context, id uint64) (found bool, err error) {
|
||||||
|
return this.table.PrimaryKey().Has(ctx, id)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this accountTable) Get(ctx context.Context, id uint64) (*Account, error) {
|
||||||
|
var account Account
|
||||||
|
found, err := this.table.PrimaryKey().Get(ctx, &account, id)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if !found {
|
||||||
|
return nil, ormerrors.NotFound
|
||||||
|
}
|
||||||
|
return &account, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this accountTable) HasByAddressChainNetwork(ctx context.Context, address string, chain string, network string) (found bool, err error) {
|
||||||
|
return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx,
|
||||||
|
address,
|
||||||
|
chain,
|
||||||
|
network,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this accountTable) GetByAddressChainNetwork(ctx context.Context, address string, chain string, network string) (*Account, error) {
|
||||||
|
var account Account
|
||||||
|
found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &account,
|
||||||
|
address,
|
||||||
|
chain,
|
||||||
|
network,
|
||||||
|
)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if !found {
|
||||||
|
return nil, ormerrors.NotFound
|
||||||
|
}
|
||||||
|
return &account, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this accountTable) List(ctx context.Context, prefixKey AccountIndexKey, opts ...ormlist.Option) (AccountIterator, error) {
|
||||||
|
it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...)
|
||||||
|
return AccountIterator{it}, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this accountTable) ListRange(ctx context.Context, from, to AccountIndexKey, opts ...ormlist.Option) (AccountIterator, error) {
|
||||||
|
it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...)
|
||||||
|
return AccountIterator{it}, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this accountTable) DeleteBy(ctx context.Context, prefixKey AccountIndexKey) error {
|
||||||
|
return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this accountTable) DeleteRange(ctx context.Context, from, to AccountIndexKey) error {
|
||||||
|
return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values())
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this accountTable) doNotImplement() {}
|
||||||
|
|
||||||
|
var _ AccountTable = accountTable{}
|
||||||
|
|
||||||
|
func NewAccountTable(db ormtable.Schema) (AccountTable, error) {
|
||||||
|
table := db.GetTable(&Account{})
|
||||||
|
if table == nil {
|
||||||
|
return nil, ormerrors.TableNotFound.Wrap(string((&Account{}).ProtoReflect().Descriptor().FullName()))
|
||||||
|
}
|
||||||
|
return accountTable{table}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type StateStore interface {
|
||||||
|
BalanceTable() BalanceTable
|
||||||
|
AccountTable() AccountTable
|
||||||
|
|
||||||
|
doNotImplement()
|
||||||
|
}
|
||||||
|
|
||||||
|
type stateStore struct {
|
||||||
|
balance BalanceTable
|
||||||
|
account AccountTable
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x stateStore) BalanceTable() BalanceTable {
|
||||||
|
return x.balance
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x stateStore) AccountTable() AccountTable {
|
||||||
|
return x.account
|
||||||
|
}
|
||||||
|
|
||||||
|
func (stateStore) doNotImplement() {}
|
||||||
|
|
||||||
|
var _ StateStore = stateStore{}
|
||||||
|
|
||||||
|
func NewStateStore(db ormtable.Schema) (StateStore, error) {
|
||||||
|
balanceTable, err := NewBalanceTable(db)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
accountTable, err := NewAccountTable(db)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return stateStore{
|
||||||
|
balanceTable,
|
||||||
|
accountTable,
|
||||||
|
}, nil
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,115 @@
|
|||||||
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// - protoc-gen-go-grpc v1.3.0
|
||||||
|
// - protoc (unknown)
|
||||||
|
// source: oracle/v1/tx.proto
|
||||||
|
|
||||||
|
package oraclev1
|
||||||
|
|
||||||
|
import (
|
||||||
|
context "context"
|
||||||
|
grpc "google.golang.org/grpc"
|
||||||
|
codes "google.golang.org/grpc/codes"
|
||||||
|
status "google.golang.org/grpc/status"
|
||||||
|
)
|
||||||
|
|
||||||
|
// This is a compile-time assertion to ensure that this generated file
|
||||||
|
// is compatible with the grpc package it is being compiled against.
|
||||||
|
// Requires gRPC-Go v1.32.0 or later.
|
||||||
|
const _ = grpc.SupportPackageIsVersion7
|
||||||
|
|
||||||
|
const (
|
||||||
|
Msg_UpdateParams_FullMethodName = "/oracle.v1.Msg/UpdateParams"
|
||||||
|
)
|
||||||
|
|
||||||
|
// MsgClient is the client API for Msg service.
|
||||||
|
//
|
||||||
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||||
|
type MsgClient interface {
|
||||||
|
// UpdateParams defines a governance operation for updating the parameters.
|
||||||
|
//
|
||||||
|
// Since: cosmos-sdk 0.47
|
||||||
|
UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
type msgClient struct {
|
||||||
|
cc grpc.ClientConnInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewMsgClient(cc grpc.ClientConnInterface) MsgClient {
|
||||||
|
return &msgClient{cc}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) {
|
||||||
|
out := new(MsgUpdateParamsResponse)
|
||||||
|
err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MsgServer is the server API for Msg service.
|
||||||
|
// All implementations must embed UnimplementedMsgServer
|
||||||
|
// for forward compatibility
|
||||||
|
type MsgServer interface {
|
||||||
|
// UpdateParams defines a governance operation for updating the parameters.
|
||||||
|
//
|
||||||
|
// Since: cosmos-sdk 0.47
|
||||||
|
UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
|
||||||
|
mustEmbedUnimplementedMsgServer()
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnimplementedMsgServer must be embedded to have forward compatible implementations.
|
||||||
|
type UnimplementedMsgServer struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {}
|
||||||
|
|
||||||
|
// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service.
|
||||||
|
// Use of this interface is not recommended, as added methods to MsgServer will
|
||||||
|
// result in compilation errors.
|
||||||
|
type UnsafeMsgServer interface {
|
||||||
|
mustEmbedUnimplementedMsgServer()
|
||||||
|
}
|
||||||
|
|
||||||
|
func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) {
|
||||||
|
s.RegisterService(&Msg_ServiceDesc, srv)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(MsgUpdateParams)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(MsgServer).UpdateParams(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: Msg_UpdateParams_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service.
|
||||||
|
// It's only intended for direct use with grpc.RegisterService,
|
||||||
|
// and not to be introspected or modified (even as a copy)
|
||||||
|
var Msg_ServiceDesc = grpc.ServiceDesc{
|
||||||
|
ServiceName: "oracle.v1.Msg",
|
||||||
|
HandlerType: (*MsgServer)(nil),
|
||||||
|
Methods: []grpc.MethodDesc{
|
||||||
|
{
|
||||||
|
MethodName: "UpdateParams",
|
||||||
|
Handler: _Msg_UpdateParams_Handler,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Streams: []grpc.StreamDesc{},
|
||||||
|
Metadata: "oracle/v1/tx.proto",
|
||||||
|
}
|
||||||
@@ -18,8 +18,8 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
file_svc_module_v1_module_proto_init()
|
file_service_module_v1_module_proto_init()
|
||||||
md_Module = File_svc_module_v1_module_proto.Messages().ByName("Module")
|
md_Module = File_service_module_v1_module_proto.Messages().ByName("Module")
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ protoreflect.Message = (*fastReflection_Module)(nil)
|
var _ protoreflect.Message = (*fastReflection_Module)(nil)
|
||||||
@@ -31,7 +31,7 @@ func (x *Module) ProtoReflect() protoreflect.Message {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (x *Module) slowProtoReflect() protoreflect.Message {
|
func (x *Module) slowProtoReflect() protoreflect.Message {
|
||||||
mi := &file_svc_module_v1_module_proto_msgTypes[0]
|
mi := &file_service_module_v1_module_proto_msgTypes[0]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -104,9 +104,9 @@ func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool {
|
|||||||
switch fd.FullName() {
|
switch fd.FullName() {
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.module.v1.Module"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.module.v1.Module"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message svc.module.v1.Module does not contain field %s", fd.FullName()))
|
panic(fmt.Errorf("message service.module.v1.Module does not contain field %s", fd.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -120,9 +120,9 @@ func (x *fastReflection_Module) Clear(fd protoreflect.FieldDescriptor) {
|
|||||||
switch fd.FullName() {
|
switch fd.FullName() {
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.module.v1.Module"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.module.v1.Module"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message svc.module.v1.Module does not contain field %s", fd.FullName()))
|
panic(fmt.Errorf("message service.module.v1.Module does not contain field %s", fd.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -136,9 +136,9 @@ func (x *fastReflection_Module) Get(descriptor protoreflect.FieldDescriptor) pro
|
|||||||
switch descriptor.FullName() {
|
switch descriptor.FullName() {
|
||||||
default:
|
default:
|
||||||
if descriptor.IsExtension() {
|
if descriptor.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.module.v1.Module"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.module.v1.Module"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message svc.module.v1.Module does not contain field %s", descriptor.FullName()))
|
panic(fmt.Errorf("message service.module.v1.Module does not contain field %s", descriptor.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -156,9 +156,9 @@ func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value proto
|
|||||||
switch fd.FullName() {
|
switch fd.FullName() {
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.module.v1.Module"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.module.v1.Module"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message svc.module.v1.Module does not contain field %s", fd.FullName()))
|
panic(fmt.Errorf("message service.module.v1.Module does not contain field %s", fd.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -176,9 +176,9 @@ func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protore
|
|||||||
switch fd.FullName() {
|
switch fd.FullName() {
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.module.v1.Module"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.module.v1.Module"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message svc.module.v1.Module does not contain field %s", fd.FullName()))
|
panic(fmt.Errorf("message service.module.v1.Module does not contain field %s", fd.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -189,9 +189,9 @@ func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protor
|
|||||||
switch fd.FullName() {
|
switch fd.FullName() {
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.module.v1.Module"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.module.v1.Module"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message svc.module.v1.Module does not contain field %s", fd.FullName()))
|
panic(fmt.Errorf("message service.module.v1.Module does not contain field %s", fd.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -201,7 +201,7 @@ func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protor
|
|||||||
func (x *fastReflection_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
func (x *fastReflection_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
||||||
switch d.FullName() {
|
switch d.FullName() {
|
||||||
default:
|
default:
|
||||||
panic(fmt.Errorf("%s is not a oneof field in svc.module.v1.Module", d.FullName()))
|
panic(fmt.Errorf("%s is not a oneof field in service.module.v1.Module", d.FullName()))
|
||||||
}
|
}
|
||||||
panic("unreachable")
|
panic("unreachable")
|
||||||
}
|
}
|
||||||
@@ -373,7 +373,7 @@ func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods {
|
|||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.27.0
|
// protoc-gen-go v1.27.0
|
||||||
// protoc (unknown)
|
// protoc (unknown)
|
||||||
// source: svc/module/v1/module.proto
|
// source: service/module/v1/module.proto
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// Verify that this generated code is sufficiently up-to-date.
|
// Verify that this generated code is sufficiently up-to-date.
|
||||||
@@ -393,7 +393,7 @@ type Module struct {
|
|||||||
func (x *Module) Reset() {
|
func (x *Module) Reset() {
|
||||||
*x = Module{}
|
*x = Module{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_svc_module_v1_module_proto_msgTypes[0]
|
mi := &file_service_module_v1_module_proto_msgTypes[0]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -407,50 +407,52 @@ func (*Module) ProtoMessage() {}
|
|||||||
|
|
||||||
// Deprecated: Use Module.ProtoReflect.Descriptor instead.
|
// Deprecated: Use Module.ProtoReflect.Descriptor instead.
|
||||||
func (*Module) Descriptor() ([]byte, []int) {
|
func (*Module) Descriptor() ([]byte, []int) {
|
||||||
return file_svc_module_v1_module_proto_rawDescGZIP(), []int{0}
|
return file_service_module_v1_module_proto_rawDescGZIP(), []int{0}
|
||||||
}
|
}
|
||||||
|
|
||||||
var File_svc_module_v1_module_proto protoreflect.FileDescriptor
|
var File_service_module_v1_module_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_svc_module_v1_module_proto_rawDesc = []byte{
|
var file_service_module_v1_module_proto_rawDesc = []byte{
|
||||||
0x0a, 0x1a, 0x73, 0x76, 0x63, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f,
|
0x0a, 0x1e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65,
|
||||||
0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x73, 0x76,
|
0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||||
0x63, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73,
|
0x12, 0x11, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65,
|
||||||
0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
|
0x2e, 0x76, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f,
|
||||||
0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x28, 0x0a,
|
0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e,
|
||||||
0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x1e, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x18, 0x0a,
|
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x28, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a,
|
||||||
0x16, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f,
|
0x1e, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x18, 0x0a, 0x16, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
|
||||||
0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x42, 0xa9, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e,
|
0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x42,
|
||||||
0x73, 0x76, 0x63, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d,
|
0xc1, 0x01, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e,
|
||||||
0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69,
|
0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c,
|
||||||
0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f,
|
0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
|
||||||
0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x76, 0x63, 0x2f, 0x6d, 0x6f, 0x64,
|
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72,
|
||||||
|
0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6d, 0x6f, 0x64,
|
||||||
0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2,
|
0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2,
|
||||||
0x02, 0x03, 0x53, 0x4d, 0x58, 0xaa, 0x02, 0x0d, 0x53, 0x76, 0x63, 0x2e, 0x4d, 0x6f, 0x64, 0x75,
|
0x02, 0x03, 0x53, 0x4d, 0x58, 0xaa, 0x02, 0x11, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e,
|
||||||
0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x53, 0x76, 0x63, 0x5c, 0x4d, 0x6f, 0x64, 0x75,
|
0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x11, 0x53, 0x65, 0x72, 0x76,
|
||||||
0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x53, 0x76, 0x63, 0x5c, 0x4d, 0x6f, 0x64, 0x75,
|
0x69, 0x63, 0x65, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1d,
|
||||||
0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
|
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56,
|
||||||
0x61, 0xea, 0x02, 0x0f, 0x53, 0x76, 0x63, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a,
|
0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13,
|
||||||
|
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a,
|
||||||
0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
file_svc_module_v1_module_proto_rawDescOnce sync.Once
|
file_service_module_v1_module_proto_rawDescOnce sync.Once
|
||||||
file_svc_module_v1_module_proto_rawDescData = file_svc_module_v1_module_proto_rawDesc
|
file_service_module_v1_module_proto_rawDescData = file_service_module_v1_module_proto_rawDesc
|
||||||
)
|
)
|
||||||
|
|
||||||
func file_svc_module_v1_module_proto_rawDescGZIP() []byte {
|
func file_service_module_v1_module_proto_rawDescGZIP() []byte {
|
||||||
file_svc_module_v1_module_proto_rawDescOnce.Do(func() {
|
file_service_module_v1_module_proto_rawDescOnce.Do(func() {
|
||||||
file_svc_module_v1_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_svc_module_v1_module_proto_rawDescData)
|
file_service_module_v1_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_module_v1_module_proto_rawDescData)
|
||||||
})
|
})
|
||||||
return file_svc_module_v1_module_proto_rawDescData
|
return file_service_module_v1_module_proto_rawDescData
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_svc_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
var file_service_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||||
var file_svc_module_v1_module_proto_goTypes = []interface{}{
|
var file_service_module_v1_module_proto_goTypes = []interface{}{
|
||||||
(*Module)(nil), // 0: svc.module.v1.Module
|
(*Module)(nil), // 0: service.module.v1.Module
|
||||||
}
|
}
|
||||||
var file_svc_module_v1_module_proto_depIdxs = []int32{
|
var file_service_module_v1_module_proto_depIdxs = []int32{
|
||||||
0, // [0:0] is the sub-list for method output_type
|
0, // [0:0] is the sub-list for method output_type
|
||||||
0, // [0:0] is the sub-list for method input_type
|
0, // [0:0] is the sub-list for method input_type
|
||||||
0, // [0:0] is the sub-list for extension type_name
|
0, // [0:0] is the sub-list for extension type_name
|
||||||
@@ -458,13 +460,13 @@ var file_svc_module_v1_module_proto_depIdxs = []int32{
|
|||||||
0, // [0:0] is the sub-list for field type_name
|
0, // [0:0] is the sub-list for field type_name
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { file_svc_module_v1_module_proto_init() }
|
func init() { file_service_module_v1_module_proto_init() }
|
||||||
func file_svc_module_v1_module_proto_init() {
|
func file_service_module_v1_module_proto_init() {
|
||||||
if File_svc_module_v1_module_proto != nil {
|
if File_service_module_v1_module_proto != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
if !protoimpl.UnsafeEnabled {
|
||||||
file_svc_module_v1_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
file_service_module_v1_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*Module); i {
|
switch v := v.(*Module); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
@@ -481,18 +483,18 @@ func file_svc_module_v1_module_proto_init() {
|
|||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: file_svc_module_v1_module_proto_rawDesc,
|
RawDescriptor: file_service_module_v1_module_proto_rawDesc,
|
||||||
NumEnums: 0,
|
NumEnums: 0,
|
||||||
NumMessages: 1,
|
NumMessages: 1,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 0,
|
NumServices: 0,
|
||||||
},
|
},
|
||||||
GoTypes: file_svc_module_v1_module_proto_goTypes,
|
GoTypes: file_service_module_v1_module_proto_goTypes,
|
||||||
DependencyIndexes: file_svc_module_v1_module_proto_depIdxs,
|
DependencyIndexes: file_service_module_v1_module_proto_depIdxs,
|
||||||
MessageInfos: file_svc_module_v1_module_proto_msgTypes,
|
MessageInfos: file_service_module_v1_module_proto_msgTypes,
|
||||||
}.Build()
|
}.Build()
|
||||||
File_svc_module_v1_module_proto = out.File
|
File_service_module_v1_module_proto = out.File
|
||||||
file_svc_module_v1_module_proto_rawDesc = nil
|
file_service_module_v1_module_proto_rawDesc = nil
|
||||||
file_svc_module_v1_module_proto_goTypes = nil
|
file_service_module_v1_module_proto_goTypes = nil
|
||||||
file_svc_module_v1_module_proto_depIdxs = nil
|
file_service_module_v1_module_proto_depIdxs = nil
|
||||||
}
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,997 @@
|
|||||||
|
// Code generated by protoc-gen-go-pulsar. DO NOT EDIT.
|
||||||
|
package servicev1
|
||||||
|
|
||||||
|
import (
|
||||||
|
fmt "fmt"
|
||||||
|
runtime "github.com/cosmos/cosmos-proto/runtime"
|
||||||
|
_ "google.golang.org/genproto/googleapis/api/annotations"
|
||||||
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
|
protoiface "google.golang.org/protobuf/runtime/protoiface"
|
||||||
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||||
|
io "io"
|
||||||
|
reflect "reflect"
|
||||||
|
sync "sync"
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
md_QueryParamsRequest protoreflect.MessageDescriptor
|
||||||
|
)
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
file_service_v1_query_proto_init()
|
||||||
|
md_QueryParamsRequest = File_service_v1_query_proto.Messages().ByName("QueryParamsRequest")
|
||||||
|
}
|
||||||
|
|
||||||
|
var _ protoreflect.Message = (*fastReflection_QueryParamsRequest)(nil)
|
||||||
|
|
||||||
|
type fastReflection_QueryParamsRequest QueryParamsRequest
|
||||||
|
|
||||||
|
func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
return (*fastReflection_QueryParamsRequest)(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_service_v1_query_proto_msgTypes[0]
|
||||||
|
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_QueryParamsRequest_messageType fastReflection_QueryParamsRequest_messageType
|
||||||
|
var _ protoreflect.MessageType = fastReflection_QueryParamsRequest_messageType{}
|
||||||
|
|
||||||
|
type fastReflection_QueryParamsRequest_messageType struct{}
|
||||||
|
|
||||||
|
func (x fastReflection_QueryParamsRequest_messageType) Zero() protoreflect.Message {
|
||||||
|
return (*fastReflection_QueryParamsRequest)(nil)
|
||||||
|
}
|
||||||
|
func (x fastReflection_QueryParamsRequest_messageType) New() protoreflect.Message {
|
||||||
|
return new(fastReflection_QueryParamsRequest)
|
||||||
|
}
|
||||||
|
func (x fastReflection_QueryParamsRequest_messageType) Descriptor() protoreflect.MessageDescriptor {
|
||||||
|
return md_QueryParamsRequest
|
||||||
|
}
|
||||||
|
|
||||||
|
// Descriptor returns message descriptor, which contains only the protobuf
|
||||||
|
// type information for the message.
|
||||||
|
func (x *fastReflection_QueryParamsRequest) Descriptor() protoreflect.MessageDescriptor {
|
||||||
|
return md_QueryParamsRequest
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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_QueryParamsRequest) Type() protoreflect.MessageType {
|
||||||
|
return _fastReflection_QueryParamsRequest_messageType
|
||||||
|
}
|
||||||
|
|
||||||
|
// New returns a newly allocated and mutable empty message.
|
||||||
|
func (x *fastReflection_QueryParamsRequest) New() protoreflect.Message {
|
||||||
|
return new(fastReflection_QueryParamsRequest)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Interface unwraps the message reflection interface and
|
||||||
|
// returns the underlying ProtoMessage interface.
|
||||||
|
func (x *fastReflection_QueryParamsRequest) Interface() protoreflect.ProtoMessage {
|
||||||
|
return (*QueryParamsRequest)(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_QueryParamsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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_QueryParamsRequest) Has(fd protoreflect.FieldDescriptor) bool {
|
||||||
|
switch fd.FullName() {
|
||||||
|
default:
|
||||||
|
if fd.IsExtension() {
|
||||||
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.QueryParamsRequest"))
|
||||||
|
}
|
||||||
|
panic(fmt.Errorf("message service.v1.QueryParamsRequest 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_QueryParamsRequest) Clear(fd protoreflect.FieldDescriptor) {
|
||||||
|
switch fd.FullName() {
|
||||||
|
default:
|
||||||
|
if fd.IsExtension() {
|
||||||
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.QueryParamsRequest"))
|
||||||
|
}
|
||||||
|
panic(fmt.Errorf("message service.v1.QueryParamsRequest 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_QueryParamsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
|
||||||
|
switch descriptor.FullName() {
|
||||||
|
default:
|
||||||
|
if descriptor.IsExtension() {
|
||||||
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.QueryParamsRequest"))
|
||||||
|
}
|
||||||
|
panic(fmt.Errorf("message service.v1.QueryParamsRequest 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_QueryParamsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
|
||||||
|
switch fd.FullName() {
|
||||||
|
default:
|
||||||
|
if fd.IsExtension() {
|
||||||
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.QueryParamsRequest"))
|
||||||
|
}
|
||||||
|
panic(fmt.Errorf("message service.v1.QueryParamsRequest 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_QueryParamsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||||
|
switch fd.FullName() {
|
||||||
|
default:
|
||||||
|
if fd.IsExtension() {
|
||||||
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.QueryParamsRequest"))
|
||||||
|
}
|
||||||
|
panic(fmt.Errorf("message service.v1.QueryParamsRequest 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_QueryParamsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||||
|
switch fd.FullName() {
|
||||||
|
default:
|
||||||
|
if fd.IsExtension() {
|
||||||
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.QueryParamsRequest"))
|
||||||
|
}
|
||||||
|
panic(fmt.Errorf("message service.v1.QueryParamsRequest 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_QueryParamsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
||||||
|
switch d.FullName() {
|
||||||
|
default:
|
||||||
|
panic(fmt.Errorf("%s is not a oneof field in service.v1.QueryParamsRequest", 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_QueryParamsRequest) 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_QueryParamsRequest) 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_QueryParamsRequest) 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_QueryParamsRequest) ProtoMethods() *protoiface.Methods {
|
||||||
|
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
|
||||||
|
x := input.Message.Interface().(*QueryParamsRequest)
|
||||||
|
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.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().(*QueryParamsRequest)
|
||||||
|
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 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().(*QueryParamsRequest)
|
||||||
|
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: QueryParamsRequest: wiretype end group for non-group")
|
||||||
|
}
|
||||||
|
if fieldNum <= 0 {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||||
|
}
|
||||||
|
switch fieldNum {
|
||||||
|
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,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var (
|
||||||
|
md_QueryParamsResponse protoreflect.MessageDescriptor
|
||||||
|
fd_QueryParamsResponse_params protoreflect.FieldDescriptor
|
||||||
|
)
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
file_service_v1_query_proto_init()
|
||||||
|
md_QueryParamsResponse = File_service_v1_query_proto.Messages().ByName("QueryParamsResponse")
|
||||||
|
fd_QueryParamsResponse_params = md_QueryParamsResponse.Fields().ByName("params")
|
||||||
|
}
|
||||||
|
|
||||||
|
var _ protoreflect.Message = (*fastReflection_QueryParamsResponse)(nil)
|
||||||
|
|
||||||
|
type fastReflection_QueryParamsResponse QueryParamsResponse
|
||||||
|
|
||||||
|
func (x *QueryParamsResponse) ProtoReflect() protoreflect.Message {
|
||||||
|
return (*fastReflection_QueryParamsResponse)(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *QueryParamsResponse) slowProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_service_v1_query_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_QueryParamsResponse_messageType fastReflection_QueryParamsResponse_messageType
|
||||||
|
var _ protoreflect.MessageType = fastReflection_QueryParamsResponse_messageType{}
|
||||||
|
|
||||||
|
type fastReflection_QueryParamsResponse_messageType struct{}
|
||||||
|
|
||||||
|
func (x fastReflection_QueryParamsResponse_messageType) Zero() protoreflect.Message {
|
||||||
|
return (*fastReflection_QueryParamsResponse)(nil)
|
||||||
|
}
|
||||||
|
func (x fastReflection_QueryParamsResponse_messageType) New() protoreflect.Message {
|
||||||
|
return new(fastReflection_QueryParamsResponse)
|
||||||
|
}
|
||||||
|
func (x fastReflection_QueryParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor {
|
||||||
|
return md_QueryParamsResponse
|
||||||
|
}
|
||||||
|
|
||||||
|
// Descriptor returns message descriptor, which contains only the protobuf
|
||||||
|
// type information for the message.
|
||||||
|
func (x *fastReflection_QueryParamsResponse) Descriptor() protoreflect.MessageDescriptor {
|
||||||
|
return md_QueryParamsResponse
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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_QueryParamsResponse) Type() protoreflect.MessageType {
|
||||||
|
return _fastReflection_QueryParamsResponse_messageType
|
||||||
|
}
|
||||||
|
|
||||||
|
// New returns a newly allocated and mutable empty message.
|
||||||
|
func (x *fastReflection_QueryParamsResponse) New() protoreflect.Message {
|
||||||
|
return new(fastReflection_QueryParamsResponse)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Interface unwraps the message reflection interface and
|
||||||
|
// returns the underlying ProtoMessage interface.
|
||||||
|
func (x *fastReflection_QueryParamsResponse) Interface() protoreflect.ProtoMessage {
|
||||||
|
return (*QueryParamsResponse)(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_QueryParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
|
||||||
|
if x.Params != nil {
|
||||||
|
value := protoreflect.ValueOfMessage(x.Params.ProtoReflect())
|
||||||
|
if !f(fd_QueryParamsResponse_params, 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_QueryParamsResponse) Has(fd protoreflect.FieldDescriptor) bool {
|
||||||
|
switch fd.FullName() {
|
||||||
|
case "service.v1.QueryParamsResponse.params":
|
||||||
|
return x.Params != nil
|
||||||
|
default:
|
||||||
|
if fd.IsExtension() {
|
||||||
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.QueryParamsResponse"))
|
||||||
|
}
|
||||||
|
panic(fmt.Errorf("message service.v1.QueryParamsResponse 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_QueryParamsResponse) Clear(fd protoreflect.FieldDescriptor) {
|
||||||
|
switch fd.FullName() {
|
||||||
|
case "service.v1.QueryParamsResponse.params":
|
||||||
|
x.Params = nil
|
||||||
|
default:
|
||||||
|
if fd.IsExtension() {
|
||||||
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.QueryParamsResponse"))
|
||||||
|
}
|
||||||
|
panic(fmt.Errorf("message service.v1.QueryParamsResponse 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_QueryParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
|
||||||
|
switch descriptor.FullName() {
|
||||||
|
case "service.v1.QueryParamsResponse.params":
|
||||||
|
value := x.Params
|
||||||
|
return protoreflect.ValueOfMessage(value.ProtoReflect())
|
||||||
|
default:
|
||||||
|
if descriptor.IsExtension() {
|
||||||
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.QueryParamsResponse"))
|
||||||
|
}
|
||||||
|
panic(fmt.Errorf("message service.v1.QueryParamsResponse 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_QueryParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
|
||||||
|
switch fd.FullName() {
|
||||||
|
case "service.v1.QueryParamsResponse.params":
|
||||||
|
x.Params = value.Message().Interface().(*Params)
|
||||||
|
default:
|
||||||
|
if fd.IsExtension() {
|
||||||
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.QueryParamsResponse"))
|
||||||
|
}
|
||||||
|
panic(fmt.Errorf("message service.v1.QueryParamsResponse 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_QueryParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||||
|
switch fd.FullName() {
|
||||||
|
case "service.v1.QueryParamsResponse.params":
|
||||||
|
if x.Params == nil {
|
||||||
|
x.Params = new(Params)
|
||||||
|
}
|
||||||
|
return protoreflect.ValueOfMessage(x.Params.ProtoReflect())
|
||||||
|
default:
|
||||||
|
if fd.IsExtension() {
|
||||||
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.QueryParamsResponse"))
|
||||||
|
}
|
||||||
|
panic(fmt.Errorf("message service.v1.QueryParamsResponse 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_QueryParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||||
|
switch fd.FullName() {
|
||||||
|
case "service.v1.QueryParamsResponse.params":
|
||||||
|
m := new(Params)
|
||||||
|
return protoreflect.ValueOfMessage(m.ProtoReflect())
|
||||||
|
default:
|
||||||
|
if fd.IsExtension() {
|
||||||
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.QueryParamsResponse"))
|
||||||
|
}
|
||||||
|
panic(fmt.Errorf("message service.v1.QueryParamsResponse 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_QueryParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
||||||
|
switch d.FullName() {
|
||||||
|
default:
|
||||||
|
panic(fmt.Errorf("%s is not a oneof field in service.v1.QueryParamsResponse", 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_QueryParamsResponse) 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_QueryParamsResponse) 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_QueryParamsResponse) 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_QueryParamsResponse) ProtoMethods() *protoiface.Methods {
|
||||||
|
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
|
||||||
|
x := input.Message.Interface().(*QueryParamsResponse)
|
||||||
|
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.Params != nil {
|
||||||
|
l = options.Size(x.Params)
|
||||||
|
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().(*QueryParamsResponse)
|
||||||
|
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 x.Params != nil {
|
||||||
|
encoded, err := options.Marshal(x.Params)
|
||||||
|
if err != nil {
|
||||||
|
return protoiface.MarshalOutput{
|
||||||
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
||||||
|
Buf: input.Buf,
|
||||||
|
}, err
|
||||||
|
}
|
||||||
|
i -= len(encoded)
|
||||||
|
copy(dAtA[i:], encoded)
|
||||||
|
i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0xa
|
||||||
|
}
|
||||||
|
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().(*QueryParamsResponse)
|
||||||
|
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: QueryParamsResponse: wiretype end group for non-group")
|
||||||
|
}
|
||||||
|
if fieldNum <= 0 {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||||
|
}
|
||||||
|
switch fieldNum {
|
||||||
|
case 1:
|
||||||
|
if wireType != 2 {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType)
|
||||||
|
}
|
||||||
|
var msglen int
|
||||||
|
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++
|
||||||
|
msglen |= int(b&0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if msglen < 0 {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + msglen
|
||||||
|
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
|
||||||
|
}
|
||||||
|
if x.Params == nil {
|
||||||
|
x.Params = &Params{}
|
||||||
|
}
|
||||||
|
if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
|
||||||
|
}
|
||||||
|
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
|
||||||
|
// protoc (unknown)
|
||||||
|
// source: service/v1/query.proto
|
||||||
|
|
||||||
|
const (
|
||||||
|
// Verify that this generated code is sufficiently up-to-date.
|
||||||
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||||
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||||
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||||
|
)
|
||||||
|
|
||||||
|
// QueryParamsRequest is the request type for the Query/Params RPC method.
|
||||||
|
type QueryParamsRequest struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *QueryParamsRequest) Reset() {
|
||||||
|
*x = QueryParamsRequest{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_service_v1_query_proto_msgTypes[0]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *QueryParamsRequest) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*QueryParamsRequest) ProtoMessage() {}
|
||||||
|
|
||||||
|
// Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead.
|
||||||
|
func (*QueryParamsRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return file_service_v1_query_proto_rawDescGZIP(), []int{0}
|
||||||
|
}
|
||||||
|
|
||||||
|
// QueryParamsResponse is the response type for the Query/Params RPC method.
|
||||||
|
type QueryParamsResponse struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
// params defines the parameters of the module.
|
||||||
|
Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *QueryParamsResponse) Reset() {
|
||||||
|
*x = QueryParamsResponse{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_service_v1_query_proto_msgTypes[1]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *QueryParamsResponse) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*QueryParamsResponse) ProtoMessage() {}
|
||||||
|
|
||||||
|
// Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead.
|
||||||
|
func (*QueryParamsResponse) Descriptor() ([]byte, []int) {
|
||||||
|
return file_service_v1_query_proto_rawDescGZIP(), []int{1}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *QueryParamsResponse) GetParams() *Params {
|
||||||
|
if x != nil {
|
||||||
|
return x.Params
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
var File_service_v1_query_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
|
var file_service_v1_query_proto_rawDesc = []byte{
|
||||||
|
0x0a, 0x16, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x65,
|
||||||
|
0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
|
||||||
|
0x65, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69,
|
||||||
|
0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f,
|
||||||
|
0x74, 0x6f, 0x1a, 0x18, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x67,
|
||||||
|
0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x14, 0x0a, 0x12,
|
||||||
|
0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||||
|
0x73, 0x74, 0x22, 0x41, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d,
|
||||||
|
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x61, 0x72,
|
||||||
|
0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x65, 0x72, 0x76,
|
||||||
|
0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70,
|
||||||
|
0x61, 0x72, 0x61, 0x6d, 0x73, 0x32, 0x6e, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x65,
|
||||||
|
0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1e, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69,
|
||||||
|
0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d,
|
||||||
|
0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69,
|
||||||
|
0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d,
|
||||||
|
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02,
|
||||||
|
0x14, 0x12, 0x12, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x70,
|
||||||
|
0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x96, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65,
|
||||||
|
0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50,
|
||||||
|
0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2f, 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, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x65,
|
||||||
|
0x72, 0x76, 0x69, 0x63, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x58, 0x58, 0xaa, 0x02, 0x0a,
|
||||||
|
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0a, 0x53, 0x65, 0x72,
|
||||||
|
0x76, 0x69, 0x63, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x16, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
|
||||||
|
0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
|
||||||
|
0xea, 0x02, 0x0b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06,
|
||||||
|
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
|
}
|
||||||
|
|
||||||
|
var (
|
||||||
|
file_service_v1_query_proto_rawDescOnce sync.Once
|
||||||
|
file_service_v1_query_proto_rawDescData = file_service_v1_query_proto_rawDesc
|
||||||
|
)
|
||||||
|
|
||||||
|
func file_service_v1_query_proto_rawDescGZIP() []byte {
|
||||||
|
file_service_v1_query_proto_rawDescOnce.Do(func() {
|
||||||
|
file_service_v1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_v1_query_proto_rawDescData)
|
||||||
|
})
|
||||||
|
return file_service_v1_query_proto_rawDescData
|
||||||
|
}
|
||||||
|
|
||||||
|
var file_service_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||||
|
var file_service_v1_query_proto_goTypes = []interface{}{
|
||||||
|
(*QueryParamsRequest)(nil), // 0: service.v1.QueryParamsRequest
|
||||||
|
(*QueryParamsResponse)(nil), // 1: service.v1.QueryParamsResponse
|
||||||
|
(*Params)(nil), // 2: service.v1.Params
|
||||||
|
}
|
||||||
|
var file_service_v1_query_proto_depIdxs = []int32{
|
||||||
|
2, // 0: service.v1.QueryParamsResponse.params:type_name -> service.v1.Params
|
||||||
|
0, // 1: service.v1.Query.Params:input_type -> service.v1.QueryParamsRequest
|
||||||
|
1, // 2: service.v1.Query.Params:output_type -> service.v1.QueryParamsResponse
|
||||||
|
2, // [2:3] is the sub-list for method output_type
|
||||||
|
1, // [1:2] is the sub-list for method input_type
|
||||||
|
1, // [1:1] is the sub-list for extension type_name
|
||||||
|
1, // [1:1] is the sub-list for extension extendee
|
||||||
|
0, // [0:1] is the sub-list for field type_name
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() { file_service_v1_query_proto_init() }
|
||||||
|
func file_service_v1_query_proto_init() {
|
||||||
|
if File_service_v1_query_proto != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
file_service_v1_genesis_proto_init()
|
||||||
|
if !protoimpl.UnsafeEnabled {
|
||||||
|
file_service_v1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*QueryParamsRequest); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_service_v1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*QueryParamsResponse); 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{
|
||||||
|
File: protoimpl.DescBuilder{
|
||||||
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
|
RawDescriptor: file_service_v1_query_proto_rawDesc,
|
||||||
|
NumEnums: 0,
|
||||||
|
NumMessages: 2,
|
||||||
|
NumExtensions: 0,
|
||||||
|
NumServices: 1,
|
||||||
|
},
|
||||||
|
GoTypes: file_service_v1_query_proto_goTypes,
|
||||||
|
DependencyIndexes: file_service_v1_query_proto_depIdxs,
|
||||||
|
MessageInfos: file_service_v1_query_proto_msgTypes,
|
||||||
|
}.Build()
|
||||||
|
File_service_v1_query_proto = out.File
|
||||||
|
file_service_v1_query_proto_rawDesc = nil
|
||||||
|
file_service_v1_query_proto_goTypes = nil
|
||||||
|
file_service_v1_query_proto_depIdxs = nil
|
||||||
|
}
|
||||||
@@ -0,0 +1,111 @@
|
|||||||
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// - protoc-gen-go-grpc v1.3.0
|
||||||
|
// - protoc (unknown)
|
||||||
|
// source: service/v1/query.proto
|
||||||
|
|
||||||
|
package servicev1
|
||||||
|
|
||||||
|
import (
|
||||||
|
context "context"
|
||||||
|
grpc "google.golang.org/grpc"
|
||||||
|
codes "google.golang.org/grpc/codes"
|
||||||
|
status "google.golang.org/grpc/status"
|
||||||
|
)
|
||||||
|
|
||||||
|
// This is a compile-time assertion to ensure that this generated file
|
||||||
|
// is compatible with the grpc package it is being compiled against.
|
||||||
|
// Requires gRPC-Go v1.32.0 or later.
|
||||||
|
const _ = grpc.SupportPackageIsVersion7
|
||||||
|
|
||||||
|
const (
|
||||||
|
Query_Params_FullMethodName = "/service.v1.Query/Params"
|
||||||
|
)
|
||||||
|
|
||||||
|
// QueryClient is the client API for Query service.
|
||||||
|
//
|
||||||
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||||
|
type QueryClient interface {
|
||||||
|
// Params queries all parameters of the module.
|
||||||
|
Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
type queryClient struct {
|
||||||
|
cc grpc.ClientConnInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewQueryClient(cc grpc.ClientConnInterface) QueryClient {
|
||||||
|
return &queryClient{cc}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) {
|
||||||
|
out := new(QueryParamsResponse)
|
||||||
|
err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// QueryServer is the server API for Query service.
|
||||||
|
// All implementations must embed UnimplementedQueryServer
|
||||||
|
// for forward compatibility
|
||||||
|
type QueryServer interface {
|
||||||
|
// Params queries all parameters of the module.
|
||||||
|
Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
|
||||||
|
mustEmbedUnimplementedQueryServer()
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnimplementedQueryServer must be embedded to have forward compatible implementations.
|
||||||
|
type UnimplementedQueryServer struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method Params not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {}
|
||||||
|
|
||||||
|
// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service.
|
||||||
|
// Use of this interface is not recommended, as added methods to QueryServer will
|
||||||
|
// result in compilation errors.
|
||||||
|
type UnsafeQueryServer interface {
|
||||||
|
mustEmbedUnimplementedQueryServer()
|
||||||
|
}
|
||||||
|
|
||||||
|
func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) {
|
||||||
|
s.RegisterService(&Query_ServiceDesc, srv)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(QueryParamsRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(QueryServer).Params(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: Query_Params_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Query_ServiceDesc is the grpc.ServiceDesc for Query service.
|
||||||
|
// It's only intended for direct use with grpc.RegisterService,
|
||||||
|
// and not to be introspected or modified (even as a copy)
|
||||||
|
var Query_ServiceDesc = grpc.ServiceDesc{
|
||||||
|
ServiceName: "service.v1.Query",
|
||||||
|
HandlerType: (*QueryServer)(nil),
|
||||||
|
Methods: []grpc.MethodDesc{
|
||||||
|
{
|
||||||
|
MethodName: "Params",
|
||||||
|
Handler: _Query_Params_Handler,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Streams: []grpc.StreamDesc{},
|
||||||
|
Metadata: "service/v1/query.proto",
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
// Code generated by protoc-gen-go-cosmos-orm. DO NOT EDIT.
|
// Code generated by protoc-gen-go-cosmos-orm. DO NOT EDIT.
|
||||||
|
|
||||||
package svcv1
|
package servicev1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
context "context"
|
context "context"
|
||||||
@@ -9,177 +9,19 @@ import (
|
|||||||
ormerrors "cosmossdk.io/orm/types/ormerrors"
|
ormerrors "cosmossdk.io/orm/types/ormerrors"
|
||||||
)
|
)
|
||||||
|
|
||||||
type DomainTable interface {
|
|
||||||
Insert(ctx context.Context, domain *Domain) error
|
|
||||||
InsertReturningId(ctx context.Context, domain *Domain) (uint64, error)
|
|
||||||
LastInsertedSequence(ctx context.Context) (uint64, error)
|
|
||||||
Update(ctx context.Context, domain *Domain) error
|
|
||||||
Save(ctx context.Context, domain *Domain) error
|
|
||||||
Delete(ctx context.Context, domain *Domain) 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) (*Domain, error)
|
|
||||||
HasByOrigin(ctx context.Context, origin string) (found bool, err error)
|
|
||||||
// GetByOrigin returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
|
||||||
GetByOrigin(ctx context.Context, origin string) (*Domain, error)
|
|
||||||
List(ctx context.Context, prefixKey DomainIndexKey, opts ...ormlist.Option) (DomainIterator, error)
|
|
||||||
ListRange(ctx context.Context, from, to DomainIndexKey, opts ...ormlist.Option) (DomainIterator, error)
|
|
||||||
DeleteBy(ctx context.Context, prefixKey DomainIndexKey) error
|
|
||||||
DeleteRange(ctx context.Context, from, to DomainIndexKey) error
|
|
||||||
|
|
||||||
doNotImplement()
|
|
||||||
}
|
|
||||||
|
|
||||||
type DomainIterator struct {
|
|
||||||
ormtable.Iterator
|
|
||||||
}
|
|
||||||
|
|
||||||
func (i DomainIterator) Value() (*Domain, error) {
|
|
||||||
var domain Domain
|
|
||||||
err := i.UnmarshalMessage(&domain)
|
|
||||||
return &domain, err
|
|
||||||
}
|
|
||||||
|
|
||||||
type DomainIndexKey interface {
|
|
||||||
id() uint32
|
|
||||||
values() []interface{}
|
|
||||||
domainIndexKey()
|
|
||||||
}
|
|
||||||
|
|
||||||
// primary key starting index..
|
|
||||||
type DomainPrimaryKey = DomainIdIndexKey
|
|
||||||
|
|
||||||
type DomainIdIndexKey struct {
|
|
||||||
vs []interface{}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x DomainIdIndexKey) id() uint32 { return 0 }
|
|
||||||
func (x DomainIdIndexKey) values() []interface{} { return x.vs }
|
|
||||||
func (x DomainIdIndexKey) domainIndexKey() {}
|
|
||||||
|
|
||||||
func (this DomainIdIndexKey) WithId(id uint64) DomainIdIndexKey {
|
|
||||||
this.vs = []interface{}{id}
|
|
||||||
return this
|
|
||||||
}
|
|
||||||
|
|
||||||
type DomainOriginIndexKey struct {
|
|
||||||
vs []interface{}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x DomainOriginIndexKey) id() uint32 { return 1 }
|
|
||||||
func (x DomainOriginIndexKey) values() []interface{} { return x.vs }
|
|
||||||
func (x DomainOriginIndexKey) domainIndexKey() {}
|
|
||||||
|
|
||||||
func (this DomainOriginIndexKey) WithOrigin(origin string) DomainOriginIndexKey {
|
|
||||||
this.vs = []interface{}{origin}
|
|
||||||
return this
|
|
||||||
}
|
|
||||||
|
|
||||||
type domainTable struct {
|
|
||||||
table ormtable.AutoIncrementTable
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this domainTable) Insert(ctx context.Context, domain *Domain) error {
|
|
||||||
return this.table.Insert(ctx, domain)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this domainTable) Update(ctx context.Context, domain *Domain) error {
|
|
||||||
return this.table.Update(ctx, domain)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this domainTable) Save(ctx context.Context, domain *Domain) error {
|
|
||||||
return this.table.Save(ctx, domain)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this domainTable) Delete(ctx context.Context, domain *Domain) error {
|
|
||||||
return this.table.Delete(ctx, domain)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this domainTable) InsertReturningId(ctx context.Context, domain *Domain) (uint64, error) {
|
|
||||||
return this.table.InsertReturningPKey(ctx, domain)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this domainTable) LastInsertedSequence(ctx context.Context) (uint64, error) {
|
|
||||||
return this.table.LastInsertedSequence(ctx)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this domainTable) Has(ctx context.Context, id uint64) (found bool, err error) {
|
|
||||||
return this.table.PrimaryKey().Has(ctx, id)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this domainTable) Get(ctx context.Context, id uint64) (*Domain, error) {
|
|
||||||
var domain Domain
|
|
||||||
found, err := this.table.PrimaryKey().Get(ctx, &domain, id)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if !found {
|
|
||||||
return nil, ormerrors.NotFound
|
|
||||||
}
|
|
||||||
return &domain, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this domainTable) HasByOrigin(ctx context.Context, origin string) (found bool, err error) {
|
|
||||||
return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx,
|
|
||||||
origin,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this domainTable) GetByOrigin(ctx context.Context, origin string) (*Domain, error) {
|
|
||||||
var domain Domain
|
|
||||||
found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &domain,
|
|
||||||
origin,
|
|
||||||
)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if !found {
|
|
||||||
return nil, ormerrors.NotFound
|
|
||||||
}
|
|
||||||
return &domain, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this domainTable) List(ctx context.Context, prefixKey DomainIndexKey, opts ...ormlist.Option) (DomainIterator, error) {
|
|
||||||
it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...)
|
|
||||||
return DomainIterator{it}, err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this domainTable) ListRange(ctx context.Context, from, to DomainIndexKey, opts ...ormlist.Option) (DomainIterator, error) {
|
|
||||||
it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...)
|
|
||||||
return DomainIterator{it}, err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this domainTable) DeleteBy(ctx context.Context, prefixKey DomainIndexKey) error {
|
|
||||||
return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this domainTable) DeleteRange(ctx context.Context, from, to DomainIndexKey) error {
|
|
||||||
return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values())
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this domainTable) doNotImplement() {}
|
|
||||||
|
|
||||||
var _ DomainTable = domainTable{}
|
|
||||||
|
|
||||||
func NewDomainTable(db ormtable.Schema) (DomainTable, error) {
|
|
||||||
table := db.GetTable(&Domain{})
|
|
||||||
if table == nil {
|
|
||||||
return nil, ormerrors.TableNotFound.Wrap(string((&Domain{}).ProtoReflect().Descriptor().FullName()))
|
|
||||||
}
|
|
||||||
return domainTable{table.(ormtable.AutoIncrementTable)}, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
type MetadataTable interface {
|
type MetadataTable interface {
|
||||||
Insert(ctx context.Context, metadata *Metadata) error
|
Insert(ctx context.Context, metadata *Metadata) error
|
||||||
|
InsertReturningId(ctx context.Context, metadata *Metadata) (uint64, error)
|
||||||
|
LastInsertedSequence(ctx context.Context) (uint64, error)
|
||||||
Update(ctx context.Context, metadata *Metadata) error
|
Update(ctx context.Context, metadata *Metadata) error
|
||||||
Save(ctx context.Context, metadata *Metadata) error
|
Save(ctx context.Context, metadata *Metadata) error
|
||||||
Delete(ctx context.Context, metadata *Metadata) error
|
Delete(ctx context.Context, metadata *Metadata) error
|
||||||
Has(ctx context.Context, id string) (found bool, err 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 returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
||||||
Get(ctx context.Context, id string) (*Metadata, error)
|
Get(ctx context.Context, id uint64) (*Metadata, error)
|
||||||
HasBySubjectOrigin(ctx context.Context, subject string, origin string) (found bool, err error)
|
HasByOrigin(ctx context.Context, origin string) (found bool, err error)
|
||||||
// GetBySubjectOrigin returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
// GetByOrigin 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) (*Metadata, error)
|
GetByOrigin(ctx context.Context, origin string) (*Metadata, error)
|
||||||
List(ctx context.Context, prefixKey MetadataIndexKey, opts ...ormlist.Option) (MetadataIterator, error)
|
List(ctx context.Context, prefixKey MetadataIndexKey, opts ...ormlist.Option) (MetadataIterator, error)
|
||||||
ListRange(ctx context.Context, from, to MetadataIndexKey, opts ...ormlist.Option) (MetadataIterator, error)
|
ListRange(ctx context.Context, from, to MetadataIndexKey, opts ...ormlist.Option) (MetadataIterator, error)
|
||||||
DeleteBy(ctx context.Context, prefixKey MetadataIndexKey) error
|
DeleteBy(ctx context.Context, prefixKey MetadataIndexKey) error
|
||||||
@@ -215,31 +57,26 @@ func (x MetadataIdIndexKey) id() uint32 { return 0 }
|
|||||||
func (x MetadataIdIndexKey) values() []interface{} { return x.vs }
|
func (x MetadataIdIndexKey) values() []interface{} { return x.vs }
|
||||||
func (x MetadataIdIndexKey) metadataIndexKey() {}
|
func (x MetadataIdIndexKey) metadataIndexKey() {}
|
||||||
|
|
||||||
func (this MetadataIdIndexKey) WithId(id string) MetadataIdIndexKey {
|
func (this MetadataIdIndexKey) WithId(id uint64) MetadataIdIndexKey {
|
||||||
this.vs = []interface{}{id}
|
this.vs = []interface{}{id}
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
type MetadataSubjectOriginIndexKey struct {
|
type MetadataOriginIndexKey struct {
|
||||||
vs []interface{}
|
vs []interface{}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x MetadataSubjectOriginIndexKey) id() uint32 { return 1 }
|
func (x MetadataOriginIndexKey) id() uint32 { return 1 }
|
||||||
func (x MetadataSubjectOriginIndexKey) values() []interface{} { return x.vs }
|
func (x MetadataOriginIndexKey) values() []interface{} { return x.vs }
|
||||||
func (x MetadataSubjectOriginIndexKey) metadataIndexKey() {}
|
func (x MetadataOriginIndexKey) metadataIndexKey() {}
|
||||||
|
|
||||||
func (this MetadataSubjectOriginIndexKey) WithSubject(subject string) MetadataSubjectOriginIndexKey {
|
func (this MetadataOriginIndexKey) WithOrigin(origin string) MetadataOriginIndexKey {
|
||||||
this.vs = []interface{}{subject}
|
this.vs = []interface{}{origin}
|
||||||
return this
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this MetadataSubjectOriginIndexKey) WithSubjectOrigin(subject string, origin string) MetadataSubjectOriginIndexKey {
|
|
||||||
this.vs = []interface{}{subject, origin}
|
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
type metadataTable struct {
|
type metadataTable struct {
|
||||||
table ormtable.Table
|
table ormtable.AutoIncrementTable
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this metadataTable) Insert(ctx context.Context, metadata *Metadata) error {
|
func (this metadataTable) Insert(ctx context.Context, metadata *Metadata) error {
|
||||||
@@ -258,11 +95,19 @@ func (this metadataTable) Delete(ctx context.Context, metadata *Metadata) error
|
|||||||
return this.table.Delete(ctx, metadata)
|
return this.table.Delete(ctx, metadata)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this metadataTable) Has(ctx context.Context, id string) (found bool, err error) {
|
func (this metadataTable) InsertReturningId(ctx context.Context, metadata *Metadata) (uint64, error) {
|
||||||
|
return this.table.InsertReturningPKey(ctx, metadata)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this metadataTable) LastInsertedSequence(ctx context.Context) (uint64, error) {
|
||||||
|
return this.table.LastInsertedSequence(ctx)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this metadataTable) Has(ctx context.Context, id uint64) (found bool, err error) {
|
||||||
return this.table.PrimaryKey().Has(ctx, id)
|
return this.table.PrimaryKey().Has(ctx, id)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this metadataTable) Get(ctx context.Context, id string) (*Metadata, error) {
|
func (this metadataTable) Get(ctx context.Context, id uint64) (*Metadata, error) {
|
||||||
var metadata Metadata
|
var metadata Metadata
|
||||||
found, err := this.table.PrimaryKey().Get(ctx, &metadata, id)
|
found, err := this.table.PrimaryKey().Get(ctx, &metadata, id)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -274,17 +119,15 @@ func (this metadataTable) Get(ctx context.Context, id string) (*Metadata, error)
|
|||||||
return &metadata, nil
|
return &metadata, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this metadataTable) HasBySubjectOrigin(ctx context.Context, subject string, origin string) (found bool, err error) {
|
func (this metadataTable) HasByOrigin(ctx context.Context, origin string) (found bool, err error) {
|
||||||
return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx,
|
return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx,
|
||||||
subject,
|
|
||||||
origin,
|
origin,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this metadataTable) GetBySubjectOrigin(ctx context.Context, subject string, origin string) (*Metadata, error) {
|
func (this metadataTable) GetByOrigin(ctx context.Context, origin string) (*Metadata, error) {
|
||||||
var metadata Metadata
|
var metadata Metadata
|
||||||
found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &metadata,
|
found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &metadata,
|
||||||
subject,
|
|
||||||
origin,
|
origin,
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -323,46 +166,203 @@ func NewMetadataTable(db ormtable.Schema) (MetadataTable, error) {
|
|||||||
if table == nil {
|
if table == nil {
|
||||||
return nil, ormerrors.TableNotFound.Wrap(string((&Metadata{}).ProtoReflect().Descriptor().FullName()))
|
return nil, ormerrors.TableNotFound.Wrap(string((&Metadata{}).ProtoReflect().Descriptor().FullName()))
|
||||||
}
|
}
|
||||||
return metadataTable{table}, nil
|
return metadataTable{table.(ormtable.AutoIncrementTable)}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type ProfileTable interface {
|
||||||
|
Insert(ctx context.Context, profile *Profile) error
|
||||||
|
Update(ctx context.Context, profile *Profile) error
|
||||||
|
Save(ctx context.Context, profile *Profile) error
|
||||||
|
Delete(ctx context.Context, profile *Profile) error
|
||||||
|
Has(ctx context.Context, id string) (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 string) (*Profile, 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) (*Profile, error)
|
||||||
|
List(ctx context.Context, prefixKey ProfileIndexKey, opts ...ormlist.Option) (ProfileIterator, error)
|
||||||
|
ListRange(ctx context.Context, from, to ProfileIndexKey, opts ...ormlist.Option) (ProfileIterator, error)
|
||||||
|
DeleteBy(ctx context.Context, prefixKey ProfileIndexKey) error
|
||||||
|
DeleteRange(ctx context.Context, from, to ProfileIndexKey) error
|
||||||
|
|
||||||
|
doNotImplement()
|
||||||
|
}
|
||||||
|
|
||||||
|
type ProfileIterator struct {
|
||||||
|
ormtable.Iterator
|
||||||
|
}
|
||||||
|
|
||||||
|
func (i ProfileIterator) Value() (*Profile, error) {
|
||||||
|
var profile Profile
|
||||||
|
err := i.UnmarshalMessage(&profile)
|
||||||
|
return &profile, err
|
||||||
|
}
|
||||||
|
|
||||||
|
type ProfileIndexKey interface {
|
||||||
|
id() uint32
|
||||||
|
values() []interface{}
|
||||||
|
profileIndexKey()
|
||||||
|
}
|
||||||
|
|
||||||
|
// primary key starting index..
|
||||||
|
type ProfilePrimaryKey = ProfileIdIndexKey
|
||||||
|
|
||||||
|
type ProfileIdIndexKey struct {
|
||||||
|
vs []interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x ProfileIdIndexKey) id() uint32 { return 0 }
|
||||||
|
func (x ProfileIdIndexKey) values() []interface{} { return x.vs }
|
||||||
|
func (x ProfileIdIndexKey) profileIndexKey() {}
|
||||||
|
|
||||||
|
func (this ProfileIdIndexKey) WithId(id string) ProfileIdIndexKey {
|
||||||
|
this.vs = []interface{}{id}
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
type ProfileSubjectOriginIndexKey struct {
|
||||||
|
vs []interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x ProfileSubjectOriginIndexKey) id() uint32 { return 1 }
|
||||||
|
func (x ProfileSubjectOriginIndexKey) values() []interface{} { return x.vs }
|
||||||
|
func (x ProfileSubjectOriginIndexKey) profileIndexKey() {}
|
||||||
|
|
||||||
|
func (this ProfileSubjectOriginIndexKey) WithSubject(subject string) ProfileSubjectOriginIndexKey {
|
||||||
|
this.vs = []interface{}{subject}
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this ProfileSubjectOriginIndexKey) WithSubjectOrigin(subject string, origin string) ProfileSubjectOriginIndexKey {
|
||||||
|
this.vs = []interface{}{subject, origin}
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
type profileTable struct {
|
||||||
|
table ormtable.Table
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this profileTable) Insert(ctx context.Context, profile *Profile) error {
|
||||||
|
return this.table.Insert(ctx, profile)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this profileTable) Update(ctx context.Context, profile *Profile) error {
|
||||||
|
return this.table.Update(ctx, profile)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this profileTable) Save(ctx context.Context, profile *Profile) error {
|
||||||
|
return this.table.Save(ctx, profile)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this profileTable) Delete(ctx context.Context, profile *Profile) error {
|
||||||
|
return this.table.Delete(ctx, profile)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this profileTable) Has(ctx context.Context, id string) (found bool, err error) {
|
||||||
|
return this.table.PrimaryKey().Has(ctx, id)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this profileTable) Get(ctx context.Context, id string) (*Profile, error) {
|
||||||
|
var profile Profile
|
||||||
|
found, err := this.table.PrimaryKey().Get(ctx, &profile, id)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if !found {
|
||||||
|
return nil, ormerrors.NotFound
|
||||||
|
}
|
||||||
|
return &profile, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this profileTable) 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 profileTable) GetBySubjectOrigin(ctx context.Context, subject string, origin string) (*Profile, error) {
|
||||||
|
var profile Profile
|
||||||
|
found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &profile,
|
||||||
|
subject,
|
||||||
|
origin,
|
||||||
|
)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if !found {
|
||||||
|
return nil, ormerrors.NotFound
|
||||||
|
}
|
||||||
|
return &profile, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this profileTable) List(ctx context.Context, prefixKey ProfileIndexKey, opts ...ormlist.Option) (ProfileIterator, error) {
|
||||||
|
it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...)
|
||||||
|
return ProfileIterator{it}, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this profileTable) ListRange(ctx context.Context, from, to ProfileIndexKey, opts ...ormlist.Option) (ProfileIterator, error) {
|
||||||
|
it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...)
|
||||||
|
return ProfileIterator{it}, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this profileTable) DeleteBy(ctx context.Context, prefixKey ProfileIndexKey) error {
|
||||||
|
return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this profileTable) DeleteRange(ctx context.Context, from, to ProfileIndexKey) error {
|
||||||
|
return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values())
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this profileTable) doNotImplement() {}
|
||||||
|
|
||||||
|
var _ ProfileTable = profileTable{}
|
||||||
|
|
||||||
|
func NewProfileTable(db ormtable.Schema) (ProfileTable, error) {
|
||||||
|
table := db.GetTable(&Profile{})
|
||||||
|
if table == nil {
|
||||||
|
return nil, ormerrors.TableNotFound.Wrap(string((&Profile{}).ProtoReflect().Descriptor().FullName()))
|
||||||
|
}
|
||||||
|
return profileTable{table}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
type StateStore interface {
|
type StateStore interface {
|
||||||
DomainTable() DomainTable
|
|
||||||
MetadataTable() MetadataTable
|
MetadataTable() MetadataTable
|
||||||
|
ProfileTable() ProfileTable
|
||||||
|
|
||||||
doNotImplement()
|
doNotImplement()
|
||||||
}
|
}
|
||||||
|
|
||||||
type stateStore struct {
|
type stateStore struct {
|
||||||
domain DomainTable
|
|
||||||
metadata MetadataTable
|
metadata MetadataTable
|
||||||
}
|
profile ProfileTable
|
||||||
|
|
||||||
func (x stateStore) DomainTable() DomainTable {
|
|
||||||
return x.domain
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x stateStore) MetadataTable() MetadataTable {
|
func (x stateStore) MetadataTable() MetadataTable {
|
||||||
return x.metadata
|
return x.metadata
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x stateStore) ProfileTable() ProfileTable {
|
||||||
|
return x.profile
|
||||||
|
}
|
||||||
|
|
||||||
func (stateStore) doNotImplement() {}
|
func (stateStore) doNotImplement() {}
|
||||||
|
|
||||||
var _ StateStore = stateStore{}
|
var _ StateStore = stateStore{}
|
||||||
|
|
||||||
func NewStateStore(db ormtable.Schema) (StateStore, error) {
|
func NewStateStore(db ormtable.Schema) (StateStore, error) {
|
||||||
domainTable, err := NewDomainTable(db)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
metadataTable, err := NewMetadataTable(db)
|
metadataTable, err := NewMetadataTable(db)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
profileTable, err := NewProfileTable(db)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
return stateStore{
|
return stateStore{
|
||||||
domainTable,
|
|
||||||
metadataTable,
|
metadataTable,
|
||||||
|
profileTable,
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
|||||||
// Code generated by protoc-gen-go-pulsar. DO NOT EDIT.
|
// Code generated by protoc-gen-go-pulsar. DO NOT EDIT.
|
||||||
package svcv1
|
package servicev1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
_ "cosmossdk.io/api/cosmos/msg/v1"
|
_ "cosmossdk.io/api/cosmos/msg/v1"
|
||||||
@@ -22,8 +22,8 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
file_svc_v1_tx_proto_init()
|
file_service_v1_tx_proto_init()
|
||||||
md_MsgUpdateParams = File_svc_v1_tx_proto.Messages().ByName("MsgUpdateParams")
|
md_MsgUpdateParams = File_service_v1_tx_proto.Messages().ByName("MsgUpdateParams")
|
||||||
fd_MsgUpdateParams_authority = md_MsgUpdateParams.Fields().ByName("authority")
|
fd_MsgUpdateParams_authority = md_MsgUpdateParams.Fields().ByName("authority")
|
||||||
fd_MsgUpdateParams_params = md_MsgUpdateParams.Fields().ByName("params")
|
fd_MsgUpdateParams_params = md_MsgUpdateParams.Fields().ByName("params")
|
||||||
}
|
}
|
||||||
@@ -37,7 +37,7 @@ func (x *MsgUpdateParams) ProtoReflect() protoreflect.Message {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (x *MsgUpdateParams) slowProtoReflect() protoreflect.Message {
|
func (x *MsgUpdateParams) slowProtoReflect() protoreflect.Message {
|
||||||
mi := &file_svc_v1_tx_proto_msgTypes[0]
|
mi := &file_service_v1_tx_proto_msgTypes[0]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -120,15 +120,15 @@ func (x *fastReflection_MsgUpdateParams) Range(f func(protoreflect.FieldDescript
|
|||||||
// a repeated field is populated if it is non-empty.
|
// a repeated field is populated if it is non-empty.
|
||||||
func (x *fastReflection_MsgUpdateParams) Has(fd protoreflect.FieldDescriptor) bool {
|
func (x *fastReflection_MsgUpdateParams) Has(fd protoreflect.FieldDescriptor) bool {
|
||||||
switch fd.FullName() {
|
switch fd.FullName() {
|
||||||
case "svc.v1.MsgUpdateParams.authority":
|
case "service.v1.MsgUpdateParams.authority":
|
||||||
return x.Authority != ""
|
return x.Authority != ""
|
||||||
case "svc.v1.MsgUpdateParams.params":
|
case "service.v1.MsgUpdateParams.params":
|
||||||
return x.Params != nil
|
return x.Params != nil
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.MsgUpdateParams"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgUpdateParams"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message svc.v1.MsgUpdateParams does not contain field %s", fd.FullName()))
|
panic(fmt.Errorf("message service.v1.MsgUpdateParams does not contain field %s", fd.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -140,15 +140,15 @@ func (x *fastReflection_MsgUpdateParams) Has(fd protoreflect.FieldDescriptor) bo
|
|||||||
// Clear is a mutating operation and unsafe for concurrent use.
|
// Clear is a mutating operation and unsafe for concurrent use.
|
||||||
func (x *fastReflection_MsgUpdateParams) Clear(fd protoreflect.FieldDescriptor) {
|
func (x *fastReflection_MsgUpdateParams) Clear(fd protoreflect.FieldDescriptor) {
|
||||||
switch fd.FullName() {
|
switch fd.FullName() {
|
||||||
case "svc.v1.MsgUpdateParams.authority":
|
case "service.v1.MsgUpdateParams.authority":
|
||||||
x.Authority = ""
|
x.Authority = ""
|
||||||
case "svc.v1.MsgUpdateParams.params":
|
case "service.v1.MsgUpdateParams.params":
|
||||||
x.Params = nil
|
x.Params = nil
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.MsgUpdateParams"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgUpdateParams"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message svc.v1.MsgUpdateParams does not contain field %s", fd.FullName()))
|
panic(fmt.Errorf("message service.v1.MsgUpdateParams does not contain field %s", fd.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -160,17 +160,17 @@ func (x *fastReflection_MsgUpdateParams) Clear(fd protoreflect.FieldDescriptor)
|
|||||||
// of the value; to obtain a mutable reference, use Mutable.
|
// of the value; to obtain a mutable reference, use Mutable.
|
||||||
func (x *fastReflection_MsgUpdateParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
|
func (x *fastReflection_MsgUpdateParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
|
||||||
switch descriptor.FullName() {
|
switch descriptor.FullName() {
|
||||||
case "svc.v1.MsgUpdateParams.authority":
|
case "service.v1.MsgUpdateParams.authority":
|
||||||
value := x.Authority
|
value := x.Authority
|
||||||
return protoreflect.ValueOfString(value)
|
return protoreflect.ValueOfString(value)
|
||||||
case "svc.v1.MsgUpdateParams.params":
|
case "service.v1.MsgUpdateParams.params":
|
||||||
value := x.Params
|
value := x.Params
|
||||||
return protoreflect.ValueOfMessage(value.ProtoReflect())
|
return protoreflect.ValueOfMessage(value.ProtoReflect())
|
||||||
default:
|
default:
|
||||||
if descriptor.IsExtension() {
|
if descriptor.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.MsgUpdateParams"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgUpdateParams"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message svc.v1.MsgUpdateParams does not contain field %s", descriptor.FullName()))
|
panic(fmt.Errorf("message service.v1.MsgUpdateParams does not contain field %s", descriptor.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -186,15 +186,15 @@ func (x *fastReflection_MsgUpdateParams) Get(descriptor protoreflect.FieldDescri
|
|||||||
// Set is a mutating operation and unsafe for concurrent use.
|
// Set is a mutating operation and unsafe for concurrent use.
|
||||||
func (x *fastReflection_MsgUpdateParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
|
func (x *fastReflection_MsgUpdateParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
|
||||||
switch fd.FullName() {
|
switch fd.FullName() {
|
||||||
case "svc.v1.MsgUpdateParams.authority":
|
case "service.v1.MsgUpdateParams.authority":
|
||||||
x.Authority = value.Interface().(string)
|
x.Authority = value.Interface().(string)
|
||||||
case "svc.v1.MsgUpdateParams.params":
|
case "service.v1.MsgUpdateParams.params":
|
||||||
x.Params = value.Message().Interface().(*Params)
|
x.Params = value.Message().Interface().(*Params)
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.MsgUpdateParams"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgUpdateParams"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message svc.v1.MsgUpdateParams does not contain field %s", fd.FullName()))
|
panic(fmt.Errorf("message service.v1.MsgUpdateParams does not contain field %s", fd.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -210,18 +210,18 @@ func (x *fastReflection_MsgUpdateParams) Set(fd protoreflect.FieldDescriptor, va
|
|||||||
// Mutable is a mutating operation and unsafe for concurrent use.
|
// Mutable is a mutating operation and unsafe for concurrent use.
|
||||||
func (x *fastReflection_MsgUpdateParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
func (x *fastReflection_MsgUpdateParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||||
switch fd.FullName() {
|
switch fd.FullName() {
|
||||||
case "svc.v1.MsgUpdateParams.params":
|
case "service.v1.MsgUpdateParams.params":
|
||||||
if x.Params == nil {
|
if x.Params == nil {
|
||||||
x.Params = new(Params)
|
x.Params = new(Params)
|
||||||
}
|
}
|
||||||
return protoreflect.ValueOfMessage(x.Params.ProtoReflect())
|
return protoreflect.ValueOfMessage(x.Params.ProtoReflect())
|
||||||
case "svc.v1.MsgUpdateParams.authority":
|
case "service.v1.MsgUpdateParams.authority":
|
||||||
panic(fmt.Errorf("field authority of message svc.v1.MsgUpdateParams is not mutable"))
|
panic(fmt.Errorf("field authority of message service.v1.MsgUpdateParams is not mutable"))
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.MsgUpdateParams"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgUpdateParams"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message svc.v1.MsgUpdateParams does not contain field %s", fd.FullName()))
|
panic(fmt.Errorf("message service.v1.MsgUpdateParams does not contain field %s", fd.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -230,16 +230,16 @@ func (x *fastReflection_MsgUpdateParams) Mutable(fd protoreflect.FieldDescriptor
|
|||||||
// For lists, maps, and messages, this returns a new, empty, mutable value.
|
// For lists, maps, and messages, this returns a new, empty, mutable value.
|
||||||
func (x *fastReflection_MsgUpdateParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
func (x *fastReflection_MsgUpdateParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||||
switch fd.FullName() {
|
switch fd.FullName() {
|
||||||
case "svc.v1.MsgUpdateParams.authority":
|
case "service.v1.MsgUpdateParams.authority":
|
||||||
return protoreflect.ValueOfString("")
|
return protoreflect.ValueOfString("")
|
||||||
case "svc.v1.MsgUpdateParams.params":
|
case "service.v1.MsgUpdateParams.params":
|
||||||
m := new(Params)
|
m := new(Params)
|
||||||
return protoreflect.ValueOfMessage(m.ProtoReflect())
|
return protoreflect.ValueOfMessage(m.ProtoReflect())
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.MsgUpdateParams"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgUpdateParams"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message svc.v1.MsgUpdateParams does not contain field %s", fd.FullName()))
|
panic(fmt.Errorf("message service.v1.MsgUpdateParams does not contain field %s", fd.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -249,7 +249,7 @@ func (x *fastReflection_MsgUpdateParams) NewField(fd protoreflect.FieldDescripto
|
|||||||
func (x *fastReflection_MsgUpdateParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
func (x *fastReflection_MsgUpdateParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
||||||
switch d.FullName() {
|
switch d.FullName() {
|
||||||
default:
|
default:
|
||||||
panic(fmt.Errorf("%s is not a oneof field in svc.v1.MsgUpdateParams", d.FullName()))
|
panic(fmt.Errorf("%s is not a oneof field in service.v1.MsgUpdateParams", d.FullName()))
|
||||||
}
|
}
|
||||||
panic("unreachable")
|
panic("unreachable")
|
||||||
}
|
}
|
||||||
@@ -519,8 +519,8 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
file_svc_v1_tx_proto_init()
|
file_service_v1_tx_proto_init()
|
||||||
md_MsgUpdateParamsResponse = File_svc_v1_tx_proto.Messages().ByName("MsgUpdateParamsResponse")
|
md_MsgUpdateParamsResponse = File_service_v1_tx_proto.Messages().ByName("MsgUpdateParamsResponse")
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ protoreflect.Message = (*fastReflection_MsgUpdateParamsResponse)(nil)
|
var _ protoreflect.Message = (*fastReflection_MsgUpdateParamsResponse)(nil)
|
||||||
@@ -532,7 +532,7 @@ func (x *MsgUpdateParamsResponse) ProtoReflect() protoreflect.Message {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (x *MsgUpdateParamsResponse) slowProtoReflect() protoreflect.Message {
|
func (x *MsgUpdateParamsResponse) slowProtoReflect() protoreflect.Message {
|
||||||
mi := &file_svc_v1_tx_proto_msgTypes[1]
|
mi := &file_service_v1_tx_proto_msgTypes[1]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -605,9 +605,9 @@ func (x *fastReflection_MsgUpdateParamsResponse) Has(fd protoreflect.FieldDescri
|
|||||||
switch fd.FullName() {
|
switch fd.FullName() {
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.MsgUpdateParamsResponse"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgUpdateParamsResponse"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message svc.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName()))
|
panic(fmt.Errorf("message service.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -621,9 +621,9 @@ func (x *fastReflection_MsgUpdateParamsResponse) Clear(fd protoreflect.FieldDesc
|
|||||||
switch fd.FullName() {
|
switch fd.FullName() {
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.MsgUpdateParamsResponse"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgUpdateParamsResponse"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message svc.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName()))
|
panic(fmt.Errorf("message service.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -637,9 +637,9 @@ func (x *fastReflection_MsgUpdateParamsResponse) Get(descriptor protoreflect.Fie
|
|||||||
switch descriptor.FullName() {
|
switch descriptor.FullName() {
|
||||||
default:
|
default:
|
||||||
if descriptor.IsExtension() {
|
if descriptor.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.MsgUpdateParamsResponse"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgUpdateParamsResponse"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message svc.v1.MsgUpdateParamsResponse does not contain field %s", descriptor.FullName()))
|
panic(fmt.Errorf("message service.v1.MsgUpdateParamsResponse does not contain field %s", descriptor.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -657,9 +657,9 @@ func (x *fastReflection_MsgUpdateParamsResponse) Set(fd protoreflect.FieldDescri
|
|||||||
switch fd.FullName() {
|
switch fd.FullName() {
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.MsgUpdateParamsResponse"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgUpdateParamsResponse"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message svc.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName()))
|
panic(fmt.Errorf("message service.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -677,9 +677,9 @@ func (x *fastReflection_MsgUpdateParamsResponse) Mutable(fd protoreflect.FieldDe
|
|||||||
switch fd.FullName() {
|
switch fd.FullName() {
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.MsgUpdateParamsResponse"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgUpdateParamsResponse"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message svc.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName()))
|
panic(fmt.Errorf("message service.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -690,9 +690,9 @@ func (x *fastReflection_MsgUpdateParamsResponse) NewField(fd protoreflect.FieldD
|
|||||||
switch fd.FullName() {
|
switch fd.FullName() {
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.MsgUpdateParamsResponse"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgUpdateParamsResponse"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message svc.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName()))
|
panic(fmt.Errorf("message service.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -702,7 +702,7 @@ func (x *fastReflection_MsgUpdateParamsResponse) NewField(fd protoreflect.FieldD
|
|||||||
func (x *fastReflection_MsgUpdateParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
func (x *fastReflection_MsgUpdateParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
||||||
switch d.FullName() {
|
switch d.FullName() {
|
||||||
default:
|
default:
|
||||||
panic(fmt.Errorf("%s is not a oneof field in svc.v1.MsgUpdateParamsResponse", d.FullName()))
|
panic(fmt.Errorf("%s is not a oneof field in service.v1.MsgUpdateParamsResponse", d.FullName()))
|
||||||
}
|
}
|
||||||
panic("unreachable")
|
panic("unreachable")
|
||||||
}
|
}
|
||||||
@@ -877,8 +877,8 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
file_svc_v1_tx_proto_init()
|
file_service_v1_tx_proto_init()
|
||||||
md_MsgRegisterService = File_svc_v1_tx_proto.Messages().ByName("MsgRegisterService")
|
md_MsgRegisterService = File_service_v1_tx_proto.Messages().ByName("MsgRegisterService")
|
||||||
fd_MsgRegisterService_controller = md_MsgRegisterService.Fields().ByName("controller")
|
fd_MsgRegisterService_controller = md_MsgRegisterService.Fields().ByName("controller")
|
||||||
fd_MsgRegisterService_service = md_MsgRegisterService.Fields().ByName("service")
|
fd_MsgRegisterService_service = md_MsgRegisterService.Fields().ByName("service")
|
||||||
}
|
}
|
||||||
@@ -892,7 +892,7 @@ func (x *MsgRegisterService) ProtoReflect() protoreflect.Message {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (x *MsgRegisterService) slowProtoReflect() protoreflect.Message {
|
func (x *MsgRegisterService) slowProtoReflect() protoreflect.Message {
|
||||||
mi := &file_svc_v1_tx_proto_msgTypes[2]
|
mi := &file_service_v1_tx_proto_msgTypes[2]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -975,15 +975,15 @@ func (x *fastReflection_MsgRegisterService) Range(f func(protoreflect.FieldDescr
|
|||||||
// a repeated field is populated if it is non-empty.
|
// a repeated field is populated if it is non-empty.
|
||||||
func (x *fastReflection_MsgRegisterService) Has(fd protoreflect.FieldDescriptor) bool {
|
func (x *fastReflection_MsgRegisterService) Has(fd protoreflect.FieldDescriptor) bool {
|
||||||
switch fd.FullName() {
|
switch fd.FullName() {
|
||||||
case "svc.v1.MsgRegisterService.controller":
|
case "service.v1.MsgRegisterService.controller":
|
||||||
return x.Controller != ""
|
return x.Controller != ""
|
||||||
case "svc.v1.MsgRegisterService.service":
|
case "service.v1.MsgRegisterService.service":
|
||||||
return x.Service != nil
|
return x.Service != nil
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.MsgRegisterService"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgRegisterService"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message svc.v1.MsgRegisterService does not contain field %s", fd.FullName()))
|
panic(fmt.Errorf("message service.v1.MsgRegisterService does not contain field %s", fd.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -995,15 +995,15 @@ func (x *fastReflection_MsgRegisterService) Has(fd protoreflect.FieldDescriptor)
|
|||||||
// Clear is a mutating operation and unsafe for concurrent use.
|
// Clear is a mutating operation and unsafe for concurrent use.
|
||||||
func (x *fastReflection_MsgRegisterService) Clear(fd protoreflect.FieldDescriptor) {
|
func (x *fastReflection_MsgRegisterService) Clear(fd protoreflect.FieldDescriptor) {
|
||||||
switch fd.FullName() {
|
switch fd.FullName() {
|
||||||
case "svc.v1.MsgRegisterService.controller":
|
case "service.v1.MsgRegisterService.controller":
|
||||||
x.Controller = ""
|
x.Controller = ""
|
||||||
case "svc.v1.MsgRegisterService.service":
|
case "service.v1.MsgRegisterService.service":
|
||||||
x.Service = nil
|
x.Service = nil
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.MsgRegisterService"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgRegisterService"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message svc.v1.MsgRegisterService does not contain field %s", fd.FullName()))
|
panic(fmt.Errorf("message service.v1.MsgRegisterService does not contain field %s", fd.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1015,17 +1015,17 @@ func (x *fastReflection_MsgRegisterService) Clear(fd protoreflect.FieldDescripto
|
|||||||
// of the value; to obtain a mutable reference, use Mutable.
|
// of the value; to obtain a mutable reference, use Mutable.
|
||||||
func (x *fastReflection_MsgRegisterService) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
|
func (x *fastReflection_MsgRegisterService) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
|
||||||
switch descriptor.FullName() {
|
switch descriptor.FullName() {
|
||||||
case "svc.v1.MsgRegisterService.controller":
|
case "service.v1.MsgRegisterService.controller":
|
||||||
value := x.Controller
|
value := x.Controller
|
||||||
return protoreflect.ValueOfString(value)
|
return protoreflect.ValueOfString(value)
|
||||||
case "svc.v1.MsgRegisterService.service":
|
case "service.v1.MsgRegisterService.service":
|
||||||
value := x.Service
|
value := x.Service
|
||||||
return protoreflect.ValueOfMessage(value.ProtoReflect())
|
return protoreflect.ValueOfMessage(value.ProtoReflect())
|
||||||
default:
|
default:
|
||||||
if descriptor.IsExtension() {
|
if descriptor.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.MsgRegisterService"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgRegisterService"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message svc.v1.MsgRegisterService does not contain field %s", descriptor.FullName()))
|
panic(fmt.Errorf("message service.v1.MsgRegisterService does not contain field %s", descriptor.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1041,15 +1041,15 @@ func (x *fastReflection_MsgRegisterService) Get(descriptor protoreflect.FieldDes
|
|||||||
// Set is a mutating operation and unsafe for concurrent use.
|
// Set is a mutating operation and unsafe for concurrent use.
|
||||||
func (x *fastReflection_MsgRegisterService) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
|
func (x *fastReflection_MsgRegisterService) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
|
||||||
switch fd.FullName() {
|
switch fd.FullName() {
|
||||||
case "svc.v1.MsgRegisterService.controller":
|
case "service.v1.MsgRegisterService.controller":
|
||||||
x.Controller = value.Interface().(string)
|
x.Controller = value.Interface().(string)
|
||||||
case "svc.v1.MsgRegisterService.service":
|
case "service.v1.MsgRegisterService.service":
|
||||||
x.Service = value.Message().Interface().(*Service)
|
x.Service = value.Message().Interface().(*Service)
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.MsgRegisterService"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgRegisterService"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message svc.v1.MsgRegisterService does not contain field %s", fd.FullName()))
|
panic(fmt.Errorf("message service.v1.MsgRegisterService does not contain field %s", fd.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1065,18 +1065,18 @@ func (x *fastReflection_MsgRegisterService) Set(fd protoreflect.FieldDescriptor,
|
|||||||
// Mutable is a mutating operation and unsafe for concurrent use.
|
// Mutable is a mutating operation and unsafe for concurrent use.
|
||||||
func (x *fastReflection_MsgRegisterService) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
func (x *fastReflection_MsgRegisterService) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||||
switch fd.FullName() {
|
switch fd.FullName() {
|
||||||
case "svc.v1.MsgRegisterService.service":
|
case "service.v1.MsgRegisterService.service":
|
||||||
if x.Service == nil {
|
if x.Service == nil {
|
||||||
x.Service = new(Service)
|
x.Service = new(Service)
|
||||||
}
|
}
|
||||||
return protoreflect.ValueOfMessage(x.Service.ProtoReflect())
|
return protoreflect.ValueOfMessage(x.Service.ProtoReflect())
|
||||||
case "svc.v1.MsgRegisterService.controller":
|
case "service.v1.MsgRegisterService.controller":
|
||||||
panic(fmt.Errorf("field controller of message svc.v1.MsgRegisterService is not mutable"))
|
panic(fmt.Errorf("field controller of message service.v1.MsgRegisterService is not mutable"))
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.MsgRegisterService"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgRegisterService"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message svc.v1.MsgRegisterService does not contain field %s", fd.FullName()))
|
panic(fmt.Errorf("message service.v1.MsgRegisterService does not contain field %s", fd.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1085,16 +1085,16 @@ func (x *fastReflection_MsgRegisterService) Mutable(fd protoreflect.FieldDescrip
|
|||||||
// For lists, maps, and messages, this returns a new, empty, mutable value.
|
// For lists, maps, and messages, this returns a new, empty, mutable value.
|
||||||
func (x *fastReflection_MsgRegisterService) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
func (x *fastReflection_MsgRegisterService) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||||
switch fd.FullName() {
|
switch fd.FullName() {
|
||||||
case "svc.v1.MsgRegisterService.controller":
|
case "service.v1.MsgRegisterService.controller":
|
||||||
return protoreflect.ValueOfString("")
|
return protoreflect.ValueOfString("")
|
||||||
case "svc.v1.MsgRegisterService.service":
|
case "service.v1.MsgRegisterService.service":
|
||||||
m := new(Service)
|
m := new(Service)
|
||||||
return protoreflect.ValueOfMessage(m.ProtoReflect())
|
return protoreflect.ValueOfMessage(m.ProtoReflect())
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.MsgRegisterService"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgRegisterService"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message svc.v1.MsgRegisterService does not contain field %s", fd.FullName()))
|
panic(fmt.Errorf("message service.v1.MsgRegisterService does not contain field %s", fd.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1104,7 +1104,7 @@ func (x *fastReflection_MsgRegisterService) NewField(fd protoreflect.FieldDescri
|
|||||||
func (x *fastReflection_MsgRegisterService) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
func (x *fastReflection_MsgRegisterService) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
||||||
switch d.FullName() {
|
switch d.FullName() {
|
||||||
default:
|
default:
|
||||||
panic(fmt.Errorf("%s is not a oneof field in svc.v1.MsgRegisterService", d.FullName()))
|
panic(fmt.Errorf("%s is not a oneof field in service.v1.MsgRegisterService", d.FullName()))
|
||||||
}
|
}
|
||||||
panic("unreachable")
|
panic("unreachable")
|
||||||
}
|
}
|
||||||
@@ -1376,8 +1376,8 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
file_svc_v1_tx_proto_init()
|
file_service_v1_tx_proto_init()
|
||||||
md_MsgRegisterServiceResponse = File_svc_v1_tx_proto.Messages().ByName("MsgRegisterServiceResponse")
|
md_MsgRegisterServiceResponse = File_service_v1_tx_proto.Messages().ByName("MsgRegisterServiceResponse")
|
||||||
fd_MsgRegisterServiceResponse_success = md_MsgRegisterServiceResponse.Fields().ByName("success")
|
fd_MsgRegisterServiceResponse_success = md_MsgRegisterServiceResponse.Fields().ByName("success")
|
||||||
fd_MsgRegisterServiceResponse_did = md_MsgRegisterServiceResponse.Fields().ByName("did")
|
fd_MsgRegisterServiceResponse_did = md_MsgRegisterServiceResponse.Fields().ByName("did")
|
||||||
}
|
}
|
||||||
@@ -1391,7 +1391,7 @@ func (x *MsgRegisterServiceResponse) ProtoReflect() protoreflect.Message {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (x *MsgRegisterServiceResponse) slowProtoReflect() protoreflect.Message {
|
func (x *MsgRegisterServiceResponse) slowProtoReflect() protoreflect.Message {
|
||||||
mi := &file_svc_v1_tx_proto_msgTypes[3]
|
mi := &file_service_v1_tx_proto_msgTypes[3]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -1474,15 +1474,15 @@ func (x *fastReflection_MsgRegisterServiceResponse) Range(f func(protoreflect.Fi
|
|||||||
// a repeated field is populated if it is non-empty.
|
// a repeated field is populated if it is non-empty.
|
||||||
func (x *fastReflection_MsgRegisterServiceResponse) Has(fd protoreflect.FieldDescriptor) bool {
|
func (x *fastReflection_MsgRegisterServiceResponse) Has(fd protoreflect.FieldDescriptor) bool {
|
||||||
switch fd.FullName() {
|
switch fd.FullName() {
|
||||||
case "svc.v1.MsgRegisterServiceResponse.success":
|
case "service.v1.MsgRegisterServiceResponse.success":
|
||||||
return x.Success != false
|
return x.Success != false
|
||||||
case "svc.v1.MsgRegisterServiceResponse.did":
|
case "service.v1.MsgRegisterServiceResponse.did":
|
||||||
return x.Did != ""
|
return x.Did != ""
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.MsgRegisterServiceResponse"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgRegisterServiceResponse"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message svc.v1.MsgRegisterServiceResponse does not contain field %s", fd.FullName()))
|
panic(fmt.Errorf("message service.v1.MsgRegisterServiceResponse does not contain field %s", fd.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1494,15 +1494,15 @@ func (x *fastReflection_MsgRegisterServiceResponse) Has(fd protoreflect.FieldDes
|
|||||||
// Clear is a mutating operation and unsafe for concurrent use.
|
// Clear is a mutating operation and unsafe for concurrent use.
|
||||||
func (x *fastReflection_MsgRegisterServiceResponse) Clear(fd protoreflect.FieldDescriptor) {
|
func (x *fastReflection_MsgRegisterServiceResponse) Clear(fd protoreflect.FieldDescriptor) {
|
||||||
switch fd.FullName() {
|
switch fd.FullName() {
|
||||||
case "svc.v1.MsgRegisterServiceResponse.success":
|
case "service.v1.MsgRegisterServiceResponse.success":
|
||||||
x.Success = false
|
x.Success = false
|
||||||
case "svc.v1.MsgRegisterServiceResponse.did":
|
case "service.v1.MsgRegisterServiceResponse.did":
|
||||||
x.Did = ""
|
x.Did = ""
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.MsgRegisterServiceResponse"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgRegisterServiceResponse"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message svc.v1.MsgRegisterServiceResponse does not contain field %s", fd.FullName()))
|
panic(fmt.Errorf("message service.v1.MsgRegisterServiceResponse does not contain field %s", fd.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1514,17 +1514,17 @@ func (x *fastReflection_MsgRegisterServiceResponse) Clear(fd protoreflect.FieldD
|
|||||||
// of the value; to obtain a mutable reference, use Mutable.
|
// of the value; to obtain a mutable reference, use Mutable.
|
||||||
func (x *fastReflection_MsgRegisterServiceResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
|
func (x *fastReflection_MsgRegisterServiceResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
|
||||||
switch descriptor.FullName() {
|
switch descriptor.FullName() {
|
||||||
case "svc.v1.MsgRegisterServiceResponse.success":
|
case "service.v1.MsgRegisterServiceResponse.success":
|
||||||
value := x.Success
|
value := x.Success
|
||||||
return protoreflect.ValueOfBool(value)
|
return protoreflect.ValueOfBool(value)
|
||||||
case "svc.v1.MsgRegisterServiceResponse.did":
|
case "service.v1.MsgRegisterServiceResponse.did":
|
||||||
value := x.Did
|
value := x.Did
|
||||||
return protoreflect.ValueOfString(value)
|
return protoreflect.ValueOfString(value)
|
||||||
default:
|
default:
|
||||||
if descriptor.IsExtension() {
|
if descriptor.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.MsgRegisterServiceResponse"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgRegisterServiceResponse"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message svc.v1.MsgRegisterServiceResponse does not contain field %s", descriptor.FullName()))
|
panic(fmt.Errorf("message service.v1.MsgRegisterServiceResponse does not contain field %s", descriptor.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1540,15 +1540,15 @@ func (x *fastReflection_MsgRegisterServiceResponse) Get(descriptor protoreflect.
|
|||||||
// Set is a mutating operation and unsafe for concurrent use.
|
// Set is a mutating operation and unsafe for concurrent use.
|
||||||
func (x *fastReflection_MsgRegisterServiceResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
|
func (x *fastReflection_MsgRegisterServiceResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
|
||||||
switch fd.FullName() {
|
switch fd.FullName() {
|
||||||
case "svc.v1.MsgRegisterServiceResponse.success":
|
case "service.v1.MsgRegisterServiceResponse.success":
|
||||||
x.Success = value.Bool()
|
x.Success = value.Bool()
|
||||||
case "svc.v1.MsgRegisterServiceResponse.did":
|
case "service.v1.MsgRegisterServiceResponse.did":
|
||||||
x.Did = value.Interface().(string)
|
x.Did = value.Interface().(string)
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.MsgRegisterServiceResponse"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgRegisterServiceResponse"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message svc.v1.MsgRegisterServiceResponse does not contain field %s", fd.FullName()))
|
panic(fmt.Errorf("message service.v1.MsgRegisterServiceResponse does not contain field %s", fd.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1564,15 +1564,15 @@ func (x *fastReflection_MsgRegisterServiceResponse) Set(fd protoreflect.FieldDes
|
|||||||
// Mutable is a mutating operation and unsafe for concurrent use.
|
// Mutable is a mutating operation and unsafe for concurrent use.
|
||||||
func (x *fastReflection_MsgRegisterServiceResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
func (x *fastReflection_MsgRegisterServiceResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||||
switch fd.FullName() {
|
switch fd.FullName() {
|
||||||
case "svc.v1.MsgRegisterServiceResponse.success":
|
case "service.v1.MsgRegisterServiceResponse.success":
|
||||||
panic(fmt.Errorf("field success of message svc.v1.MsgRegisterServiceResponse is not mutable"))
|
panic(fmt.Errorf("field success of message service.v1.MsgRegisterServiceResponse is not mutable"))
|
||||||
case "svc.v1.MsgRegisterServiceResponse.did":
|
case "service.v1.MsgRegisterServiceResponse.did":
|
||||||
panic(fmt.Errorf("field did of message svc.v1.MsgRegisterServiceResponse is not mutable"))
|
panic(fmt.Errorf("field did of message service.v1.MsgRegisterServiceResponse is not mutable"))
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.MsgRegisterServiceResponse"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgRegisterServiceResponse"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message svc.v1.MsgRegisterServiceResponse does not contain field %s", fd.FullName()))
|
panic(fmt.Errorf("message service.v1.MsgRegisterServiceResponse does not contain field %s", fd.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1581,15 +1581,15 @@ func (x *fastReflection_MsgRegisterServiceResponse) Mutable(fd protoreflect.Fiel
|
|||||||
// For lists, maps, and messages, this returns a new, empty, mutable value.
|
// For lists, maps, and messages, this returns a new, empty, mutable value.
|
||||||
func (x *fastReflection_MsgRegisterServiceResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
func (x *fastReflection_MsgRegisterServiceResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||||
switch fd.FullName() {
|
switch fd.FullName() {
|
||||||
case "svc.v1.MsgRegisterServiceResponse.success":
|
case "service.v1.MsgRegisterServiceResponse.success":
|
||||||
return protoreflect.ValueOfBool(false)
|
return protoreflect.ValueOfBool(false)
|
||||||
case "svc.v1.MsgRegisterServiceResponse.did":
|
case "service.v1.MsgRegisterServiceResponse.did":
|
||||||
return protoreflect.ValueOfString("")
|
return protoreflect.ValueOfString("")
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.MsgRegisterServiceResponse"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgRegisterServiceResponse"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message svc.v1.MsgRegisterServiceResponse does not contain field %s", fd.FullName()))
|
panic(fmt.Errorf("message service.v1.MsgRegisterServiceResponse does not contain field %s", fd.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1599,7 +1599,7 @@ func (x *fastReflection_MsgRegisterServiceResponse) NewField(fd protoreflect.Fie
|
|||||||
func (x *fastReflection_MsgRegisterServiceResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
func (x *fastReflection_MsgRegisterServiceResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
||||||
switch d.FullName() {
|
switch d.FullName() {
|
||||||
default:
|
default:
|
||||||
panic(fmt.Errorf("%s is not a oneof field in svc.v1.MsgRegisterServiceResponse", d.FullName()))
|
panic(fmt.Errorf("%s is not a oneof field in service.v1.MsgRegisterServiceResponse", d.FullName()))
|
||||||
}
|
}
|
||||||
panic("unreachable")
|
panic("unreachable")
|
||||||
}
|
}
|
||||||
@@ -1847,7 +1847,7 @@ func (x *fastReflection_MsgRegisterServiceResponse) ProtoMethods() *protoiface.M
|
|||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.27.0
|
// protoc-gen-go v1.27.0
|
||||||
// protoc (unknown)
|
// protoc (unknown)
|
||||||
// source: svc/v1/tx.proto
|
// source: service/v1/tx.proto
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// Verify that this generated code is sufficiently up-to-date.
|
// Verify that this generated code is sufficiently up-to-date.
|
||||||
@@ -1875,7 +1875,7 @@ type MsgUpdateParams struct {
|
|||||||
func (x *MsgUpdateParams) Reset() {
|
func (x *MsgUpdateParams) Reset() {
|
||||||
*x = MsgUpdateParams{}
|
*x = MsgUpdateParams{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_svc_v1_tx_proto_msgTypes[0]
|
mi := &file_service_v1_tx_proto_msgTypes[0]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -1889,7 +1889,7 @@ func (*MsgUpdateParams) ProtoMessage() {}
|
|||||||
|
|
||||||
// Deprecated: Use MsgUpdateParams.ProtoReflect.Descriptor instead.
|
// Deprecated: Use MsgUpdateParams.ProtoReflect.Descriptor instead.
|
||||||
func (*MsgUpdateParams) Descriptor() ([]byte, []int) {
|
func (*MsgUpdateParams) Descriptor() ([]byte, []int) {
|
||||||
return file_svc_v1_tx_proto_rawDescGZIP(), []int{0}
|
return file_service_v1_tx_proto_rawDescGZIP(), []int{0}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *MsgUpdateParams) GetAuthority() string {
|
func (x *MsgUpdateParams) GetAuthority() string {
|
||||||
@@ -1919,7 +1919,7 @@ type MsgUpdateParamsResponse struct {
|
|||||||
func (x *MsgUpdateParamsResponse) Reset() {
|
func (x *MsgUpdateParamsResponse) Reset() {
|
||||||
*x = MsgUpdateParamsResponse{}
|
*x = MsgUpdateParamsResponse{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_svc_v1_tx_proto_msgTypes[1]
|
mi := &file_service_v1_tx_proto_msgTypes[1]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -1933,7 +1933,7 @@ func (*MsgUpdateParamsResponse) ProtoMessage() {}
|
|||||||
|
|
||||||
// Deprecated: Use MsgUpdateParamsResponse.ProtoReflect.Descriptor instead.
|
// Deprecated: Use MsgUpdateParamsResponse.ProtoReflect.Descriptor instead.
|
||||||
func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) {
|
func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) {
|
||||||
return file_svc_v1_tx_proto_rawDescGZIP(), []int{1}
|
return file_service_v1_tx_proto_rawDescGZIP(), []int{1}
|
||||||
}
|
}
|
||||||
|
|
||||||
// MsgRegisterService is the message type for the RegisterService RPC.
|
// MsgRegisterService is the message type for the RegisterService RPC.
|
||||||
@@ -1952,7 +1952,7 @@ type MsgRegisterService struct {
|
|||||||
func (x *MsgRegisterService) Reset() {
|
func (x *MsgRegisterService) Reset() {
|
||||||
*x = MsgRegisterService{}
|
*x = MsgRegisterService{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_svc_v1_tx_proto_msgTypes[2]
|
mi := &file_service_v1_tx_proto_msgTypes[2]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -1966,7 +1966,7 @@ func (*MsgRegisterService) ProtoMessage() {}
|
|||||||
|
|
||||||
// Deprecated: Use MsgRegisterService.ProtoReflect.Descriptor instead.
|
// Deprecated: Use MsgRegisterService.ProtoReflect.Descriptor instead.
|
||||||
func (*MsgRegisterService) Descriptor() ([]byte, []int) {
|
func (*MsgRegisterService) Descriptor() ([]byte, []int) {
|
||||||
return file_svc_v1_tx_proto_rawDescGZIP(), []int{2}
|
return file_service_v1_tx_proto_rawDescGZIP(), []int{2}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *MsgRegisterService) GetController() string {
|
func (x *MsgRegisterService) GetController() string {
|
||||||
@@ -1996,7 +1996,7 @@ type MsgRegisterServiceResponse struct {
|
|||||||
func (x *MsgRegisterServiceResponse) Reset() {
|
func (x *MsgRegisterServiceResponse) Reset() {
|
||||||
*x = MsgRegisterServiceResponse{}
|
*x = MsgRegisterServiceResponse{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_svc_v1_tx_proto_msgTypes[3]
|
mi := &file_service_v1_tx_proto_msgTypes[3]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -2010,7 +2010,7 @@ func (*MsgRegisterServiceResponse) ProtoMessage() {}
|
|||||||
|
|
||||||
// Deprecated: Use MsgRegisterServiceResponse.ProtoReflect.Descriptor instead.
|
// Deprecated: Use MsgRegisterServiceResponse.ProtoReflect.Descriptor instead.
|
||||||
func (*MsgRegisterServiceResponse) Descriptor() ([]byte, []int) {
|
func (*MsgRegisterServiceResponse) Descriptor() ([]byte, []int) {
|
||||||
return file_svc_v1_tx_proto_rawDescGZIP(), []int{3}
|
return file_service_v1_tx_proto_rawDescGZIP(), []int{3}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *MsgRegisterServiceResponse) GetSuccess() bool {
|
func (x *MsgRegisterServiceResponse) GetSuccess() bool {
|
||||||
@@ -2027,90 +2027,94 @@ func (x *MsgRegisterServiceResponse) GetDid() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
var File_svc_v1_tx_proto protoreflect.FileDescriptor
|
var File_service_v1_tx_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_svc_v1_tx_proto_rawDesc = []byte{
|
var file_service_v1_tx_proto_rawDesc = []byte{
|
||||||
0x0a, 0x0f, 0x73, 0x76, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
0x0a, 0x13, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x78, 0x2e,
|
||||||
0x6f, 0x12, 0x06, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f,
|
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76,
|
||||||
0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f,
|
0x31, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31,
|
||||||
0x74, 0x6f, 0x1a, 0x14, 0x73, 0x76, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73,
|
0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d,
|
||||||
0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72,
|
0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e,
|
||||||
0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19,
|
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||||
0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73,
|
0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x73, 0x65, 0x72,
|
||||||
0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x87, 0x01, 0x0a, 0x0f, 0x4d, 0x73,
|
0x76, 0x69, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e,
|
||||||
0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a,
|
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8b, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64,
|
||||||
0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74,
|
||||||
0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64,
|
0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4,
|
||||||
0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68,
|
0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73,
|
||||||
0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x2c, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18,
|
0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74,
|
||||||
0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x50,
|
0x79, 0x12, 0x30, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||||
|
0x0b, 0x32, 0x12, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50,
|
||||||
0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72,
|
0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72,
|
||||||
0x61, 0x6d, 0x73, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72,
|
0x61, 0x6d, 0x73, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72,
|
||||||
0x69, 0x74, 0x79, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
|
0x69, 0x74, 0x79, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
|
||||||
0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8a,
|
0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8e,
|
||||||
0x01, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65,
|
0x01, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65,
|
||||||
0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c,
|
0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c,
|
||||||
0x6c, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63,
|
0x6c, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63,
|
||||||
0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72,
|
0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72,
|
||||||
0x69, 0x6e, 0x67, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12,
|
0x69, 0x6e, 0x67, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12,
|
||||||
0x29, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
|
0x2d, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
|
||||||
0x32, 0x0f, 0x2e, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
|
0x32, 0x13, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65,
|
||||||
0x65, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, 0x0f, 0x82, 0xe7, 0xb0, 0x2a,
|
0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, 0x0f,
|
||||||
0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x22, 0x48, 0x0a, 0x1a, 0x4d,
|
0x82, 0xe7, 0xb0, 0x2a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x22,
|
||||||
0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
|
0x48, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65,
|
||||||
0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63,
|
0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a,
|
||||||
0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63,
|
0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07,
|
||||||
0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x02,
|
||||||
0x52, 0x03, 0x64, 0x69, 0x64, 0x32, 0xa9, 0x01, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x48, 0x0a,
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x32, 0xb9, 0x01, 0x0a, 0x03, 0x4d, 0x73,
|
||||||
0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x17, 0x2e,
|
0x67, 0x12, 0x50, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d,
|
||||||
0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
|
0x73, 0x12, 0x1b, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d,
|
||||||
0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x1f, 0x2e, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e,
|
0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x23,
|
||||||
0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52,
|
0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55,
|
||||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0f, 0x52, 0x65, 0x67, 0x69, 0x73,
|
0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||||
0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1a, 0x2e, 0x73, 0x76, 0x63,
|
0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x0f, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53,
|
||||||
|
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1e, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
||||||
0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53,
|
0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53,
|
||||||
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x1a, 0x22, 0x2e, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e,
|
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x1a, 0x26, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
||||||
0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69,
|
0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53,
|
||||||
0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a,
|
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05,
|
||||||
0x01, 0x42, 0x77, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x42,
|
0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x93, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65,
|
||||||
0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68,
|
0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74,
|
||||||
0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f,
|
0x6f, 0x50, 0x01, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
|
||||||
0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x76, 0x63, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x76,
|
0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f,
|
||||||
0x63, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x53, 0x76, 0x63, 0x2e,
|
0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x65, 0x72, 0x76, 0x69,
|
||||||
0x56, 0x31, 0xca, 0x02, 0x06, 0x53, 0x76, 0x63, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12, 0x53, 0x76,
|
0x63, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x58, 0x58, 0xaa, 0x02, 0x0a, 0x53, 0x65, 0x72,
|
||||||
0x63, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
|
0x76, 0x69, 0x63, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0a, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
|
||||||
0xea, 0x02, 0x07, 0x53, 0x76, 0x63, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x16, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5c, 0x56,
|
||||||
0x6f, 0x33,
|
0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0b,
|
||||||
|
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||||
|
0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
file_svc_v1_tx_proto_rawDescOnce sync.Once
|
file_service_v1_tx_proto_rawDescOnce sync.Once
|
||||||
file_svc_v1_tx_proto_rawDescData = file_svc_v1_tx_proto_rawDesc
|
file_service_v1_tx_proto_rawDescData = file_service_v1_tx_proto_rawDesc
|
||||||
)
|
)
|
||||||
|
|
||||||
func file_svc_v1_tx_proto_rawDescGZIP() []byte {
|
func file_service_v1_tx_proto_rawDescGZIP() []byte {
|
||||||
file_svc_v1_tx_proto_rawDescOnce.Do(func() {
|
file_service_v1_tx_proto_rawDescOnce.Do(func() {
|
||||||
file_svc_v1_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_svc_v1_tx_proto_rawDescData)
|
file_service_v1_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_v1_tx_proto_rawDescData)
|
||||||
})
|
})
|
||||||
return file_svc_v1_tx_proto_rawDescData
|
return file_service_v1_tx_proto_rawDescData
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_svc_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
var file_service_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
||||||
var file_svc_v1_tx_proto_goTypes = []interface{}{
|
var file_service_v1_tx_proto_goTypes = []interface{}{
|
||||||
(*MsgUpdateParams)(nil), // 0: svc.v1.MsgUpdateParams
|
(*MsgUpdateParams)(nil), // 0: service.v1.MsgUpdateParams
|
||||||
(*MsgUpdateParamsResponse)(nil), // 1: svc.v1.MsgUpdateParamsResponse
|
(*MsgUpdateParamsResponse)(nil), // 1: service.v1.MsgUpdateParamsResponse
|
||||||
(*MsgRegisterService)(nil), // 2: svc.v1.MsgRegisterService
|
(*MsgRegisterService)(nil), // 2: service.v1.MsgRegisterService
|
||||||
(*MsgRegisterServiceResponse)(nil), // 3: svc.v1.MsgRegisterServiceResponse
|
(*MsgRegisterServiceResponse)(nil), // 3: service.v1.MsgRegisterServiceResponse
|
||||||
(*Params)(nil), // 4: svc.v1.Params
|
(*Params)(nil), // 4: service.v1.Params
|
||||||
(*Service)(nil), // 5: svc.v1.Service
|
(*Service)(nil), // 5: service.v1.Service
|
||||||
}
|
}
|
||||||
var file_svc_v1_tx_proto_depIdxs = []int32{
|
var file_service_v1_tx_proto_depIdxs = []int32{
|
||||||
4, // 0: svc.v1.MsgUpdateParams.params:type_name -> svc.v1.Params
|
4, // 0: service.v1.MsgUpdateParams.params:type_name -> service.v1.Params
|
||||||
5, // 1: svc.v1.MsgRegisterService.service:type_name -> svc.v1.Service
|
5, // 1: service.v1.MsgRegisterService.service:type_name -> service.v1.Service
|
||||||
0, // 2: svc.v1.Msg.UpdateParams:input_type -> svc.v1.MsgUpdateParams
|
0, // 2: service.v1.Msg.UpdateParams:input_type -> service.v1.MsgUpdateParams
|
||||||
2, // 3: svc.v1.Msg.RegisterService:input_type -> svc.v1.MsgRegisterService
|
2, // 3: service.v1.Msg.RegisterService:input_type -> service.v1.MsgRegisterService
|
||||||
1, // 4: svc.v1.Msg.UpdateParams:output_type -> svc.v1.MsgUpdateParamsResponse
|
1, // 4: service.v1.Msg.UpdateParams:output_type -> service.v1.MsgUpdateParamsResponse
|
||||||
3, // 5: svc.v1.Msg.RegisterService:output_type -> svc.v1.MsgRegisterServiceResponse
|
3, // 5: service.v1.Msg.RegisterService:output_type -> service.v1.MsgRegisterServiceResponse
|
||||||
4, // [4:6] is the sub-list for method output_type
|
4, // [4:6] is the sub-list for method output_type
|
||||||
2, // [2:4] is the sub-list for method input_type
|
2, // [2:4] is the sub-list for method input_type
|
||||||
2, // [2:2] is the sub-list for extension type_name
|
2, // [2:2] is the sub-list for extension type_name
|
||||||
@@ -2118,14 +2122,14 @@ var file_svc_v1_tx_proto_depIdxs = []int32{
|
|||||||
0, // [0:2] is the sub-list for field type_name
|
0, // [0:2] is the sub-list for field type_name
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { file_svc_v1_tx_proto_init() }
|
func init() { file_service_v1_tx_proto_init() }
|
||||||
func file_svc_v1_tx_proto_init() {
|
func file_service_v1_tx_proto_init() {
|
||||||
if File_svc_v1_tx_proto != nil {
|
if File_service_v1_tx_proto != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
file_svc_v1_genesis_proto_init()
|
file_service_v1_genesis_proto_init()
|
||||||
if !protoimpl.UnsafeEnabled {
|
if !protoimpl.UnsafeEnabled {
|
||||||
file_svc_v1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
file_service_v1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*MsgUpdateParams); i {
|
switch v := v.(*MsgUpdateParams); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
@@ -2137,7 +2141,7 @@ func file_svc_v1_tx_proto_init() {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_svc_v1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
file_service_v1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*MsgUpdateParamsResponse); i {
|
switch v := v.(*MsgUpdateParamsResponse); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
@@ -2149,7 +2153,7 @@ func file_svc_v1_tx_proto_init() {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_svc_v1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
file_service_v1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*MsgRegisterService); i {
|
switch v := v.(*MsgRegisterService); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
@@ -2161,7 +2165,7 @@ func file_svc_v1_tx_proto_init() {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_svc_v1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
file_service_v1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*MsgRegisterServiceResponse); i {
|
switch v := v.(*MsgRegisterServiceResponse); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
@@ -2178,18 +2182,18 @@ func file_svc_v1_tx_proto_init() {
|
|||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: file_svc_v1_tx_proto_rawDesc,
|
RawDescriptor: file_service_v1_tx_proto_rawDesc,
|
||||||
NumEnums: 0,
|
NumEnums: 0,
|
||||||
NumMessages: 4,
|
NumMessages: 4,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 1,
|
NumServices: 1,
|
||||||
},
|
},
|
||||||
GoTypes: file_svc_v1_tx_proto_goTypes,
|
GoTypes: file_service_v1_tx_proto_goTypes,
|
||||||
DependencyIndexes: file_svc_v1_tx_proto_depIdxs,
|
DependencyIndexes: file_service_v1_tx_proto_depIdxs,
|
||||||
MessageInfos: file_svc_v1_tx_proto_msgTypes,
|
MessageInfos: file_service_v1_tx_proto_msgTypes,
|
||||||
}.Build()
|
}.Build()
|
||||||
File_svc_v1_tx_proto = out.File
|
File_service_v1_tx_proto = out.File
|
||||||
file_svc_v1_tx_proto_rawDesc = nil
|
file_service_v1_tx_proto_rawDesc = nil
|
||||||
file_svc_v1_tx_proto_goTypes = nil
|
file_service_v1_tx_proto_goTypes = nil
|
||||||
file_svc_v1_tx_proto_depIdxs = nil
|
file_service_v1_tx_proto_depIdxs = nil
|
||||||
}
|
}
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// - protoc-gen-go-grpc v1.5.1
|
// - protoc-gen-go-grpc v1.3.0
|
||||||
// - protoc (unknown)
|
// - protoc (unknown)
|
||||||
// source: svc/v1/tx.proto
|
// source: service/v1/tx.proto
|
||||||
|
|
||||||
package svcv1
|
package servicev1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
context "context"
|
context "context"
|
||||||
@@ -15,19 +15,17 @@ import (
|
|||||||
|
|
||||||
// This is a compile-time assertion to ensure that this generated file
|
// This is a compile-time assertion to ensure that this generated file
|
||||||
// is compatible with the grpc package it is being compiled against.
|
// is compatible with the grpc package it is being compiled against.
|
||||||
// Requires gRPC-Go v1.64.0 or later.
|
// Requires gRPC-Go v1.32.0 or later.
|
||||||
const _ = grpc.SupportPackageIsVersion9
|
const _ = grpc.SupportPackageIsVersion7
|
||||||
|
|
||||||
const (
|
const (
|
||||||
Msg_UpdateParams_FullMethodName = "/svc.v1.Msg/UpdateParams"
|
Msg_UpdateParams_FullMethodName = "/service.v1.Msg/UpdateParams"
|
||||||
Msg_RegisterService_FullMethodName = "/svc.v1.Msg/RegisterService"
|
Msg_RegisterService_FullMethodName = "/service.v1.Msg/RegisterService"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MsgClient is the client API for Msg service.
|
// MsgClient is the client API for Msg service.
|
||||||
//
|
//
|
||||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||||
//
|
|
||||||
// Msg defines the Msg service.
|
|
||||||
type MsgClient interface {
|
type MsgClient interface {
|
||||||
// UpdateParams defines a governance operation for updating the parameters.
|
// UpdateParams defines a governance operation for updating the parameters.
|
||||||
//
|
//
|
||||||
@@ -47,9 +45,8 @@ func NewMsgClient(cc grpc.ClientConnInterface) MsgClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) {
|
func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) {
|
||||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
||||||
out := new(MsgUpdateParamsResponse)
|
out := new(MsgUpdateParamsResponse)
|
||||||
err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, cOpts...)
|
err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, opts...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -57,9 +54,8 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *msgClient) RegisterService(ctx context.Context, in *MsgRegisterService, opts ...grpc.CallOption) (*MsgRegisterServiceResponse, error) {
|
func (c *msgClient) RegisterService(ctx context.Context, in *MsgRegisterService, opts ...grpc.CallOption) (*MsgRegisterServiceResponse, error) {
|
||||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
||||||
out := new(MsgRegisterServiceResponse)
|
out := new(MsgRegisterServiceResponse)
|
||||||
err := c.cc.Invoke(ctx, Msg_RegisterService_FullMethodName, in, out, cOpts...)
|
err := c.cc.Invoke(ctx, Msg_RegisterService_FullMethodName, in, out, opts...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -68,9 +64,7 @@ func (c *msgClient) RegisterService(ctx context.Context, in *MsgRegisterService,
|
|||||||
|
|
||||||
// MsgServer is the server API for Msg service.
|
// MsgServer is the server API for Msg service.
|
||||||
// All implementations must embed UnimplementedMsgServer
|
// All implementations must embed UnimplementedMsgServer
|
||||||
// for forward compatibility.
|
// for forward compatibility
|
||||||
//
|
|
||||||
// Msg defines the Msg service.
|
|
||||||
type MsgServer interface {
|
type MsgServer interface {
|
||||||
// UpdateParams defines a governance operation for updating the parameters.
|
// UpdateParams defines a governance operation for updating the parameters.
|
||||||
//
|
//
|
||||||
@@ -82,12 +76,9 @@ type MsgServer interface {
|
|||||||
mustEmbedUnimplementedMsgServer()
|
mustEmbedUnimplementedMsgServer()
|
||||||
}
|
}
|
||||||
|
|
||||||
// UnimplementedMsgServer must be embedded to have
|
// UnimplementedMsgServer must be embedded to have forward compatible implementations.
|
||||||
// forward compatible implementations.
|
type UnimplementedMsgServer struct {
|
||||||
//
|
}
|
||||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
|
||||||
// pointer dereference when methods are called.
|
|
||||||
type UnimplementedMsgServer struct{}
|
|
||||||
|
|
||||||
func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) {
|
func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented")
|
||||||
@@ -96,7 +87,6 @@ func (UnimplementedMsgServer) RegisterService(context.Context, *MsgRegisterServi
|
|||||||
return nil, status.Errorf(codes.Unimplemented, "method RegisterService not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method RegisterService not implemented")
|
||||||
}
|
}
|
||||||
func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {}
|
func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {}
|
||||||
func (UnimplementedMsgServer) testEmbeddedByValue() {}
|
|
||||||
|
|
||||||
// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service.
|
// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service.
|
||||||
// Use of this interface is not recommended, as added methods to MsgServer will
|
// Use of this interface is not recommended, as added methods to MsgServer will
|
||||||
@@ -106,13 +96,6 @@ type UnsafeMsgServer interface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) {
|
func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) {
|
||||||
// If the following call pancis, it indicates UnimplementedMsgServer was
|
|
||||||
// embedded by pointer and is nil. This will cause panics if an
|
|
||||||
// unimplemented method is ever invoked, so we test this at initialization
|
|
||||||
// time to prevent it from happening at runtime later due to I/O.
|
|
||||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
|
||||||
t.testEmbeddedByValue()
|
|
||||||
}
|
|
||||||
s.RegisterService(&Msg_ServiceDesc, srv)
|
s.RegisterService(&Msg_ServiceDesc, srv)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -156,7 +139,7 @@ func _Msg_RegisterService_Handler(srv interface{}, ctx context.Context, dec func
|
|||||||
// It's only intended for direct use with grpc.RegisterService,
|
// It's only intended for direct use with grpc.RegisterService,
|
||||||
// and not to be introspected or modified (even as a copy)
|
// and not to be introspected or modified (even as a copy)
|
||||||
var Msg_ServiceDesc = grpc.ServiceDesc{
|
var Msg_ServiceDesc = grpc.ServiceDesc{
|
||||||
ServiceName: "svc.v1.Msg",
|
ServiceName: "service.v1.Msg",
|
||||||
HandlerType: (*MsgServer)(nil),
|
HandlerType: (*MsgServer)(nil),
|
||||||
Methods: []grpc.MethodDesc{
|
Methods: []grpc.MethodDesc{
|
||||||
{
|
{
|
||||||
@@ -169,5 +152,5 @@ var Msg_ServiceDesc = grpc.ServiceDesc{
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
Streams: []grpc.StreamDesc{},
|
Streams: []grpc.StreamDesc{},
|
||||||
Metadata: "svc/v1/tx.proto",
|
Metadata: "service/v1/tx.proto",
|
||||||
}
|
}
|
||||||
@@ -18,8 +18,8 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
file_dwn_module_v1_module_proto_init()
|
file_vault_module_v1_module_proto_init()
|
||||||
md_Module = File_dwn_module_v1_module_proto.Messages().ByName("Module")
|
md_Module = File_vault_module_v1_module_proto.Messages().ByName("Module")
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ protoreflect.Message = (*fastReflection_Module)(nil)
|
var _ protoreflect.Message = (*fastReflection_Module)(nil)
|
||||||
@@ -31,7 +31,7 @@ func (x *Module) ProtoReflect() protoreflect.Message {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (x *Module) slowProtoReflect() protoreflect.Message {
|
func (x *Module) slowProtoReflect() protoreflect.Message {
|
||||||
mi := &file_dwn_module_v1_module_proto_msgTypes[0]
|
mi := &file_vault_module_v1_module_proto_msgTypes[0]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -104,9 +104,9 @@ func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool {
|
|||||||
switch fd.FullName() {
|
switch fd.FullName() {
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.module.v1.Module"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.module.v1.Module"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message dwn.module.v1.Module does not contain field %s", fd.FullName()))
|
panic(fmt.Errorf("message vault.module.v1.Module does not contain field %s", fd.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -120,9 +120,9 @@ func (x *fastReflection_Module) Clear(fd protoreflect.FieldDescriptor) {
|
|||||||
switch fd.FullName() {
|
switch fd.FullName() {
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.module.v1.Module"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.module.v1.Module"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message dwn.module.v1.Module does not contain field %s", fd.FullName()))
|
panic(fmt.Errorf("message vault.module.v1.Module does not contain field %s", fd.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -136,9 +136,9 @@ func (x *fastReflection_Module) Get(descriptor protoreflect.FieldDescriptor) pro
|
|||||||
switch descriptor.FullName() {
|
switch descriptor.FullName() {
|
||||||
default:
|
default:
|
||||||
if descriptor.IsExtension() {
|
if descriptor.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.module.v1.Module"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.module.v1.Module"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message dwn.module.v1.Module does not contain field %s", descriptor.FullName()))
|
panic(fmt.Errorf("message vault.module.v1.Module does not contain field %s", descriptor.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -156,9 +156,9 @@ func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value proto
|
|||||||
switch fd.FullName() {
|
switch fd.FullName() {
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.module.v1.Module"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.module.v1.Module"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message dwn.module.v1.Module does not contain field %s", fd.FullName()))
|
panic(fmt.Errorf("message vault.module.v1.Module does not contain field %s", fd.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -176,9 +176,9 @@ func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protore
|
|||||||
switch fd.FullName() {
|
switch fd.FullName() {
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.module.v1.Module"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.module.v1.Module"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message dwn.module.v1.Module does not contain field %s", fd.FullName()))
|
panic(fmt.Errorf("message vault.module.v1.Module does not contain field %s", fd.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -189,9 +189,9 @@ func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protor
|
|||||||
switch fd.FullName() {
|
switch fd.FullName() {
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.module.v1.Module"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.module.v1.Module"))
|
||||||
}
|
}
|
||||||
panic(fmt.Errorf("message dwn.module.v1.Module does not contain field %s", fd.FullName()))
|
panic(fmt.Errorf("message vault.module.v1.Module does not contain field %s", fd.FullName()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -201,7 +201,7 @@ func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protor
|
|||||||
func (x *fastReflection_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
func (x *fastReflection_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
||||||
switch d.FullName() {
|
switch d.FullName() {
|
||||||
default:
|
default:
|
||||||
panic(fmt.Errorf("%s is not a oneof field in dwn.module.v1.Module", d.FullName()))
|
panic(fmt.Errorf("%s is not a oneof field in vault.module.v1.Module", d.FullName()))
|
||||||
}
|
}
|
||||||
panic("unreachable")
|
panic("unreachable")
|
||||||
}
|
}
|
||||||
@@ -373,7 +373,7 @@ func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods {
|
|||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.27.0
|
// protoc-gen-go v1.27.0
|
||||||
// protoc (unknown)
|
// protoc (unknown)
|
||||||
// source: dwn/module/v1/module.proto
|
// source: vault/module/v1/module.proto
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// Verify that this generated code is sufficiently up-to-date.
|
// Verify that this generated code is sufficiently up-to-date.
|
||||||
@@ -393,7 +393,7 @@ type Module struct {
|
|||||||
func (x *Module) Reset() {
|
func (x *Module) Reset() {
|
||||||
*x = Module{}
|
*x = Module{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_dwn_module_v1_module_proto_msgTypes[0]
|
mi := &file_vault_module_v1_module_proto_msgTypes[0]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -407,50 +407,51 @@ func (*Module) ProtoMessage() {}
|
|||||||
|
|
||||||
// Deprecated: Use Module.ProtoReflect.Descriptor instead.
|
// Deprecated: Use Module.ProtoReflect.Descriptor instead.
|
||||||
func (*Module) Descriptor() ([]byte, []int) {
|
func (*Module) Descriptor() ([]byte, []int) {
|
||||||
return file_dwn_module_v1_module_proto_rawDescGZIP(), []int{0}
|
return file_vault_module_v1_module_proto_rawDescGZIP(), []int{0}
|
||||||
}
|
}
|
||||||
|
|
||||||
var File_dwn_module_v1_module_proto protoreflect.FileDescriptor
|
var File_vault_module_v1_module_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_dwn_module_v1_module_proto_rawDesc = []byte{
|
var file_vault_module_v1_module_proto_rawDesc = []byte{
|
||||||
0x0a, 0x1a, 0x64, 0x77, 0x6e, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f,
|
0x0a, 0x1c, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76,
|
||||||
0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x64, 0x77,
|
0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f,
|
||||||
0x6e, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73,
|
0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a,
|
||||||
0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
|
0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c,
|
||||||
0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x28, 0x0a,
|
0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||||
0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x1e, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x18, 0x0a,
|
0x6f, 0x22, 0x28, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x1e, 0xba, 0xc0, 0x96,
|
||||||
0x16, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f,
|
0xda, 0x01, 0x18, 0x0a, 0x16, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
|
||||||
0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x42, 0xa9, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e,
|
0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x42, 0xb5, 0x01, 0x0a, 0x13,
|
||||||
0x64, 0x77, 0x6e, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d,
|
0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65,
|
||||||
0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69,
|
0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f,
|
||||||
0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f,
|
0x50, 0x01, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f,
|
||||||
0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x77, 0x6e, 0x2f, 0x6d, 0x6f, 0x64,
|
0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76,
|
||||||
0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2,
|
0x61, 0x75, 0x6c, 0x74, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d,
|
||||||
0x02, 0x03, 0x44, 0x4d, 0x58, 0xaa, 0x02, 0x0d, 0x44, 0x77, 0x6e, 0x2e, 0x4d, 0x6f, 0x64, 0x75,
|
0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x56, 0x4d, 0x58, 0xaa, 0x02, 0x0f,
|
||||||
0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x44, 0x77, 0x6e, 0x5c, 0x4d, 0x6f, 0x64, 0x75,
|
0x56, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca,
|
||||||
0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x44, 0x77, 0x6e, 0x5c, 0x4d, 0x6f, 0x64, 0x75,
|
0x02, 0x0f, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56,
|
||||||
0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
|
0x31, 0xe2, 0x02, 0x1b, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65,
|
||||||
0x61, 0xea, 0x02, 0x0f, 0x44, 0x77, 0x6e, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a,
|
0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea,
|
||||||
|
0x02, 0x11, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a,
|
||||||
0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
file_dwn_module_v1_module_proto_rawDescOnce sync.Once
|
file_vault_module_v1_module_proto_rawDescOnce sync.Once
|
||||||
file_dwn_module_v1_module_proto_rawDescData = file_dwn_module_v1_module_proto_rawDesc
|
file_vault_module_v1_module_proto_rawDescData = file_vault_module_v1_module_proto_rawDesc
|
||||||
)
|
)
|
||||||
|
|
||||||
func file_dwn_module_v1_module_proto_rawDescGZIP() []byte {
|
func file_vault_module_v1_module_proto_rawDescGZIP() []byte {
|
||||||
file_dwn_module_v1_module_proto_rawDescOnce.Do(func() {
|
file_vault_module_v1_module_proto_rawDescOnce.Do(func() {
|
||||||
file_dwn_module_v1_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_dwn_module_v1_module_proto_rawDescData)
|
file_vault_module_v1_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_vault_module_v1_module_proto_rawDescData)
|
||||||
})
|
})
|
||||||
return file_dwn_module_v1_module_proto_rawDescData
|
return file_vault_module_v1_module_proto_rawDescData
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_dwn_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
var file_vault_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||||
var file_dwn_module_v1_module_proto_goTypes = []interface{}{
|
var file_vault_module_v1_module_proto_goTypes = []interface{}{
|
||||||
(*Module)(nil), // 0: dwn.module.v1.Module
|
(*Module)(nil), // 0: vault.module.v1.Module
|
||||||
}
|
}
|
||||||
var file_dwn_module_v1_module_proto_depIdxs = []int32{
|
var file_vault_module_v1_module_proto_depIdxs = []int32{
|
||||||
0, // [0:0] is the sub-list for method output_type
|
0, // [0:0] is the sub-list for method output_type
|
||||||
0, // [0:0] is the sub-list for method input_type
|
0, // [0:0] is the sub-list for method input_type
|
||||||
0, // [0:0] is the sub-list for extension type_name
|
0, // [0:0] is the sub-list for extension type_name
|
||||||
@@ -458,13 +459,13 @@ var file_dwn_module_v1_module_proto_depIdxs = []int32{
|
|||||||
0, // [0:0] is the sub-list for field type_name
|
0, // [0:0] is the sub-list for field type_name
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { file_dwn_module_v1_module_proto_init() }
|
func init() { file_vault_module_v1_module_proto_init() }
|
||||||
func file_dwn_module_v1_module_proto_init() {
|
func file_vault_module_v1_module_proto_init() {
|
||||||
if File_dwn_module_v1_module_proto != nil {
|
if File_vault_module_v1_module_proto != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
if !protoimpl.UnsafeEnabled {
|
||||||
file_dwn_module_v1_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
file_vault_module_v1_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*Module); i {
|
switch v := v.(*Module); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
@@ -481,18 +482,18 @@ func file_dwn_module_v1_module_proto_init() {
|
|||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: file_dwn_module_v1_module_proto_rawDesc,
|
RawDescriptor: file_vault_module_v1_module_proto_rawDesc,
|
||||||
NumEnums: 0,
|
NumEnums: 0,
|
||||||
NumMessages: 1,
|
NumMessages: 1,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 0,
|
NumServices: 0,
|
||||||
},
|
},
|
||||||
GoTypes: file_dwn_module_v1_module_proto_goTypes,
|
GoTypes: file_vault_module_v1_module_proto_goTypes,
|
||||||
DependencyIndexes: file_dwn_module_v1_module_proto_depIdxs,
|
DependencyIndexes: file_vault_module_v1_module_proto_depIdxs,
|
||||||
MessageInfos: file_dwn_module_v1_module_proto_msgTypes,
|
MessageInfos: file_vault_module_v1_module_proto_msgTypes,
|
||||||
}.Build()
|
}.Build()
|
||||||
File_dwn_module_v1_module_proto = out.File
|
File_vault_module_v1_module_proto = out.File
|
||||||
file_dwn_module_v1_module_proto_rawDesc = nil
|
file_vault_module_v1_module_proto_rawDesc = nil
|
||||||
file_dwn_module_v1_module_proto_goTypes = nil
|
file_vault_module_v1_module_proto_goTypes = nil
|
||||||
file_dwn_module_v1_module_proto_depIdxs = nil
|
file_vault_module_v1_module_proto_depIdxs = nil
|
||||||
}
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,10 +1,10 @@
|
|||||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// - protoc-gen-go-grpc v1.5.1
|
// - protoc-gen-go-grpc v1.3.0
|
||||||
// - protoc (unknown)
|
// - protoc (unknown)
|
||||||
// source: dwn/v1/query.proto
|
// source: vault/v1/query.proto
|
||||||
|
|
||||||
package dwnv1
|
package vaultv1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
context "context"
|
context "context"
|
||||||
@@ -15,25 +15,26 @@ import (
|
|||||||
|
|
||||||
// This is a compile-time assertion to ensure that this generated file
|
// This is a compile-time assertion to ensure that this generated file
|
||||||
// is compatible with the grpc package it is being compiled against.
|
// is compatible with the grpc package it is being compiled against.
|
||||||
// Requires gRPC-Go v1.64.0 or later.
|
// Requires gRPC-Go v1.32.0 or later.
|
||||||
const _ = grpc.SupportPackageIsVersion9
|
const _ = grpc.SupportPackageIsVersion7
|
||||||
|
|
||||||
const (
|
const (
|
||||||
Query_Params_FullMethodName = "/dwn.v1.Query/Params"
|
Query_Params_FullMethodName = "/vault.v1.Query/Params"
|
||||||
Query_Allocate_FullMethodName = "/dwn.v1.Query/Allocate"
|
Query_BuildTx_FullMethodName = "/vault.v1.Query/BuildTx"
|
||||||
|
Query_Sync_FullMethodName = "/vault.v1.Query/Sync"
|
||||||
)
|
)
|
||||||
|
|
||||||
// QueryClient is the client API for Query service.
|
// QueryClient is the client API for Query service.
|
||||||
//
|
//
|
||||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||||
//
|
|
||||||
// Query provides defines the gRPC querier service.
|
|
||||||
type QueryClient interface {
|
type QueryClient interface {
|
||||||
// Params queries all parameters of the module.
|
// Params queries all parameters of the module.
|
||||||
Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
|
Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
|
||||||
// Allocate initializes a Target Vault available for claims with a compatible
|
// BuildTx builds an unsigned transaction message for the given PKL.
|
||||||
// Authentication mechanism. The default authentication mechanism is WebAuthn.
|
BuildTx(ctx context.Context, in *BuildTxRequest, opts ...grpc.CallOption) (*BuildTxResponse, error)
|
||||||
Allocate(ctx context.Context, in *QueryAllocateRequest, opts ...grpc.CallOption) (*QueryAllocateResponse, error)
|
// Sync queries the DID document by its id. And returns the required PKL
|
||||||
|
// information
|
||||||
|
Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (*SyncResponse, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
type queryClient struct {
|
type queryClient struct {
|
||||||
@@ -45,19 +46,26 @@ func NewQueryClient(cc grpc.ClientConnInterface) QueryClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) {
|
func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) {
|
||||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
||||||
out := new(QueryParamsResponse)
|
out := new(QueryParamsResponse)
|
||||||
err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, cOpts...)
|
err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, opts...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *queryClient) Allocate(ctx context.Context, in *QueryAllocateRequest, opts ...grpc.CallOption) (*QueryAllocateResponse, error) {
|
func (c *queryClient) BuildTx(ctx context.Context, in *BuildTxRequest, opts ...grpc.CallOption) (*BuildTxResponse, error) {
|
||||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
out := new(BuildTxResponse)
|
||||||
out := new(QueryAllocateResponse)
|
err := c.cc.Invoke(ctx, Query_BuildTx_FullMethodName, in, out, opts...)
|
||||||
err := c.cc.Invoke(ctx, Query_Allocate_FullMethodName, in, out, cOpts...)
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *queryClient) Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (*SyncResponse, error) {
|
||||||
|
out := new(SyncResponse)
|
||||||
|
err := c.cc.Invoke(ctx, Query_Sync_FullMethodName, in, out, opts...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -66,33 +74,32 @@ func (c *queryClient) Allocate(ctx context.Context, in *QueryAllocateRequest, op
|
|||||||
|
|
||||||
// QueryServer is the server API for Query service.
|
// QueryServer is the server API for Query service.
|
||||||
// All implementations must embed UnimplementedQueryServer
|
// All implementations must embed UnimplementedQueryServer
|
||||||
// for forward compatibility.
|
// for forward compatibility
|
||||||
//
|
|
||||||
// Query provides defines the gRPC querier service.
|
|
||||||
type QueryServer interface {
|
type QueryServer interface {
|
||||||
// Params queries all parameters of the module.
|
// Params queries all parameters of the module.
|
||||||
Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
|
Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
|
||||||
// Allocate initializes a Target Vault available for claims with a compatible
|
// BuildTx builds an unsigned transaction message for the given PKL.
|
||||||
// Authentication mechanism. The default authentication mechanism is WebAuthn.
|
BuildTx(context.Context, *BuildTxRequest) (*BuildTxResponse, error)
|
||||||
Allocate(context.Context, *QueryAllocateRequest) (*QueryAllocateResponse, error)
|
// Sync queries the DID document by its id. And returns the required PKL
|
||||||
|
// information
|
||||||
|
Sync(context.Context, *SyncRequest) (*SyncResponse, error)
|
||||||
mustEmbedUnimplementedQueryServer()
|
mustEmbedUnimplementedQueryServer()
|
||||||
}
|
}
|
||||||
|
|
||||||
// UnimplementedQueryServer must be embedded to have
|
// UnimplementedQueryServer must be embedded to have forward compatible implementations.
|
||||||
// forward compatible implementations.
|
type UnimplementedQueryServer struct {
|
||||||
//
|
}
|
||||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
|
||||||
// pointer dereference when methods are called.
|
|
||||||
type UnimplementedQueryServer struct{}
|
|
||||||
|
|
||||||
func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) {
|
func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method Params not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method Params not implemented")
|
||||||
}
|
}
|
||||||
func (UnimplementedQueryServer) Allocate(context.Context, *QueryAllocateRequest) (*QueryAllocateResponse, error) {
|
func (UnimplementedQueryServer) BuildTx(context.Context, *BuildTxRequest) (*BuildTxResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method Allocate not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method BuildTx not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedQueryServer) Sync(context.Context, *SyncRequest) (*SyncResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method Sync not implemented")
|
||||||
}
|
}
|
||||||
func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {}
|
func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {}
|
||||||
func (UnimplementedQueryServer) testEmbeddedByValue() {}
|
|
||||||
|
|
||||||
// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service.
|
// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service.
|
||||||
// Use of this interface is not recommended, as added methods to QueryServer will
|
// Use of this interface is not recommended, as added methods to QueryServer will
|
||||||
@@ -102,13 +109,6 @@ type UnsafeQueryServer interface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) {
|
func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) {
|
||||||
// If the following call pancis, it indicates UnimplementedQueryServer was
|
|
||||||
// embedded by pointer and is nil. This will cause panics if an
|
|
||||||
// unimplemented method is ever invoked, so we test this at initialization
|
|
||||||
// time to prevent it from happening at runtime later due to I/O.
|
|
||||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
|
||||||
t.testEmbeddedByValue()
|
|
||||||
}
|
|
||||||
s.RegisterService(&Query_ServiceDesc, srv)
|
s.RegisterService(&Query_ServiceDesc, srv)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -130,20 +130,38 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
func _Query_Allocate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
func _Query_BuildTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(QueryAllocateRequest)
|
in := new(BuildTxRequest)
|
||||||
if err := dec(in); err != nil {
|
if err := dec(in); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if interceptor == nil {
|
if interceptor == nil {
|
||||||
return srv.(QueryServer).Allocate(ctx, in)
|
return srv.(QueryServer).BuildTx(ctx, in)
|
||||||
}
|
}
|
||||||
info := &grpc.UnaryServerInfo{
|
info := &grpc.UnaryServerInfo{
|
||||||
Server: srv,
|
Server: srv,
|
||||||
FullMethod: Query_Allocate_FullMethodName,
|
FullMethod: Query_BuildTx_FullMethodName,
|
||||||
}
|
}
|
||||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
return srv.(QueryServer).Allocate(ctx, req.(*QueryAllocateRequest))
|
return srv.(QueryServer).BuildTx(ctx, req.(*BuildTxRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Query_Sync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(SyncRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(QueryServer).Sync(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: Query_Sync_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(QueryServer).Sync(ctx, req.(*SyncRequest))
|
||||||
}
|
}
|
||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
@@ -152,7 +170,7 @@ func _Query_Allocate_Handler(srv interface{}, ctx context.Context, dec func(inte
|
|||||||
// It's only intended for direct use with grpc.RegisterService,
|
// It's only intended for direct use with grpc.RegisterService,
|
||||||
// and not to be introspected or modified (even as a copy)
|
// and not to be introspected or modified (even as a copy)
|
||||||
var Query_ServiceDesc = grpc.ServiceDesc{
|
var Query_ServiceDesc = grpc.ServiceDesc{
|
||||||
ServiceName: "dwn.v1.Query",
|
ServiceName: "vault.v1.Query",
|
||||||
HandlerType: (*QueryServer)(nil),
|
HandlerType: (*QueryServer)(nil),
|
||||||
Methods: []grpc.MethodDesc{
|
Methods: []grpc.MethodDesc{
|
||||||
{
|
{
|
||||||
@@ -160,10 +178,14 @@ var Query_ServiceDesc = grpc.ServiceDesc{
|
|||||||
Handler: _Query_Params_Handler,
|
Handler: _Query_Params_Handler,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
MethodName: "Allocate",
|
MethodName: "BuildTx",
|
||||||
Handler: _Query_Allocate_Handler,
|
Handler: _Query_BuildTx_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "Sync",
|
||||||
|
Handler: _Query_Sync_Handler,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Streams: []grpc.StreamDesc{},
|
Streams: []grpc.StreamDesc{},
|
||||||
Metadata: "dwn/v1/query.proto",
|
Metadata: "vault/v1/query.proto",
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,235 @@
|
|||||||
|
// Code generated by protoc-gen-go-cosmos-orm. DO NOT EDIT.
|
||||||
|
|
||||||
|
package vaultv1
|
||||||
|
|
||||||
|
import (
|
||||||
|
context "context"
|
||||||
|
ormlist "cosmossdk.io/orm/model/ormlist"
|
||||||
|
ormtable "cosmossdk.io/orm/model/ormtable"
|
||||||
|
ormerrors "cosmossdk.io/orm/types/ormerrors"
|
||||||
|
)
|
||||||
|
|
||||||
|
type DWNTable interface {
|
||||||
|
Insert(ctx context.Context, dWN *DWN) error
|
||||||
|
InsertReturningId(ctx context.Context, dWN *DWN) (uint64, error)
|
||||||
|
LastInsertedSequence(ctx context.Context) (uint64, error)
|
||||||
|
Update(ctx context.Context, dWN *DWN) error
|
||||||
|
Save(ctx context.Context, dWN *DWN) error
|
||||||
|
Delete(ctx context.Context, dWN *DWN) 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) (*DWN, error)
|
||||||
|
HasByAlias(ctx context.Context, alias string) (found bool, err error)
|
||||||
|
// GetByAlias returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
||||||
|
GetByAlias(ctx context.Context, alias string) (*DWN, error)
|
||||||
|
HasByCid(ctx context.Context, cid string) (found bool, err error)
|
||||||
|
// GetByCid returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
||||||
|
GetByCid(ctx context.Context, cid string) (*DWN, error)
|
||||||
|
List(ctx context.Context, prefixKey DWNIndexKey, opts ...ormlist.Option) (DWNIterator, error)
|
||||||
|
ListRange(ctx context.Context, from, to DWNIndexKey, opts ...ormlist.Option) (DWNIterator, error)
|
||||||
|
DeleteBy(ctx context.Context, prefixKey DWNIndexKey) error
|
||||||
|
DeleteRange(ctx context.Context, from, to DWNIndexKey) error
|
||||||
|
|
||||||
|
doNotImplement()
|
||||||
|
}
|
||||||
|
|
||||||
|
type DWNIterator struct {
|
||||||
|
ormtable.Iterator
|
||||||
|
}
|
||||||
|
|
||||||
|
func (i DWNIterator) Value() (*DWN, error) {
|
||||||
|
var dWN DWN
|
||||||
|
err := i.UnmarshalMessage(&dWN)
|
||||||
|
return &dWN, err
|
||||||
|
}
|
||||||
|
|
||||||
|
type DWNIndexKey interface {
|
||||||
|
id() uint32
|
||||||
|
values() []interface{}
|
||||||
|
dWNIndexKey()
|
||||||
|
}
|
||||||
|
|
||||||
|
// primary key starting index..
|
||||||
|
type DWNPrimaryKey = DWNIdIndexKey
|
||||||
|
|
||||||
|
type DWNIdIndexKey struct {
|
||||||
|
vs []interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x DWNIdIndexKey) id() uint32 { return 0 }
|
||||||
|
func (x DWNIdIndexKey) values() []interface{} { return x.vs }
|
||||||
|
func (x DWNIdIndexKey) dWNIndexKey() {}
|
||||||
|
|
||||||
|
func (this DWNIdIndexKey) WithId(id uint64) DWNIdIndexKey {
|
||||||
|
this.vs = []interface{}{id}
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
type DWNAliasIndexKey struct {
|
||||||
|
vs []interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x DWNAliasIndexKey) id() uint32 { return 1 }
|
||||||
|
func (x DWNAliasIndexKey) values() []interface{} { return x.vs }
|
||||||
|
func (x DWNAliasIndexKey) dWNIndexKey() {}
|
||||||
|
|
||||||
|
func (this DWNAliasIndexKey) WithAlias(alias string) DWNAliasIndexKey {
|
||||||
|
this.vs = []interface{}{alias}
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
type DWNCidIndexKey struct {
|
||||||
|
vs []interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x DWNCidIndexKey) id() uint32 { return 2 }
|
||||||
|
func (x DWNCidIndexKey) values() []interface{} { return x.vs }
|
||||||
|
func (x DWNCidIndexKey) dWNIndexKey() {}
|
||||||
|
|
||||||
|
func (this DWNCidIndexKey) WithCid(cid string) DWNCidIndexKey {
|
||||||
|
this.vs = []interface{}{cid}
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
type dWNTable struct {
|
||||||
|
table ormtable.AutoIncrementTable
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this dWNTable) Insert(ctx context.Context, dWN *DWN) error {
|
||||||
|
return this.table.Insert(ctx, dWN)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this dWNTable) Update(ctx context.Context, dWN *DWN) error {
|
||||||
|
return this.table.Update(ctx, dWN)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this dWNTable) Save(ctx context.Context, dWN *DWN) error {
|
||||||
|
return this.table.Save(ctx, dWN)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this dWNTable) Delete(ctx context.Context, dWN *DWN) error {
|
||||||
|
return this.table.Delete(ctx, dWN)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this dWNTable) InsertReturningId(ctx context.Context, dWN *DWN) (uint64, error) {
|
||||||
|
return this.table.InsertReturningPKey(ctx, dWN)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this dWNTable) LastInsertedSequence(ctx context.Context) (uint64, error) {
|
||||||
|
return this.table.LastInsertedSequence(ctx)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this dWNTable) Has(ctx context.Context, id uint64) (found bool, err error) {
|
||||||
|
return this.table.PrimaryKey().Has(ctx, id)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this dWNTable) Get(ctx context.Context, id uint64) (*DWN, error) {
|
||||||
|
var dWN DWN
|
||||||
|
found, err := this.table.PrimaryKey().Get(ctx, &dWN, id)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if !found {
|
||||||
|
return nil, ormerrors.NotFound
|
||||||
|
}
|
||||||
|
return &dWN, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this dWNTable) HasByAlias(ctx context.Context, alias string) (found bool, err error) {
|
||||||
|
return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx,
|
||||||
|
alias,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this dWNTable) GetByAlias(ctx context.Context, alias string) (*DWN, error) {
|
||||||
|
var dWN DWN
|
||||||
|
found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &dWN,
|
||||||
|
alias,
|
||||||
|
)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if !found {
|
||||||
|
return nil, ormerrors.NotFound
|
||||||
|
}
|
||||||
|
return &dWN, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this dWNTable) HasByCid(ctx context.Context, cid string) (found bool, err error) {
|
||||||
|
return this.table.GetIndexByID(2).(ormtable.UniqueIndex).Has(ctx,
|
||||||
|
cid,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this dWNTable) GetByCid(ctx context.Context, cid string) (*DWN, error) {
|
||||||
|
var dWN DWN
|
||||||
|
found, err := this.table.GetIndexByID(2).(ormtable.UniqueIndex).Get(ctx, &dWN,
|
||||||
|
cid,
|
||||||
|
)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if !found {
|
||||||
|
return nil, ormerrors.NotFound
|
||||||
|
}
|
||||||
|
return &dWN, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this dWNTable) List(ctx context.Context, prefixKey DWNIndexKey, opts ...ormlist.Option) (DWNIterator, error) {
|
||||||
|
it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...)
|
||||||
|
return DWNIterator{it}, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this dWNTable) ListRange(ctx context.Context, from, to DWNIndexKey, opts ...ormlist.Option) (DWNIterator, error) {
|
||||||
|
it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...)
|
||||||
|
return DWNIterator{it}, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this dWNTable) DeleteBy(ctx context.Context, prefixKey DWNIndexKey) error {
|
||||||
|
return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this dWNTable) DeleteRange(ctx context.Context, from, to DWNIndexKey) error {
|
||||||
|
return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values())
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this dWNTable) doNotImplement() {}
|
||||||
|
|
||||||
|
var _ DWNTable = dWNTable{}
|
||||||
|
|
||||||
|
func NewDWNTable(db ormtable.Schema) (DWNTable, error) {
|
||||||
|
table := db.GetTable(&DWN{})
|
||||||
|
if table == nil {
|
||||||
|
return nil, ormerrors.TableNotFound.Wrap(string((&DWN{}).ProtoReflect().Descriptor().FullName()))
|
||||||
|
}
|
||||||
|
return dWNTable{table.(ormtable.AutoIncrementTable)}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type StateStore interface {
|
||||||
|
DWNTable() DWNTable
|
||||||
|
|
||||||
|
doNotImplement()
|
||||||
|
}
|
||||||
|
|
||||||
|
type stateStore struct {
|
||||||
|
dWN DWNTable
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x stateStore) DWNTable() DWNTable {
|
||||||
|
return x.dWN
|
||||||
|
}
|
||||||
|
|
||||||
|
func (stateStore) doNotImplement() {}
|
||||||
|
|
||||||
|
var _ StateStore = stateStore{}
|
||||||
|
|
||||||
|
func NewStateStore(db ormtable.Schema) (StateStore, error) {
|
||||||
|
dWNTable, err := NewDWNTable(db)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return stateStore{
|
||||||
|
dWNTable,
|
||||||
|
}, nil
|
||||||
|
}
|
||||||
@@ -0,0 +1,772 @@
|
|||||||
|
// Code generated by protoc-gen-go-pulsar. DO NOT EDIT.
|
||||||
|
package vaultv1
|
||||||
|
|
||||||
|
import (
|
||||||
|
_ "cosmossdk.io/api/cosmos/orm/v1"
|
||||||
|
fmt "fmt"
|
||||||
|
runtime "github.com/cosmos/cosmos-proto/runtime"
|
||||||
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
|
protoiface "google.golang.org/protobuf/runtime/protoiface"
|
||||||
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||||
|
io "io"
|
||||||
|
reflect "reflect"
|
||||||
|
sync "sync"
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
md_DWN protoreflect.MessageDescriptor
|
||||||
|
fd_DWN_id protoreflect.FieldDescriptor
|
||||||
|
fd_DWN_alias protoreflect.FieldDescriptor
|
||||||
|
fd_DWN_cid protoreflect.FieldDescriptor
|
||||||
|
fd_DWN_resolver protoreflect.FieldDescriptor
|
||||||
|
)
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
file_vault_v1_state_proto_init()
|
||||||
|
md_DWN = File_vault_v1_state_proto.Messages().ByName("DWN")
|
||||||
|
fd_DWN_id = md_DWN.Fields().ByName("id")
|
||||||
|
fd_DWN_alias = md_DWN.Fields().ByName("alias")
|
||||||
|
fd_DWN_cid = md_DWN.Fields().ByName("cid")
|
||||||
|
fd_DWN_resolver = md_DWN.Fields().ByName("resolver")
|
||||||
|
}
|
||||||
|
|
||||||
|
var _ protoreflect.Message = (*fastReflection_DWN)(nil)
|
||||||
|
|
||||||
|
type fastReflection_DWN DWN
|
||||||
|
|
||||||
|
func (x *DWN) ProtoReflect() protoreflect.Message {
|
||||||
|
return (*fastReflection_DWN)(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DWN) slowProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_vault_v1_state_proto_msgTypes[0]
|
||||||
|
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_DWN_messageType fastReflection_DWN_messageType
|
||||||
|
var _ protoreflect.MessageType = fastReflection_DWN_messageType{}
|
||||||
|
|
||||||
|
type fastReflection_DWN_messageType struct{}
|
||||||
|
|
||||||
|
func (x fastReflection_DWN_messageType) Zero() protoreflect.Message {
|
||||||
|
return (*fastReflection_DWN)(nil)
|
||||||
|
}
|
||||||
|
func (x fastReflection_DWN_messageType) New() protoreflect.Message {
|
||||||
|
return new(fastReflection_DWN)
|
||||||
|
}
|
||||||
|
func (x fastReflection_DWN_messageType) Descriptor() protoreflect.MessageDescriptor {
|
||||||
|
return md_DWN
|
||||||
|
}
|
||||||
|
|
||||||
|
// Descriptor returns message descriptor, which contains only the protobuf
|
||||||
|
// type information for the message.
|
||||||
|
func (x *fastReflection_DWN) Descriptor() protoreflect.MessageDescriptor {
|
||||||
|
return md_DWN
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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_DWN) Type() protoreflect.MessageType {
|
||||||
|
return _fastReflection_DWN_messageType
|
||||||
|
}
|
||||||
|
|
||||||
|
// New returns a newly allocated and mutable empty message.
|
||||||
|
func (x *fastReflection_DWN) New() protoreflect.Message {
|
||||||
|
return new(fastReflection_DWN)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Interface unwraps the message reflection interface and
|
||||||
|
// returns the underlying ProtoMessage interface.
|
||||||
|
func (x *fastReflection_DWN) Interface() protoreflect.ProtoMessage {
|
||||||
|
return (*DWN)(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_DWN) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
|
||||||
|
if x.Id != uint64(0) {
|
||||||
|
value := protoreflect.ValueOfUint64(x.Id)
|
||||||
|
if !f(fd_DWN_id, value) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if x.Alias != "" {
|
||||||
|
value := protoreflect.ValueOfString(x.Alias)
|
||||||
|
if !f(fd_DWN_alias, value) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if x.Cid != "" {
|
||||||
|
value := protoreflect.ValueOfString(x.Cid)
|
||||||
|
if !f(fd_DWN_cid, value) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if x.Resolver != "" {
|
||||||
|
value := protoreflect.ValueOfString(x.Resolver)
|
||||||
|
if !f(fd_DWN_resolver, 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_DWN) Has(fd protoreflect.FieldDescriptor) bool {
|
||||||
|
switch fd.FullName() {
|
||||||
|
case "vault.v1.DWN.id":
|
||||||
|
return x.Id != uint64(0)
|
||||||
|
case "vault.v1.DWN.alias":
|
||||||
|
return x.Alias != ""
|
||||||
|
case "vault.v1.DWN.cid":
|
||||||
|
return x.Cid != ""
|
||||||
|
case "vault.v1.DWN.resolver":
|
||||||
|
return x.Resolver != ""
|
||||||
|
default:
|
||||||
|
if fd.IsExtension() {
|
||||||
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.DWN"))
|
||||||
|
}
|
||||||
|
panic(fmt.Errorf("message vault.v1.DWN 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_DWN) Clear(fd protoreflect.FieldDescriptor) {
|
||||||
|
switch fd.FullName() {
|
||||||
|
case "vault.v1.DWN.id":
|
||||||
|
x.Id = uint64(0)
|
||||||
|
case "vault.v1.DWN.alias":
|
||||||
|
x.Alias = ""
|
||||||
|
case "vault.v1.DWN.cid":
|
||||||
|
x.Cid = ""
|
||||||
|
case "vault.v1.DWN.resolver":
|
||||||
|
x.Resolver = ""
|
||||||
|
default:
|
||||||
|
if fd.IsExtension() {
|
||||||
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.DWN"))
|
||||||
|
}
|
||||||
|
panic(fmt.Errorf("message vault.v1.DWN 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_DWN) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
|
||||||
|
switch descriptor.FullName() {
|
||||||
|
case "vault.v1.DWN.id":
|
||||||
|
value := x.Id
|
||||||
|
return protoreflect.ValueOfUint64(value)
|
||||||
|
case "vault.v1.DWN.alias":
|
||||||
|
value := x.Alias
|
||||||
|
return protoreflect.ValueOfString(value)
|
||||||
|
case "vault.v1.DWN.cid":
|
||||||
|
value := x.Cid
|
||||||
|
return protoreflect.ValueOfString(value)
|
||||||
|
case "vault.v1.DWN.resolver":
|
||||||
|
value := x.Resolver
|
||||||
|
return protoreflect.ValueOfString(value)
|
||||||
|
default:
|
||||||
|
if descriptor.IsExtension() {
|
||||||
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.DWN"))
|
||||||
|
}
|
||||||
|
panic(fmt.Errorf("message vault.v1.DWN 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_DWN) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
|
||||||
|
switch fd.FullName() {
|
||||||
|
case "vault.v1.DWN.id":
|
||||||
|
x.Id = value.Uint()
|
||||||
|
case "vault.v1.DWN.alias":
|
||||||
|
x.Alias = value.Interface().(string)
|
||||||
|
case "vault.v1.DWN.cid":
|
||||||
|
x.Cid = value.Interface().(string)
|
||||||
|
case "vault.v1.DWN.resolver":
|
||||||
|
x.Resolver = value.Interface().(string)
|
||||||
|
default:
|
||||||
|
if fd.IsExtension() {
|
||||||
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.DWN"))
|
||||||
|
}
|
||||||
|
panic(fmt.Errorf("message vault.v1.DWN 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_DWN) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||||
|
switch fd.FullName() {
|
||||||
|
case "vault.v1.DWN.id":
|
||||||
|
panic(fmt.Errorf("field id of message vault.v1.DWN is not mutable"))
|
||||||
|
case "vault.v1.DWN.alias":
|
||||||
|
panic(fmt.Errorf("field alias of message vault.v1.DWN is not mutable"))
|
||||||
|
case "vault.v1.DWN.cid":
|
||||||
|
panic(fmt.Errorf("field cid of message vault.v1.DWN is not mutable"))
|
||||||
|
case "vault.v1.DWN.resolver":
|
||||||
|
panic(fmt.Errorf("field resolver of message vault.v1.DWN is not mutable"))
|
||||||
|
default:
|
||||||
|
if fd.IsExtension() {
|
||||||
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.DWN"))
|
||||||
|
}
|
||||||
|
panic(fmt.Errorf("message vault.v1.DWN 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_DWN) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||||
|
switch fd.FullName() {
|
||||||
|
case "vault.v1.DWN.id":
|
||||||
|
return protoreflect.ValueOfUint64(uint64(0))
|
||||||
|
case "vault.v1.DWN.alias":
|
||||||
|
return protoreflect.ValueOfString("")
|
||||||
|
case "vault.v1.DWN.cid":
|
||||||
|
return protoreflect.ValueOfString("")
|
||||||
|
case "vault.v1.DWN.resolver":
|
||||||
|
return protoreflect.ValueOfString("")
|
||||||
|
default:
|
||||||
|
if fd.IsExtension() {
|
||||||
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.DWN"))
|
||||||
|
}
|
||||||
|
panic(fmt.Errorf("message vault.v1.DWN 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_DWN) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
||||||
|
switch d.FullName() {
|
||||||
|
default:
|
||||||
|
panic(fmt.Errorf("%s is not a oneof field in vault.v1.DWN", 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_DWN) 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_DWN) 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_DWN) 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_DWN) ProtoMethods() *protoiface.Methods {
|
||||||
|
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
|
||||||
|
x := input.Message.Interface().(*DWN)
|
||||||
|
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.Alias)
|
||||||
|
if l > 0 {
|
||||||
|
n += 1 + l + runtime.Sov(uint64(l))
|
||||||
|
}
|
||||||
|
l = len(x.Cid)
|
||||||
|
if l > 0 {
|
||||||
|
n += 1 + l + runtime.Sov(uint64(l))
|
||||||
|
}
|
||||||
|
l = len(x.Resolver)
|
||||||
|
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().(*DWN)
|
||||||
|
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.Resolver) > 0 {
|
||||||
|
i -= len(x.Resolver)
|
||||||
|
copy(dAtA[i:], x.Resolver)
|
||||||
|
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Resolver)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x22
|
||||||
|
}
|
||||||
|
if len(x.Cid) > 0 {
|
||||||
|
i -= len(x.Cid)
|
||||||
|
copy(dAtA[i:], x.Cid)
|
||||||
|
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Cid)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x1a
|
||||||
|
}
|
||||||
|
if len(x.Alias) > 0 {
|
||||||
|
i -= len(x.Alias)
|
||||||
|
copy(dAtA[i:], x.Alias)
|
||||||
|
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Alias)))
|
||||||
|
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().(*DWN)
|
||||||
|
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: DWN: wiretype end group for non-group")
|
||||||
|
}
|
||||||
|
if fieldNum <= 0 {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DWN: 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 Alias", 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.Alias = 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 Cid", 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.Cid = 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 Resolver", 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.Resolver = 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
|
||||||
|
// protoc (unknown)
|
||||||
|
// source: vault/v1/state.proto
|
||||||
|
|
||||||
|
const (
|
||||||
|
// Verify that this generated code is sufficiently up-to-date.
|
||||||
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||||
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||||
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||||
|
)
|
||||||
|
|
||||||
|
type DWN struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||||
|
Alias string `protobuf:"bytes,2,opt,name=alias,proto3" json:"alias,omitempty"`
|
||||||
|
Cid string `protobuf:"bytes,3,opt,name=cid,proto3" json:"cid,omitempty"`
|
||||||
|
Resolver string `protobuf:"bytes,4,opt,name=resolver,proto3" json:"resolver,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DWN) Reset() {
|
||||||
|
*x = DWN{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_vault_v1_state_proto_msgTypes[0]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DWN) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*DWN) ProtoMessage() {}
|
||||||
|
|
||||||
|
// Deprecated: Use DWN.ProtoReflect.Descriptor instead.
|
||||||
|
func (*DWN) Descriptor() ([]byte, []int) {
|
||||||
|
return file_vault_v1_state_proto_rawDescGZIP(), []int{0}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DWN) GetId() uint64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Id
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DWN) GetAlias() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Alias
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DWN) GetCid() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Cid
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DWN) GetResolver() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Resolver
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
var File_vault_v1_state_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
|
var file_vault_v1_state_proto_rawDesc = []byte{
|
||||||
|
0x0a, 0x14, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x65,
|
||||||
|
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31,
|
||||||
|
0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6f, 0x72, 0x6d, 0x2f, 0x76, 0x31, 0x2f,
|
||||||
|
0x6f, 0x72, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x83, 0x01, 0x0a, 0x03, 0x44, 0x57,
|
||||||
|
0x4e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69,
|
||||||
|
0x64, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||||
|
0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x03,
|
||||||
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73,
|
||||||
|
0x6f, 0x6c, 0x76, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73,
|
||||||
|
0x6f, 0x6c, 0x76, 0x65, 0x72, 0x3a, 0x28, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x22, 0x0a, 0x06, 0x0a,
|
||||||
|
0x02, 0x69, 0x64, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x10, 0x01,
|
||||||
|
0x18, 0x01, 0x12, 0x09, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x10, 0x02, 0x18, 0x01, 0x18, 0x01, 0x42,
|
||||||
|
0x88, 0x01, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31,
|
||||||
|
0x42, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x65, 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 (
|
||||||
|
file_vault_v1_state_proto_rawDescOnce sync.Once
|
||||||
|
file_vault_v1_state_proto_rawDescData = file_vault_v1_state_proto_rawDesc
|
||||||
|
)
|
||||||
|
|
||||||
|
func file_vault_v1_state_proto_rawDescGZIP() []byte {
|
||||||
|
file_vault_v1_state_proto_rawDescOnce.Do(func() {
|
||||||
|
file_vault_v1_state_proto_rawDescData = protoimpl.X.CompressGZIP(file_vault_v1_state_proto_rawDescData)
|
||||||
|
})
|
||||||
|
return file_vault_v1_state_proto_rawDescData
|
||||||
|
}
|
||||||
|
|
||||||
|
var file_vault_v1_state_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||||
|
var file_vault_v1_state_proto_goTypes = []interface{}{
|
||||||
|
(*DWN)(nil), // 0: vault.v1.DWN
|
||||||
|
}
|
||||||
|
var file_vault_v1_state_proto_depIdxs = []int32{
|
||||||
|
0, // [0:0] is the sub-list for method output_type
|
||||||
|
0, // [0:0] is the sub-list for method input_type
|
||||||
|
0, // [0:0] is the sub-list for extension type_name
|
||||||
|
0, // [0:0] is the sub-list for extension extendee
|
||||||
|
0, // [0:0] is the sub-list for field type_name
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() { file_vault_v1_state_proto_init() }
|
||||||
|
func file_vault_v1_state_proto_init() {
|
||||||
|
if File_vault_v1_state_proto != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if !protoimpl.UnsafeEnabled {
|
||||||
|
file_vault_v1_state_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*DWN); 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{
|
||||||
|
File: protoimpl.DescBuilder{
|
||||||
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
|
RawDescriptor: file_vault_v1_state_proto_rawDesc,
|
||||||
|
NumEnums: 0,
|
||||||
|
NumMessages: 1,
|
||||||
|
NumExtensions: 0,
|
||||||
|
NumServices: 0,
|
||||||
|
},
|
||||||
|
GoTypes: file_vault_v1_state_proto_goTypes,
|
||||||
|
DependencyIndexes: file_vault_v1_state_proto_depIdxs,
|
||||||
|
MessageInfos: file_vault_v1_state_proto_msgTypes,
|
||||||
|
}.Build()
|
||||||
|
File_vault_v1_state_proto = out.File
|
||||||
|
file_vault_v1_state_proto_rawDesc = nil
|
||||||
|
file_vault_v1_state_proto_goTypes = nil
|
||||||
|
file_vault_v1_state_proto_depIdxs = nil
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,158 @@
|
|||||||
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// - protoc-gen-go-grpc v1.3.0
|
||||||
|
// - protoc (unknown)
|
||||||
|
// source: vault/v1/tx.proto
|
||||||
|
|
||||||
|
package vaultv1
|
||||||
|
|
||||||
|
import (
|
||||||
|
context "context"
|
||||||
|
grpc "google.golang.org/grpc"
|
||||||
|
codes "google.golang.org/grpc/codes"
|
||||||
|
status "google.golang.org/grpc/status"
|
||||||
|
)
|
||||||
|
|
||||||
|
// This is a compile-time assertion to ensure that this generated file
|
||||||
|
// is compatible with the grpc package it is being compiled against.
|
||||||
|
// Requires gRPC-Go v1.32.0 or later.
|
||||||
|
const _ = grpc.SupportPackageIsVersion7
|
||||||
|
|
||||||
|
const (
|
||||||
|
Msg_AllocateVault_FullMethodName = "/vault.v1.Msg/AllocateVault"
|
||||||
|
Msg_UpdateParams_FullMethodName = "/vault.v1.Msg/UpdateParams"
|
||||||
|
)
|
||||||
|
|
||||||
|
// MsgClient is the client API for Msg service.
|
||||||
|
//
|
||||||
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||||
|
type MsgClient interface {
|
||||||
|
// AllocateVault assembles a sqlite3 database in a local directory and returns
|
||||||
|
// the CID of the database. this operation is called by services initiating a
|
||||||
|
// controller registration.
|
||||||
|
AllocateVault(ctx context.Context, in *MsgAllocateVault, opts ...grpc.CallOption) (*MsgAllocateVaultResponse, error)
|
||||||
|
// UpdateParams defines a governance operation for updating the parameters.
|
||||||
|
//
|
||||||
|
// Since: cosmos-sdk 0.47
|
||||||
|
UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
type msgClient struct {
|
||||||
|
cc grpc.ClientConnInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewMsgClient(cc grpc.ClientConnInterface) MsgClient {
|
||||||
|
return &msgClient{cc}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *msgClient) AllocateVault(ctx context.Context, in *MsgAllocateVault, opts ...grpc.CallOption) (*MsgAllocateVaultResponse, error) {
|
||||||
|
out := new(MsgAllocateVaultResponse)
|
||||||
|
err := c.cc.Invoke(ctx, Msg_AllocateVault_FullMethodName, in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) {
|
||||||
|
out := new(MsgUpdateParamsResponse)
|
||||||
|
err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MsgServer is the server API for Msg service.
|
||||||
|
// All implementations must embed UnimplementedMsgServer
|
||||||
|
// for forward compatibility
|
||||||
|
type MsgServer interface {
|
||||||
|
// AllocateVault assembles a sqlite3 database in a local directory and returns
|
||||||
|
// the CID of the database. this operation is called by services initiating a
|
||||||
|
// controller registration.
|
||||||
|
AllocateVault(context.Context, *MsgAllocateVault) (*MsgAllocateVaultResponse, error)
|
||||||
|
// UpdateParams defines a governance operation for updating the parameters.
|
||||||
|
//
|
||||||
|
// Since: cosmos-sdk 0.47
|
||||||
|
UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
|
||||||
|
mustEmbedUnimplementedMsgServer()
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnimplementedMsgServer must be embedded to have forward compatible implementations.
|
||||||
|
type UnimplementedMsgServer struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func (UnimplementedMsgServer) AllocateVault(context.Context, *MsgAllocateVault) (*MsgAllocateVaultResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method AllocateVault not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {}
|
||||||
|
|
||||||
|
// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service.
|
||||||
|
// Use of this interface is not recommended, as added methods to MsgServer will
|
||||||
|
// result in compilation errors.
|
||||||
|
type UnsafeMsgServer interface {
|
||||||
|
mustEmbedUnimplementedMsgServer()
|
||||||
|
}
|
||||||
|
|
||||||
|
func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) {
|
||||||
|
s.RegisterService(&Msg_ServiceDesc, srv)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Msg_AllocateVault_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(MsgAllocateVault)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(MsgServer).AllocateVault(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: Msg_AllocateVault_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(MsgServer).AllocateVault(ctx, req.(*MsgAllocateVault))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(MsgUpdateParams)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(MsgServer).UpdateParams(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: Msg_UpdateParams_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service.
|
||||||
|
// It's only intended for direct use with grpc.RegisterService,
|
||||||
|
// and not to be introspected or modified (even as a copy)
|
||||||
|
var Msg_ServiceDesc = grpc.ServiceDesc{
|
||||||
|
ServiceName: "vault.v1.Msg",
|
||||||
|
HandlerType: (*MsgServer)(nil),
|
||||||
|
Methods: []grpc.MethodDesc{
|
||||||
|
{
|
||||||
|
MethodName: "AllocateVault",
|
||||||
|
Handler: _Msg_AllocateVault_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "UpdateParams",
|
||||||
|
Handler: _Msg_UpdateParams_Handler,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Streams: []grpc.StreamDesc{},
|
||||||
|
Metadata: "vault/v1/tx.proto",
|
||||||
|
}
|
||||||
+1
-1
@@ -58,7 +58,7 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) {
|
|||||||
ante.NewTxTimeoutHeightDecorator(),
|
ante.NewTxTimeoutHeightDecorator(),
|
||||||
ante.NewValidateMemoDecorator(options.AccountKeeper),
|
ante.NewValidateMemoDecorator(options.AccountKeeper),
|
||||||
// ante.NewConsumeGasForTxSizeDecorator(options.AccountKeeper),
|
// ante.NewConsumeGasForTxSizeDecorator(options.AccountKeeper),
|
||||||
globalfeeante.NewFeeDecorator(options.BypassMinFeeMsgTypes, options.GlobalFeeKeeper, 2_000_000),
|
globalfeeante.NewFeeDecorator(options.BypassMinFeeMsgTypes, options.GlobalFeeKeeper, options.StakingKeeper, 2_000_000),
|
||||||
// ante.NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper, options.TxFeeChecker),
|
// ante.NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper, options.TxFeeChecker),
|
||||||
ante.NewSetPubKeyDecorator(options.AccountKeeper), // SetPubKeyDecorator must be called before all signature verification decorators
|
ante.NewSetPubKeyDecorator(options.AccountKeeper), // SetPubKeyDecorator must be called before all signature verification decorators
|
||||||
ante.NewValidateSigCountDecorator(options.AccountKeeper),
|
ante.NewValidateSigCountDecorator(options.AccountKeeper),
|
||||||
|
|||||||
+81
-61
@@ -134,15 +134,6 @@ import (
|
|||||||
ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported"
|
ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported"
|
||||||
ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper"
|
ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper"
|
||||||
ibctm "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint"
|
ibctm "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint"
|
||||||
did "github.com/onsonr/sonr/x/did"
|
|
||||||
didkeeper "github.com/onsonr/sonr/x/did/keeper"
|
|
||||||
didtypes "github.com/onsonr/sonr/x/did/types"
|
|
||||||
dwn "github.com/onsonr/sonr/x/dwn"
|
|
||||||
dwnkeeper "github.com/onsonr/sonr/x/dwn/keeper"
|
|
||||||
dwntypes "github.com/onsonr/sonr/x/dwn/types"
|
|
||||||
svc "github.com/onsonr/sonr/x/svc"
|
|
||||||
svckeeper "github.com/onsonr/sonr/x/svc/keeper"
|
|
||||||
svctypes "github.com/onsonr/sonr/x/svc/types"
|
|
||||||
"github.com/spf13/cast"
|
"github.com/spf13/cast"
|
||||||
globalfee "github.com/strangelove-ventures/globalfee/x/globalfee"
|
globalfee "github.com/strangelove-ventures/globalfee/x/globalfee"
|
||||||
globalfeekeeper "github.com/strangelove-ventures/globalfee/x/globalfee/keeper"
|
globalfeekeeper "github.com/strangelove-ventures/globalfee/x/globalfee/keeper"
|
||||||
@@ -153,6 +144,22 @@ import (
|
|||||||
tokenfactory "github.com/strangelove-ventures/tokenfactory/x/tokenfactory"
|
tokenfactory "github.com/strangelove-ventures/tokenfactory/x/tokenfactory"
|
||||||
tokenfactorykeeper "github.com/strangelove-ventures/tokenfactory/x/tokenfactory/keeper"
|
tokenfactorykeeper "github.com/strangelove-ventures/tokenfactory/x/tokenfactory/keeper"
|
||||||
tokenfactorytypes "github.com/strangelove-ventures/tokenfactory/x/tokenfactory/types"
|
tokenfactorytypes "github.com/strangelove-ventures/tokenfactory/x/tokenfactory/types"
|
||||||
|
|
||||||
|
did "github.com/onsonr/sonr/x/did"
|
||||||
|
didkeeper "github.com/onsonr/sonr/x/did/keeper"
|
||||||
|
didtypes "github.com/onsonr/sonr/x/did/types"
|
||||||
|
macaroon "github.com/onsonr/sonr/x/macaroon"
|
||||||
|
macaroonkeeper "github.com/onsonr/sonr/x/macaroon/keeper"
|
||||||
|
macaroontypes "github.com/onsonr/sonr/x/macaroon/types"
|
||||||
|
oracle "github.com/onsonr/sonr/x/oracle"
|
||||||
|
oraclekeeper "github.com/onsonr/sonr/x/oracle/keeper"
|
||||||
|
oracletypes "github.com/onsonr/sonr/x/oracle/types"
|
||||||
|
service "github.com/onsonr/sonr/x/service"
|
||||||
|
servicekeeper "github.com/onsonr/sonr/x/service/keeper"
|
||||||
|
servicetypes "github.com/onsonr/sonr/x/service/types"
|
||||||
|
vault "github.com/onsonr/sonr/x/vault"
|
||||||
|
vaultkeeper "github.com/onsonr/sonr/x/vault/keeper"
|
||||||
|
vaulttypes "github.com/onsonr/sonr/x/vault/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
const appName = "sonr"
|
const appName = "sonr"
|
||||||
@@ -231,8 +238,10 @@ type SonrApp struct {
|
|||||||
CrisisKeeper *crisiskeeper.Keeper
|
CrisisKeeper *crisiskeeper.Keeper
|
||||||
UpgradeKeeper *upgradekeeper.Keeper
|
UpgradeKeeper *upgradekeeper.Keeper
|
||||||
legacyAmino *codec.LegacyAmino
|
legacyAmino *codec.LegacyAmino
|
||||||
DwnKeeper dwnkeeper.Keeper
|
VaultKeeper vaultkeeper.Keeper
|
||||||
SvcKeeper svckeeper.Keeper
|
MacaroonKeeper macaroonkeeper.Keeper
|
||||||
|
ServiceKeeper servicekeeper.Keeper
|
||||||
|
OracleKeeper oraclekeeper.Keeper
|
||||||
sm *module.SimulationManager
|
sm *module.SimulationManager
|
||||||
BasicModuleManager module.BasicManager
|
BasicModuleManager module.BasicManager
|
||||||
ModuleManager *module.Manager
|
ModuleManager *module.Manager
|
||||||
@@ -365,8 +374,10 @@ func NewChainApp(
|
|||||||
globalfeetypes.StoreKey,
|
globalfeetypes.StoreKey,
|
||||||
packetforwardtypes.StoreKey,
|
packetforwardtypes.StoreKey,
|
||||||
didtypes.StoreKey,
|
didtypes.StoreKey,
|
||||||
dwntypes.StoreKey,
|
vaulttypes.StoreKey,
|
||||||
svctypes.StoreKey,
|
macaroontypes.StoreKey,
|
||||||
|
servicetypes.StoreKey,
|
||||||
|
oracletypes.StoreKey,
|
||||||
)
|
)
|
||||||
|
|
||||||
tkeys := storetypes.NewTransientStoreKeys(paramstypes.TStoreKey)
|
tkeys := storetypes.NewTransientStoreKeys(paramstypes.TStoreKey)
|
||||||
@@ -615,54 +626,50 @@ func NewChainApp(
|
|||||||
// If evidence needs to be handled for the app, set routes in router here and seal
|
// If evidence needs to be handled for the app, set routes in router here and seal
|
||||||
app.EvidenceKeeper = *evidenceKeeper
|
app.EvidenceKeeper = *evidenceKeeper
|
||||||
|
|
||||||
|
// Create the oracle Keeper
|
||||||
|
app.OracleKeeper = oraclekeeper.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]),
|
||||||
|
logger,
|
||||||
|
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
|
||||||
|
)
|
||||||
|
|
||||||
|
// Create the vault Keeper
|
||||||
|
app.VaultKeeper = vaultkeeper.NewKeeper(
|
||||||
|
appCodec,
|
||||||
|
sdkruntime.NewKVStoreService(keys[vaulttypes.StoreKey]),
|
||||||
|
logger,
|
||||||
|
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
|
||||||
|
app.DidKeeper,
|
||||||
|
)
|
||||||
|
|
||||||
// Create the did Keeper
|
// Create the did Keeper
|
||||||
app.DidKeeper = didkeeper.NewKeeper(
|
app.DidKeeper = didkeeper.NewKeeper(
|
||||||
appCodec,
|
appCodec,
|
||||||
sdkruntime.NewKVStoreService(keys[didtypes.StoreKey]),
|
sdkruntime.NewKVStoreService(keys[didtypes.StoreKey]),
|
||||||
logger,
|
|
||||||
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
|
|
||||||
app.AccountKeeper,
|
app.AccountKeeper,
|
||||||
app.NFTKeeper,
|
app.NFTKeeper,
|
||||||
app.StakingKeeper,
|
app.StakingKeeper,
|
||||||
)
|
|
||||||
|
|
||||||
// Create the svc Keeper
|
|
||||||
app.SvcKeeper = svckeeper.NewKeeper(
|
|
||||||
appCodec,
|
|
||||||
sdkruntime.NewKVStoreService(keys[svctypes.StoreKey]),
|
|
||||||
logger,
|
logger,
|
||||||
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
|
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
|
||||||
)
|
)
|
||||||
|
|
||||||
// Create the dwn Keeper
|
|
||||||
app.DwnKeeper = dwnkeeper.NewKeeper(
|
|
||||||
appCodec,
|
|
||||||
sdkruntime.NewKVStoreService(keys[dwntypes.StoreKey]),
|
|
||||||
logger,
|
|
||||||
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
|
|
||||||
)
|
|
||||||
// // Create the vault Keeper
|
|
||||||
// app.VaultKeeper = vaultkeeper.NewKeeper(
|
|
||||||
// appCodec,
|
|
||||||
// sdkruntime.NewKVStoreService(keys[vaulttypes.StoreKey]),
|
|
||||||
// logger,
|
|
||||||
// authtypes.NewModuleAddress(govtypes.ModuleName).String(),
|
|
||||||
// app.AccountKeeper,
|
|
||||||
// app.DidKeeper,
|
|
||||||
// )
|
|
||||||
//
|
|
||||||
// // Create the service Keeper
|
|
||||||
// app.ServiceKeeper = servicekeeper.NewKeeper(
|
|
||||||
// appCodec,
|
|
||||||
// sdkruntime.NewKVStoreService(keys[servicetypes.StoreKey]),
|
|
||||||
// logger,
|
|
||||||
// authtypes.NewModuleAddress(govtypes.ModuleName).String(),
|
|
||||||
// app.DidKeeper,
|
|
||||||
// app.GroupKeeper,
|
|
||||||
// app.NFTKeeper,
|
|
||||||
// app.VaultKeeper,
|
|
||||||
// )
|
|
||||||
//
|
|
||||||
// Create the globalfee keeper
|
// Create the globalfee keeper
|
||||||
app.GlobalFeeKeeper = globalfeekeeper.NewKeeper(
|
app.GlobalFeeKeeper = globalfeekeeper.NewKeeper(
|
||||||
appCodec,
|
appCodec,
|
||||||
@@ -920,8 +927,12 @@ func NewChainApp(
|
|||||||
),
|
),
|
||||||
|
|
||||||
did.NewAppModule(appCodec, app.DidKeeper, app.NFTKeeper),
|
did.NewAppModule(appCodec, app.DidKeeper, app.NFTKeeper),
|
||||||
dwn.NewAppModule(appCodec, app.DwnKeeper),
|
|
||||||
svc.NewAppModule(appCodec, app.SvcKeeper),
|
macaroon.NewAppModule(appCodec, app.MacaroonKeeper, app.DidKeeper),
|
||||||
|
vault.NewAppModule(appCodec, app.VaultKeeper, app.DidKeeper),
|
||||||
|
|
||||||
|
service.NewAppModule(appCodec, app.ServiceKeeper, app.DidKeeper, app.MacaroonKeeper),
|
||||||
|
oracle.NewAppModule(appCodec, app.OracleKeeper, app.DidKeeper, app.MacaroonKeeper),
|
||||||
)
|
)
|
||||||
|
|
||||||
// BasicModuleManager defines the module BasicManager is in charge of setting up basic,
|
// BasicModuleManager defines the module BasicManager is in charge of setting up basic,
|
||||||
@@ -970,8 +981,10 @@ func NewChainApp(
|
|||||||
tokenfactorytypes.ModuleName,
|
tokenfactorytypes.ModuleName,
|
||||||
packetforwardtypes.ModuleName,
|
packetforwardtypes.ModuleName,
|
||||||
didtypes.ModuleName,
|
didtypes.ModuleName,
|
||||||
dwntypes.ModuleName,
|
vaulttypes.ModuleName,
|
||||||
svctypes.ModuleName,
|
macaroontypes.ModuleName,
|
||||||
|
servicetypes.ModuleName,
|
||||||
|
oracletypes.ModuleName,
|
||||||
)
|
)
|
||||||
|
|
||||||
app.ModuleManager.SetOrderEndBlockers(
|
app.ModuleManager.SetOrderEndBlockers(
|
||||||
@@ -991,8 +1004,10 @@ func NewChainApp(
|
|||||||
tokenfactorytypes.ModuleName,
|
tokenfactorytypes.ModuleName,
|
||||||
packetforwardtypes.ModuleName,
|
packetforwardtypes.ModuleName,
|
||||||
didtypes.ModuleName,
|
didtypes.ModuleName,
|
||||||
dwntypes.ModuleName,
|
vaulttypes.ModuleName,
|
||||||
svctypes.ModuleName,
|
macaroontypes.ModuleName,
|
||||||
|
servicetypes.ModuleName,
|
||||||
|
oracletypes.ModuleName,
|
||||||
)
|
)
|
||||||
|
|
||||||
// NOTE: The genutils module must occur after staking so that pools are
|
// NOTE: The genutils module must occur after staking so that pools are
|
||||||
@@ -1021,8 +1036,10 @@ func NewChainApp(
|
|||||||
globalfeetypes.ModuleName,
|
globalfeetypes.ModuleName,
|
||||||
packetforwardtypes.ModuleName,
|
packetforwardtypes.ModuleName,
|
||||||
didtypes.ModuleName,
|
didtypes.ModuleName,
|
||||||
dwntypes.ModuleName,
|
vaulttypes.ModuleName,
|
||||||
svctypes.ModuleName,
|
macaroontypes.ModuleName,
|
||||||
|
servicetypes.ModuleName,
|
||||||
|
oracletypes.ModuleName,
|
||||||
}
|
}
|
||||||
app.ModuleManager.SetOrderInitGenesis(genesisModuleOrder...)
|
app.ModuleManager.SetOrderInitGenesis(genesisModuleOrder...)
|
||||||
app.ModuleManager.SetOrderExportGenesis(genesisModuleOrder...)
|
app.ModuleManager.SetOrderExportGenesis(genesisModuleOrder...)
|
||||||
@@ -1181,7 +1198,8 @@ func GetDefaultBypassFeeMessages() []string {
|
|||||||
sdk.MsgTypeURL(&ibcchanneltypes.MsgChannelOpenTry{}),
|
sdk.MsgTypeURL(&ibcchanneltypes.MsgChannelOpenTry{}),
|
||||||
sdk.MsgTypeURL(&ibcchanneltypes.MsgChannelOpenConfirm{}),
|
sdk.MsgTypeURL(&ibcchanneltypes.MsgChannelOpenConfirm{}),
|
||||||
sdk.MsgTypeURL(&ibcchanneltypes.MsgChannelOpenAck{}),
|
sdk.MsgTypeURL(&ibcchanneltypes.MsgChannelOpenAck{}),
|
||||||
sdk.MsgTypeURL(&didtypes.MsgLinkAuthentication{}),
|
sdk.MsgTypeURL(&vaulttypes.MsgAllocateVault{}),
|
||||||
|
sdk.MsgTypeURL(&didtypes.MsgRegisterController{}),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1481,8 +1499,10 @@ func initParamsKeeper(
|
|||||||
paramsKeeper.Subspace(packetforwardtypes.ModuleName).
|
paramsKeeper.Subspace(packetforwardtypes.ModuleName).
|
||||||
WithKeyTable(packetforwardtypes.ParamKeyTable())
|
WithKeyTable(packetforwardtypes.ParamKeyTable())
|
||||||
paramsKeeper.Subspace(didtypes.ModuleName)
|
paramsKeeper.Subspace(didtypes.ModuleName)
|
||||||
paramsKeeper.Subspace(dwntypes.ModuleName)
|
paramsKeeper.Subspace(vaulttypes.ModuleName)
|
||||||
paramsKeeper.Subspace(svctypes.ModuleName)
|
paramsKeeper.Subspace(macaroontypes.ModuleName)
|
||||||
|
paramsKeeper.Subspace(servicetypes.ModuleName)
|
||||||
|
paramsKeeper.Subspace(oracletypes.ModuleName)
|
||||||
|
|
||||||
return paramsKeeper
|
return paramsKeeper
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,165 @@
|
|||||||
|
package dexmodel
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/charmbracelet/bubbles/table"
|
||||||
|
tea "github.com/charmbracelet/bubbletea"
|
||||||
|
"github.com/charmbracelet/lipgloss"
|
||||||
|
"github.com/spf13/cobra"
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
subtle = lipgloss.AdaptiveColor{Light: "#D9DCCF", Dark: "#383838"}
|
||||||
|
highlight = lipgloss.AdaptiveColor{Light: "#874BFD", Dark: "#7D56F4"}
|
||||||
|
special = lipgloss.AdaptiveColor{Light: "#43BF6D", Dark: "#73F59F"}
|
||||||
|
|
||||||
|
titleStyle = lipgloss.NewStyle().
|
||||||
|
MarginLeft(1).
|
||||||
|
MarginRight(5).
|
||||||
|
Padding(0, 1).
|
||||||
|
Italic(true).
|
||||||
|
Foreground(lipgloss.Color("#FFF7DB")).
|
||||||
|
SetString("Cosmos Block Explorer")
|
||||||
|
|
||||||
|
infoStyle = lipgloss.NewStyle().
|
||||||
|
BorderStyle(lipgloss.NormalBorder()).
|
||||||
|
BorderTop(true).
|
||||||
|
BorderForeground(subtle)
|
||||||
|
)
|
||||||
|
|
||||||
|
type model struct {
|
||||||
|
blocks []string
|
||||||
|
transactionTable table.Model
|
||||||
|
stats map[string]string
|
||||||
|
width int
|
||||||
|
height int
|
||||||
|
}
|
||||||
|
|
||||||
|
func initialModel() model {
|
||||||
|
columns := []table.Column{
|
||||||
|
{Title: "Hash", Width: 10},
|
||||||
|
{Title: "Type", Width: 15},
|
||||||
|
{Title: "Height", Width: 10},
|
||||||
|
{Title: "Time", Width: 20},
|
||||||
|
}
|
||||||
|
|
||||||
|
rows := []table.Row{
|
||||||
|
{"abc123", "Transfer", "1000", time.Now().Format(time.RFC3339)},
|
||||||
|
{"def456", "Delegate", "999", time.Now().Add(-1 * time.Minute).Format(time.RFC3339)},
|
||||||
|
{"ghi789", "Vote", "998", time.Now().Add(-2 * time.Minute).Format(time.RFC3339)},
|
||||||
|
}
|
||||||
|
|
||||||
|
t := table.New(
|
||||||
|
table.WithColumns(columns),
|
||||||
|
table.WithRows(rows),
|
||||||
|
table.WithFocused(true),
|
||||||
|
table.WithHeight(7),
|
||||||
|
)
|
||||||
|
|
||||||
|
s := table.DefaultStyles()
|
||||||
|
s.Header = s.Header.
|
||||||
|
BorderStyle(lipgloss.NormalBorder()).
|
||||||
|
BorderForeground(lipgloss.Color("240")).
|
||||||
|
BorderBottom(true).
|
||||||
|
Bold(false)
|
||||||
|
s.Selected = s.Selected.
|
||||||
|
Foreground(lipgloss.Color("229")).
|
||||||
|
Background(lipgloss.Color("57")).
|
||||||
|
Bold(false)
|
||||||
|
t.SetStyles(s)
|
||||||
|
|
||||||
|
return model{
|
||||||
|
blocks: []string{"Block 1", "Block 2", "Block 3"},
|
||||||
|
transactionTable: t,
|
||||||
|
stats: map[string]string{
|
||||||
|
"Latest Block": "1000",
|
||||||
|
"Validators": "100",
|
||||||
|
"Bonded Tokens": "1,000,000",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m model) Init() tea.Cmd {
|
||||||
|
return tick
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||||
|
var cmd tea.Cmd
|
||||||
|
switch msg := msg.(type) {
|
||||||
|
case tea.KeyMsg:
|
||||||
|
switch msg.String() {
|
||||||
|
case "q", "ctrl+c":
|
||||||
|
return m, tea.Quit
|
||||||
|
case "enter":
|
||||||
|
return m, tea.Batch(
|
||||||
|
tea.Printf("Selected transaction: %s", m.transactionTable.SelectedRow()[0]),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
case tea.WindowSizeMsg:
|
||||||
|
m.height = msg.Height
|
||||||
|
m.width = msg.Width
|
||||||
|
case tickMsg:
|
||||||
|
// Update data here
|
||||||
|
m.blocks = append([]string{"New Block"}, m.blocks...)
|
||||||
|
if len(m.blocks) > 5 {
|
||||||
|
m.blocks = m.blocks[:5]
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add a new transaction to the table
|
||||||
|
newRow := table.Row{
|
||||||
|
fmt.Sprintf("tx%d", time.Now().Unix()),
|
||||||
|
"NewTxType",
|
||||||
|
fmt.Sprintf("%d", 1000+len(m.transactionTable.Rows())),
|
||||||
|
time.Now().Format(time.RFC3339),
|
||||||
|
}
|
||||||
|
m.transactionTable.SetRows(append([]table.Row{newRow}, m.transactionTable.Rows()...))
|
||||||
|
if len(m.transactionTable.Rows()) > 10 {
|
||||||
|
m.transactionTable.SetRows(m.transactionTable.Rows()[:10])
|
||||||
|
}
|
||||||
|
|
||||||
|
return m, tick
|
||||||
|
}
|
||||||
|
m.transactionTable, cmd = m.transactionTable.Update(msg)
|
||||||
|
return m, cmd
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m model) View() string {
|
||||||
|
s := titleStyle.Render("Cosmos Block Explorer")
|
||||||
|
s += "\n\n"
|
||||||
|
|
||||||
|
// Blocks
|
||||||
|
s += lipgloss.NewStyle().Bold(true).Render("Recent Blocks") + "\n"
|
||||||
|
for _, block := range m.blocks {
|
||||||
|
s += "• " + block + "\n"
|
||||||
|
}
|
||||||
|
s += "\n"
|
||||||
|
|
||||||
|
// Transactions
|
||||||
|
s += lipgloss.NewStyle().Bold(true).Render("Recent Transactions") + "\n"
|
||||||
|
s += m.transactionTable.View() + "\n\n"
|
||||||
|
|
||||||
|
// Stats
|
||||||
|
s += lipgloss.NewStyle().Bold(true).Render("Network Statistics") + "\n"
|
||||||
|
for key, value := range m.stats {
|
||||||
|
s += fmt.Sprintf("%s: %s\n", key, value)
|
||||||
|
}
|
||||||
|
|
||||||
|
return s
|
||||||
|
}
|
||||||
|
|
||||||
|
type tickMsg time.Time
|
||||||
|
|
||||||
|
func tick() tea.Msg {
|
||||||
|
time.Sleep(time.Second)
|
||||||
|
return tickMsg{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func RunExplorerTUI(cmd *cobra.Command, args []string) error {
|
||||||
|
p := tea.NewProgram(initialModel(), tea.WithAltScreen())
|
||||||
|
if _, err := p.Run(); err != nil {
|
||||||
|
return fmt.Errorf("error running explorer: %v", err)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
package cli
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
|
||||||
|
"github.com/cosmos/cosmos-sdk/codec"
|
||||||
|
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
|
||||||
|
"github.com/onsonr/sonr/app/cli/dexmodel"
|
||||||
|
"github.com/onsonr/sonr/app/cli/txmodel"
|
||||||
|
"github.com/spf13/cobra"
|
||||||
|
)
|
||||||
|
|
||||||
|
func NewBuildTxnTUICmd() *cobra.Command {
|
||||||
|
return &cobra.Command{
|
||||||
|
Use: "dash",
|
||||||
|
Short: "TUI for managing the local Sonr validator node",
|
||||||
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
|
txBody, err := txmodel.RunBuildTxnTUI()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
interfaceRegistry := codectypes.NewInterfaceRegistry()
|
||||||
|
marshaler := codec.NewProtoCodec(interfaceRegistry)
|
||||||
|
jsonBytes, err := marshaler.MarshalJSON(txBody)
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("failed to marshal tx body: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
fmt.Println("Generated Protobuf Message (JSON format):")
|
||||||
|
fmt.Println(string(jsonBytes))
|
||||||
|
|
||||||
|
return nil
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewExplorerTUICmd() *cobra.Command {
|
||||||
|
return &cobra.Command{
|
||||||
|
Use: "cosmos-explorer",
|
||||||
|
Short: "A terminal-based Cosmos blockchain explorer",
|
||||||
|
RunE: dexmodel.RunExplorerTUI,
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,322 @@
|
|||||||
|
package txmodel
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"strings"
|
||||||
|
|
||||||
|
tea "github.com/charmbracelet/bubbletea"
|
||||||
|
"github.com/charmbracelet/huh"
|
||||||
|
"github.com/charmbracelet/lipgloss"
|
||||||
|
"github.com/cosmos/cosmos-sdk/codec"
|
||||||
|
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
|
||||||
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
|
"github.com/cosmos/cosmos-sdk/types/tx"
|
||||||
|
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
|
||||||
|
)
|
||||||
|
|
||||||
|
const maxWidth = 100
|
||||||
|
|
||||||
|
var (
|
||||||
|
red = lipgloss.AdaptiveColor{Light: "#FE5F86", Dark: "#FE5F86"}
|
||||||
|
indigo = lipgloss.AdaptiveColor{Light: "#5A56E0", Dark: "#7571F9"}
|
||||||
|
green = lipgloss.AdaptiveColor{Light: "#02BA84", Dark: "#02BF87"}
|
||||||
|
)
|
||||||
|
|
||||||
|
type Styles struct {
|
||||||
|
Base,
|
||||||
|
HeaderText,
|
||||||
|
Status,
|
||||||
|
StatusHeader,
|
||||||
|
Highlight,
|
||||||
|
ErrorHeaderText,
|
||||||
|
Help lipgloss.Style
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewStyles(lg *lipgloss.Renderer) *Styles {
|
||||||
|
s := Styles{}
|
||||||
|
s.Base = lg.NewStyle().
|
||||||
|
Padding(1, 2, 0, 1)
|
||||||
|
s.HeaderText = lg.NewStyle().
|
||||||
|
Foreground(indigo).
|
||||||
|
Bold(true).
|
||||||
|
Padding(0, 1, 0, 1)
|
||||||
|
s.Status = lg.NewStyle().
|
||||||
|
Border(lipgloss.RoundedBorder()).
|
||||||
|
BorderForeground(indigo).
|
||||||
|
PaddingLeft(1).
|
||||||
|
MarginTop(1)
|
||||||
|
s.StatusHeader = lg.NewStyle().
|
||||||
|
Foreground(green).
|
||||||
|
Bold(true)
|
||||||
|
s.Highlight = lg.NewStyle().
|
||||||
|
Foreground(lipgloss.Color("212"))
|
||||||
|
s.ErrorHeaderText = s.HeaderText.
|
||||||
|
Foreground(red)
|
||||||
|
s.Help = lg.NewStyle().
|
||||||
|
Foreground(lipgloss.Color("240"))
|
||||||
|
return &s
|
||||||
|
}
|
||||||
|
|
||||||
|
type state int
|
||||||
|
|
||||||
|
const (
|
||||||
|
statusNormal state = iota
|
||||||
|
stateDone
|
||||||
|
)
|
||||||
|
|
||||||
|
type Model struct {
|
||||||
|
state state
|
||||||
|
lg *lipgloss.Renderer
|
||||||
|
styles *Styles
|
||||||
|
form *huh.Form
|
||||||
|
width int
|
||||||
|
message *tx.TxBody
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewModel() Model {
|
||||||
|
m := Model{width: maxWidth}
|
||||||
|
m.lg = lipgloss.DefaultRenderer()
|
||||||
|
m.styles = NewStyles(m.lg)
|
||||||
|
|
||||||
|
m.form = huh.NewForm(
|
||||||
|
huh.NewGroup(
|
||||||
|
huh.NewInput().
|
||||||
|
Key("from").
|
||||||
|
Title("From Address").
|
||||||
|
Placeholder("cosmos1...").
|
||||||
|
Validate(func(s string) error {
|
||||||
|
if !strings.HasPrefix(s, "cosmos1") {
|
||||||
|
return fmt.Errorf("invalid address format")
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}),
|
||||||
|
|
||||||
|
huh.NewInput().
|
||||||
|
Key("to").
|
||||||
|
Title("To Address").
|
||||||
|
Placeholder("cosmos1...").
|
||||||
|
Validate(func(s string) error {
|
||||||
|
if !strings.HasPrefix(s, "cosmos1") {
|
||||||
|
return fmt.Errorf("invalid address format")
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}),
|
||||||
|
|
||||||
|
huh.NewInput().
|
||||||
|
Key("amount").
|
||||||
|
Title("Amount").
|
||||||
|
Placeholder("100").
|
||||||
|
Validate(func(s string) error {
|
||||||
|
if _, err := sdk.ParseCoinNormalized(s + "atom"); err != nil {
|
||||||
|
return fmt.Errorf("invalid coin amount")
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}),
|
||||||
|
|
||||||
|
huh.NewSelect[string]().
|
||||||
|
Key("denom").
|
||||||
|
Title("Denom").
|
||||||
|
Options(huh.NewOptions("atom", "osmo", "usnr", "snr")...),
|
||||||
|
|
||||||
|
huh.NewInput().
|
||||||
|
Key("memo").
|
||||||
|
Title("Memo").
|
||||||
|
Placeholder("Optional"),
|
||||||
|
|
||||||
|
huh.NewConfirm().
|
||||||
|
Key("done").
|
||||||
|
Title("Ready to convert?").
|
||||||
|
Validate(func(v bool) error {
|
||||||
|
if !v {
|
||||||
|
return fmt.Errorf("Please confirm when you're ready to convert")
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}).
|
||||||
|
Affirmative("Yes, convert!").
|
||||||
|
Negative("Not yet"),
|
||||||
|
),
|
||||||
|
).
|
||||||
|
WithWidth(60).
|
||||||
|
WithShowHelp(false).
|
||||||
|
WithShowErrors(false)
|
||||||
|
|
||||||
|
return m
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m Model) Init() tea.Cmd {
|
||||||
|
return m.form.Init()
|
||||||
|
}
|
||||||
|
|
||||||
|
func min(x, y int) int {
|
||||||
|
if x > y {
|
||||||
|
return y
|
||||||
|
}
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||||
|
switch msg := msg.(type) {
|
||||||
|
case tea.WindowSizeMsg:
|
||||||
|
m.width = min(msg.Width, maxWidth) - m.styles.Base.GetHorizontalFrameSize()
|
||||||
|
case tea.KeyMsg:
|
||||||
|
switch msg.String() {
|
||||||
|
case "esc", "ctrl+c", "q":
|
||||||
|
return m, tea.Quit
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var cmds []tea.Cmd
|
||||||
|
|
||||||
|
form, cmd := m.form.Update(msg)
|
||||||
|
if f, ok := form.(*huh.Form); ok {
|
||||||
|
m.form = f
|
||||||
|
cmds = append(cmds, cmd)
|
||||||
|
}
|
||||||
|
|
||||||
|
if m.form.State == huh.StateCompleted {
|
||||||
|
m.buildMessage()
|
||||||
|
cmds = append(cmds, tea.Quit)
|
||||||
|
}
|
||||||
|
|
||||||
|
return m, tea.Batch(cmds...)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m Model) View() string {
|
||||||
|
s := m.styles
|
||||||
|
|
||||||
|
switch m.form.State {
|
||||||
|
case huh.StateCompleted:
|
||||||
|
pklCode := m.generatePkl()
|
||||||
|
messageView := m.getMessageView()
|
||||||
|
var b strings.Builder
|
||||||
|
fmt.Fprintf(&b, "Final Tx:\n\n%s\n\n%s", pklCode, messageView)
|
||||||
|
return s.Status.Margin(0, 1).Padding(1, 2).Width(80).Render(b.String()) + "\n\n"
|
||||||
|
default:
|
||||||
|
var schemaType string
|
||||||
|
if m.form.GetString("schemaType") != "" {
|
||||||
|
schemaType = "Schema Type: " + m.form.GetString("schemaType")
|
||||||
|
}
|
||||||
|
|
||||||
|
v := strings.TrimSuffix(m.form.View(), "\n\n")
|
||||||
|
form := m.lg.NewStyle().Margin(1, 0).Render(v)
|
||||||
|
|
||||||
|
var status string
|
||||||
|
{
|
||||||
|
preview := "(Preview will appear here)"
|
||||||
|
if m.form.GetString("schema") != "" {
|
||||||
|
preview = m.generatePkl()
|
||||||
|
}
|
||||||
|
|
||||||
|
const statusWidth = 40
|
||||||
|
statusMarginLeft := m.width - statusWidth - lipgloss.Width(form) - s.Status.GetMarginRight()
|
||||||
|
status = s.Status.
|
||||||
|
Height(lipgloss.Height(form)).
|
||||||
|
Width(statusWidth).
|
||||||
|
MarginLeft(statusMarginLeft).
|
||||||
|
Render(s.StatusHeader.Render("Pkl Preview") + "\n" +
|
||||||
|
schemaType + "\n\n" +
|
||||||
|
preview)
|
||||||
|
}
|
||||||
|
|
||||||
|
errors := m.form.Errors()
|
||||||
|
header := m.appBoundaryView("Sonr TX Builder")
|
||||||
|
if len(errors) > 0 {
|
||||||
|
header = m.appErrorBoundaryView(m.errorView())
|
||||||
|
}
|
||||||
|
body := lipgloss.JoinHorizontal(lipgloss.Top, form, status)
|
||||||
|
|
||||||
|
footer := m.appBoundaryView(m.form.Help().ShortHelpView(m.form.KeyBinds()))
|
||||||
|
if len(errors) > 0 {
|
||||||
|
footer = m.appErrorBoundaryView("")
|
||||||
|
}
|
||||||
|
|
||||||
|
return s.Base.Render(header + "\n" + body + "\n\n" + footer)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m Model) errorView() string {
|
||||||
|
var s string
|
||||||
|
for _, err := range m.form.Errors() {
|
||||||
|
s += err.Error()
|
||||||
|
}
|
||||||
|
return s
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m Model) appBoundaryView(text string) string {
|
||||||
|
return lipgloss.PlaceHorizontal(
|
||||||
|
m.width,
|
||||||
|
lipgloss.Left,
|
||||||
|
m.styles.HeaderText.Render(text),
|
||||||
|
lipgloss.WithWhitespaceChars("="),
|
||||||
|
lipgloss.WithWhitespaceForeground(indigo),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m Model) appErrorBoundaryView(text string) string {
|
||||||
|
return lipgloss.PlaceHorizontal(
|
||||||
|
m.width,
|
||||||
|
lipgloss.Left,
|
||||||
|
m.styles.ErrorHeaderText.Render(text),
|
||||||
|
lipgloss.WithWhitespaceChars("="),
|
||||||
|
lipgloss.WithWhitespaceForeground(red),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m Model) generatePkl() string {
|
||||||
|
schemaType := m.form.GetString("schemaType")
|
||||||
|
schema := m.form.GetString("schema")
|
||||||
|
|
||||||
|
// This is a placeholder for the actual conversion logic
|
||||||
|
// In a real implementation, you would parse the schema and generate Pkl code
|
||||||
|
return fmt.Sprintf("// Converted from %s\n\nclass ConvertedSchema {\n // TODO: Implement conversion from %s\n // Original schema:\n /*\n%s\n */\n}", schemaType, schemaType, schema)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *Model) buildMessage() {
|
||||||
|
from := m.form.GetString("from")
|
||||||
|
to := m.form.GetString("to")
|
||||||
|
amount := m.form.GetString("amount")
|
||||||
|
denom := m.form.GetString("denom")
|
||||||
|
memo := m.form.GetString("memo")
|
||||||
|
|
||||||
|
coin, _ := sdk.ParseCoinNormalized(fmt.Sprintf("%s%s", amount, denom))
|
||||||
|
sendMsg := &banktypes.MsgSend{
|
||||||
|
FromAddress: from,
|
||||||
|
ToAddress: to,
|
||||||
|
Amount: sdk.NewCoins(coin),
|
||||||
|
}
|
||||||
|
|
||||||
|
anyMsg, _ := codectypes.NewAnyWithValue(sendMsg)
|
||||||
|
m.message = &tx.TxBody{
|
||||||
|
Messages: []*codectypes.Any{anyMsg},
|
||||||
|
Memo: memo,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m Model) getMessageView() string {
|
||||||
|
if m.message == nil {
|
||||||
|
return "Current Message: None"
|
||||||
|
}
|
||||||
|
|
||||||
|
interfaceRegistry := codectypes.NewInterfaceRegistry()
|
||||||
|
marshaler := codec.NewProtoCodec(interfaceRegistry)
|
||||||
|
jsonBytes, _ := marshaler.MarshalJSON(m.message)
|
||||||
|
|
||||||
|
return fmt.Sprintf("Current Message:\n%s", string(jsonBytes))
|
||||||
|
}
|
||||||
|
|
||||||
|
func RunBuildTxnTUI() (*tx.TxBody, error) {
|
||||||
|
m := NewModel()
|
||||||
|
p := tea.NewProgram(m)
|
||||||
|
|
||||||
|
finalModel, err := p.Run()
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("failed to run program: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
finalM, ok := finalModel.(Model)
|
||||||
|
if !ok || finalM.message == nil {
|
||||||
|
return nil, fmt.Errorf("form not completed")
|
||||||
|
}
|
||||||
|
|
||||||
|
return finalM.message, nil
|
||||||
|
}
|
||||||
+9
-3
@@ -5,8 +5,10 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
|
|
||||||
storetypes "cosmossdk.io/store/types"
|
|
||||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||||
|
|
||||||
|
storetypes "cosmossdk.io/store/types"
|
||||||
|
|
||||||
servertypes "github.com/cosmos/cosmos-sdk/server/types"
|
servertypes "github.com/cosmos/cosmos-sdk/server/types"
|
||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types"
|
slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types"
|
||||||
@@ -43,7 +45,7 @@ func (app *SonrApp) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedA
|
|||||||
AppState: appState,
|
AppState: appState,
|
||||||
Validators: validators,
|
Validators: validators,
|
||||||
Height: height,
|
Height: height,
|
||||||
ConsensusParams: app.GetConsensusParams(ctx),
|
ConsensusParams: app.BaseApp.GetConsensusParams(ctx),
|
||||||
}, err
|
}, err
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -52,9 +54,13 @@ func (app *SonrApp) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedA
|
|||||||
//
|
//
|
||||||
// in favor of export at a block height
|
// in favor of export at a block height
|
||||||
func (app *SonrApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs []string) {
|
func (app *SonrApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs []string) {
|
||||||
applyAllowedAddrs := len(jailAllowedAddrs) > 0
|
applyAllowedAddrs := false
|
||||||
|
|
||||||
// check if there is a allowed address list
|
// check if there is a allowed address list
|
||||||
|
if len(jailAllowedAddrs) > 0 {
|
||||||
|
applyAllowedAddrs = true
|
||||||
|
}
|
||||||
|
|
||||||
allowedAddrsMap := make(map[string]bool)
|
allowedAddrsMap := make(map[string]bool)
|
||||||
|
|
||||||
for _, addr := range jailAllowedAddrs {
|
for _, addr := range jailAllowedAddrs {
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
package context
|
|
||||||
|
|
||||||
import (
|
|
||||||
"github.com/go-webauthn/webauthn/protocol"
|
|
||||||
)
|
|
||||||
|
|
||||||
func (c *GatewayContext) NewChallenge() string {
|
|
||||||
chal, _ := protocol.CreateChallenge()
|
|
||||||
chalStr := chal.String()
|
|
||||||
return chalStr
|
|
||||||
}
|
|
||||||
|
|
||||||
func (cc *GatewayContext) ListCredentials(handle string) ([]*CredentialDescriptor, error) {
|
|
||||||
creds, err := cc.GetCredentialsByHandle(bgCtx(), handle)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return CredentialArrayToDescriptors(creds), nil
|
|
||||||
}
|
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
package context
|
|
||||||
|
|
||||||
import (
|
|
||||||
gocontext "context"
|
|
||||||
"net/http"
|
|
||||||
|
|
||||||
"github.com/labstack/echo/v4"
|
|
||||||
"github.com/medama-io/go-useragent"
|
|
||||||
"github.com/onsonr/sonr/crypto/mpc"
|
|
||||||
"github.com/onsonr/sonr/internal/config/hway"
|
|
||||||
hwayorm "github.com/onsonr/sonr/internal/database/hwayorm"
|
|
||||||
"github.com/onsonr/sonr/pkg/common"
|
|
||||||
)
|
|
||||||
|
|
||||||
type GatewayContext struct {
|
|
||||||
echo.Context
|
|
||||||
*hwayorm.Queries
|
|
||||||
agent useragent.UserAgent
|
|
||||||
id string
|
|
||||||
ipfsClient common.IPFS
|
|
||||||
tokenStore common.IPFSTokenStore
|
|
||||||
stagedEnclaves map[string]mpc.Enclave
|
|
||||||
grpcAddr string
|
|
||||||
turnstileSiteKey string
|
|
||||||
}
|
|
||||||
|
|
||||||
func GetGateway(c echo.Context) (*GatewayContext, error) {
|
|
||||||
cc, ok := c.(*GatewayContext)
|
|
||||||
if !ok {
|
|
||||||
return nil, echo.NewHTTPError(http.StatusInternalServerError, "Gateway Context not found")
|
|
||||||
}
|
|
||||||
return cc, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func UseGateway(env hway.Hway, ipc common.IPFS, db *hwayorm.Queries) echo.MiddlewareFunc {
|
|
||||||
return func(next echo.HandlerFunc) echo.HandlerFunc {
|
|
||||||
return func(c echo.Context) error {
|
|
||||||
ua := useragent.NewParser()
|
|
||||||
ctx := &GatewayContext{
|
|
||||||
Context: c,
|
|
||||||
turnstileSiteKey: env.GetTurnstileSiteKey(),
|
|
||||||
agent: ua.Parse(c.Request().UserAgent()),
|
|
||||||
Queries: db,
|
|
||||||
ipfsClient: ipc,
|
|
||||||
grpcAddr: env.GetSonrGrpcUrl(),
|
|
||||||
tokenStore: common.NewUCANStore(ipc),
|
|
||||||
}
|
|
||||||
return next(ctx)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func BG() gocontext.Context {
|
|
||||||
ctx := gocontext.Background()
|
|
||||||
return ctx
|
|
||||||
}
|
|
||||||
|
|
||||||
func (cc *GatewayContext) ReadCookie(k common.CookieKey) string {
|
|
||||||
return common.ReadCookieUnsafe(cc.Context, k)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (cc *GatewayContext) WriteCookie(k common.CookieKey, v string) {
|
|
||||||
common.WriteCookie(cc.Context, k, v)
|
|
||||||
}
|
|
||||||
@@ -1,53 +0,0 @@
|
|||||||
package context
|
|
||||||
|
|
||||||
import (
|
|
||||||
"net/http"
|
|
||||||
|
|
||||||
"github.com/labstack/echo/v4"
|
|
||||||
hwayorm "github.com/onsonr/sonr/internal/database/hwayorm"
|
|
||||||
)
|
|
||||||
|
|
||||||
func UpdateProfile(c echo.Context) (*hwayorm.Profile, error) {
|
|
||||||
ctx, ok := c.(*GatewayContext)
|
|
||||||
if !ok {
|
|
||||||
return nil, echo.NewHTTPError(http.StatusInternalServerError, "Profile Context not found")
|
|
||||||
}
|
|
||||||
address := c.FormValue("address")
|
|
||||||
handle := c.FormValue("handle")
|
|
||||||
name := c.FormValue("name")
|
|
||||||
profile, err := ctx.UpdateProfile(bgCtx(), hwayorm.UpdateProfileParams{
|
|
||||||
Address: address,
|
|
||||||
Handle: handle,
|
|
||||||
Name: name,
|
|
||||||
})
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return &profile, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func ReadProfile(c echo.Context) (*hwayorm.Profile, error) {
|
|
||||||
ctx, ok := c.(*GatewayContext)
|
|
||||||
if !ok {
|
|
||||||
return nil, echo.NewHTTPError(http.StatusInternalServerError, "Profile Context not found")
|
|
||||||
}
|
|
||||||
handle := c.Param("handle")
|
|
||||||
profile, err := ctx.GetProfileByHandle(bgCtx(), handle)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return &profile, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func DeleteProfile(c echo.Context) error {
|
|
||||||
ctx, ok := c.(*GatewayContext)
|
|
||||||
if !ok {
|
|
||||||
return echo.NewHTTPError(http.StatusInternalServerError, "Profile Context not found")
|
|
||||||
}
|
|
||||||
address := c.Param("address")
|
|
||||||
err := ctx.SoftDeleteProfile(bgCtx(), address)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
package context
|
|
||||||
|
|
||||||
import (
|
|
||||||
"bytes"
|
|
||||||
|
|
||||||
"github.com/a-h/templ"
|
|
||||||
"github.com/labstack/echo/v4"
|
|
||||||
"github.com/onsonr/sonr/app/gateway/views"
|
|
||||||
)
|
|
||||||
|
|
||||||
func Render(c echo.Context, cmp templ.Component) error {
|
|
||||||
// Create a buffer to store the rendered HTML
|
|
||||||
buf := &bytes.Buffer{}
|
|
||||||
// Render the component to the buffer
|
|
||||||
err := cmp.Render(c.Request().Context(), buf)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set the content type
|
|
||||||
c.Response().Header().Set(echo.HeaderContentType, echo.MIMETextHTML)
|
|
||||||
|
|
||||||
// Write the buffered content to the response
|
|
||||||
_, err = c.Response().Write(buf.Bytes())
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
c.Response().WriteHeader(200)
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func RenderError(c echo.Context, err error) error {
|
|
||||||
return Render(c, views.ErrorView(err.Error()))
|
|
||||||
}
|
|
||||||
|
|
||||||
func RenderInitial(c echo.Context) error {
|
|
||||||
return Render(c, views.InitialView())
|
|
||||||
}
|
|
||||||
|
|
||||||
func RenderLoading(c echo.Context) error {
|
|
||||||
return Render(c, views.LoadingView())
|
|
||||||
}
|
|
||||||
@@ -1,105 +0,0 @@
|
|||||||
package context
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
|
|
||||||
"github.com/onsonr/sonr/pkg/common"
|
|
||||||
)
|
|
||||||
|
|
||||||
// ParamsBank returns the bank params
|
|
||||||
func (cc *GatewayContext) ParamsBank() (*common.BankParamsResponse, error) {
|
|
||||||
cl, err := common.NewBankClient(cc.grpcAddr)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
resp, err := cl.Params(bgCtx(), &common.BankParamsRequest{})
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return resp, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ParamsDID returns the DID params
|
|
||||||
func (cc *GatewayContext) ParamsDID() (*common.DIDParamsResponse, error) {
|
|
||||||
cl, err := common.NewDIDClient(cc.grpcAddr)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
resp, err := cl.Params(bgCtx(), &common.DIDParamsRequest{})
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return resp, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ParamsDWN returns the DWN params
|
|
||||||
func (cc *GatewayContext) ParamsDWN() (*common.DWNParamsResponse, error) {
|
|
||||||
cl, err := common.NewDWNClient(cc.grpcAddr)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
resp, err := cl.Params(bgCtx(), &common.DWNParamsRequest{})
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return resp, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ParamsSVC returns the SVC params
|
|
||||||
func (cc *GatewayContext) ParamsSVC() (*common.SVCParamsResponse, error) {
|
|
||||||
cl, err := common.NewSVCClient(cc.grpcAddr)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
resp, err := cl.Params(bgCtx(), &common.SVCParamsRequest{})
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return resp, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// StatusBlock returns the current block
|
|
||||||
func (cc *GatewayContext) StatusBlock() string {
|
|
||||||
qc, err := common.NewNodeClient(cc.grpcAddr)
|
|
||||||
if err != nil {
|
|
||||||
return "-1"
|
|
||||||
}
|
|
||||||
resp, err := qc.Status(bgCtx(), &common.StatusRequest{})
|
|
||||||
if err != nil {
|
|
||||||
return "-1"
|
|
||||||
}
|
|
||||||
return fmt.Sprintf("%d", resp.GetHeight())
|
|
||||||
}
|
|
||||||
|
|
||||||
// StatusNode returns the node status
|
|
||||||
func (cc *GatewayContext) StatusNode() (*common.StatusResponse, error) {
|
|
||||||
cl, err := common.NewNodeClient(cc.grpcAddr)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
resp, err := cl.Status(bgCtx(), &common.StatusRequest{})
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return resp, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// TxBroadcast broadcasts a transaction to the network
|
|
||||||
func (cc *GatewayContext) TxBroadcast() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// TxEncode encodes a transaction
|
|
||||||
func (cc *GatewayContext) TxEncode() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// TxDecode decodes a transaction
|
|
||||||
func (cc *GatewayContext) TxDecode() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// TxSimulate simulates a transaction on the network
|
|
||||||
func (cc *GatewayContext) TxSimulate() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
@@ -1,148 +0,0 @@
|
|||||||
package context
|
|
||||||
|
|
||||||
import (
|
|
||||||
gocontext "context"
|
|
||||||
|
|
||||||
"github.com/labstack/echo/v4"
|
|
||||||
"github.com/onsonr/sonr/pkg/common"
|
|
||||||
"github.com/segmentio/ksuid"
|
|
||||||
"lukechampine.com/blake3"
|
|
||||||
)
|
|
||||||
|
|
||||||
func NewSession(c echo.Context) error {
|
|
||||||
cc, ok := c.(*GatewayContext)
|
|
||||||
if !ok {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
baseSessionCreateParams := BaseSessionCreateParams(cc)
|
|
||||||
cc.id = baseSessionCreateParams.ID
|
|
||||||
if _, err := cc.CreateSession(bgCtx(), baseSessionCreateParams); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
// Set Cookie
|
|
||||||
if err := common.WriteCookie(c, common.SessionID, cc.id); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// Uses blake3 to hash the sessionID to generate a nonce of length 12 bytes
|
|
||||||
func GetNonce(sessionID string) ([]byte, error) {
|
|
||||||
hash := blake3.New(32, nil)
|
|
||||||
_, err := hash.Write([]byte(sessionID))
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
// Read the hash into a byte slice
|
|
||||||
nonce := make([]byte, 12)
|
|
||||||
_, err = hash.Write(nonce)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nonce, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ForbiddenDevice returns true if the device is unavailable
|
|
||||||
func ForbiddenDevice(c echo.Context) bool {
|
|
||||||
cc, ok := c.(*GatewayContext)
|
|
||||||
if !ok {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
return cc.agent.IsBot() || cc.agent.IsTV()
|
|
||||||
}
|
|
||||||
|
|
||||||
func GetOrigin(c echo.Context) string {
|
|
||||||
return c.Request().Host
|
|
||||||
}
|
|
||||||
|
|
||||||
func GetSessionID(c echo.Context) string {
|
|
||||||
// Check from context
|
|
||||||
cc, ok := c.(*GatewayContext)
|
|
||||||
if !ok {
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
// check from cookie
|
|
||||||
if cc.id == "" {
|
|
||||||
if ok := common.CookieExists(c, common.SessionID); !ok {
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
cc.id = common.ReadCookieUnsafe(c, common.SessionID)
|
|
||||||
}
|
|
||||||
return cc.id
|
|
||||||
}
|
|
||||||
|
|
||||||
func GetAuthChallenge(c echo.Context) string {
|
|
||||||
cc, ok := c.(*GatewayContext)
|
|
||||||
if !ok {
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
s, err := cc.GetChallengeBySessionID(bgCtx(), cc.id)
|
|
||||||
if err != nil {
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
|
|
||||||
func GetProfileHandle(c echo.Context) string {
|
|
||||||
// First check for the cookie
|
|
||||||
handle := common.ReadCookieUnsafe(c, common.UserHandle)
|
|
||||||
if handle != "" {
|
|
||||||
return handle
|
|
||||||
}
|
|
||||||
|
|
||||||
// Then check the session
|
|
||||||
cc, ok := c.(*GatewayContext)
|
|
||||||
if !ok {
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
s, err := cc.GetSessionByID(bgCtx(), cc.id)
|
|
||||||
if err != nil {
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
profile, err := cc.GetProfileByID(bgCtx(), s.ProfileID)
|
|
||||||
if err != nil {
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
return profile.Handle
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// func GetHumanVerificationNumbers(c echo.Context) (int64, int64) {
|
|
||||||
// cc, ok := c.(*GatewayContext)
|
|
||||||
// if !ok {
|
|
||||||
// return 0, 0
|
|
||||||
// }
|
|
||||||
// s, err := cc.dbq.GetHumanVerificationNumbers(bgCtx(), cc.id)
|
|
||||||
// if err != nil {
|
|
||||||
// return 0, 0
|
|
||||||
// }
|
|
||||||
// return s.IsHumanFirst, s.IsHumanLast
|
|
||||||
// }
|
|
||||||
|
|
||||||
// utility function to get a context
|
|
||||||
func bgCtx() gocontext.Context {
|
|
||||||
ctx := gocontext.Background()
|
|
||||||
return ctx
|
|
||||||
}
|
|
||||||
|
|
||||||
func getOrCreateSessionID(c echo.Context) string {
|
|
||||||
if ok := common.CookieExists(c, common.SessionID); !ok {
|
|
||||||
sessionID := ksuid.New().String()
|
|
||||||
common.WriteCookie(c, common.SessionID, sessionID)
|
|
||||||
return sessionID
|
|
||||||
}
|
|
||||||
|
|
||||||
sessionID, err := common.ReadCookie(c, common.SessionID)
|
|
||||||
if err != nil {
|
|
||||||
sessionID = ksuid.New().String()
|
|
||||||
common.WriteCookie(c, common.SessionID, sessionID)
|
|
||||||
}
|
|
||||||
return sessionID
|
|
||||||
}
|
|
||||||
|
|
||||||
func boolToInt64(b bool) int64 {
|
|
||||||
if b {
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
@@ -1,102 +0,0 @@
|
|||||||
package context
|
|
||||||
|
|
||||||
import (
|
|
||||||
"github.com/go-webauthn/webauthn/protocol"
|
|
||||||
"github.com/labstack/echo/v4"
|
|
||||||
"github.com/medama-io/go-useragent"
|
|
||||||
hwayorm "github.com/onsonr/sonr/internal/database/hwayorm"
|
|
||||||
)
|
|
||||||
|
|
||||||
// Define the credential structure matching our frontend data
|
|
||||||
type CredentialDescriptor struct {
|
|
||||||
ID string `json:"id"`
|
|
||||||
RawID string `json:"rawId"`
|
|
||||||
Type string `json:"type"`
|
|
||||||
AuthenticatorAttachment string `json:"authenticatorAttachment"`
|
|
||||||
Transports string `json:"transports"`
|
|
||||||
ClientExtensionResults map[string]string `json:"clientExtensionResults"`
|
|
||||||
Response struct {
|
|
||||||
AttestationObject string `json:"attestationObject"`
|
|
||||||
ClientDataJSON string `json:"clientDataJSON"`
|
|
||||||
} `json:"response"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *CredentialDescriptor) ToModel(handle, origin string) *hwayorm.Credential {
|
|
||||||
return &hwayorm.Credential{
|
|
||||||
Handle: handle,
|
|
||||||
Origin: origin,
|
|
||||||
CredentialID: c.ID,
|
|
||||||
Type: c.Type,
|
|
||||||
Transports: c.Transports,
|
|
||||||
AuthenticatorAttachment: c.AuthenticatorAttachment,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func CredentialArrayToDescriptors(credentials []hwayorm.Credential) []*CredentialDescriptor {
|
|
||||||
var descriptors []*CredentialDescriptor
|
|
||||||
for _, cred := range credentials {
|
|
||||||
cd := &CredentialDescriptor{
|
|
||||||
ID: cred.CredentialID,
|
|
||||||
RawID: cred.CredentialID,
|
|
||||||
Type: cred.Type,
|
|
||||||
AuthenticatorAttachment: cred.AuthenticatorAttachment,
|
|
||||||
Transports: cred.Transports,
|
|
||||||
}
|
|
||||||
descriptors = append(descriptors, cd)
|
|
||||||
}
|
|
||||||
return descriptors
|
|
||||||
}
|
|
||||||
|
|
||||||
func BaseSessionCreateParams(e echo.Context) hwayorm.CreateSessionParams {
|
|
||||||
// f := rand.Intn(5) + 1
|
|
||||||
// l := rand.Intn(4) + 1
|
|
||||||
challenge, _ := protocol.CreateChallenge()
|
|
||||||
id := getOrCreateSessionID(e)
|
|
||||||
ua := useragent.NewParser()
|
|
||||||
s := ua.Parse(e.Request().UserAgent())
|
|
||||||
|
|
||||||
return hwayorm.CreateSessionParams{
|
|
||||||
ID: id,
|
|
||||||
BrowserName: s.GetBrowser(),
|
|
||||||
BrowserVersion: s.GetMajorVersion(),
|
|
||||||
ClientIpaddr: e.RealIP(),
|
|
||||||
Platform: s.GetOS(),
|
|
||||||
IsMobile: s.IsMobile(),
|
|
||||||
IsTablet: s.IsTablet(),
|
|
||||||
IsDesktop: s.IsDesktop(),
|
|
||||||
IsBot: s.IsBot(),
|
|
||||||
IsTv: s.IsTV(),
|
|
||||||
// IsHumanFirst: int64(f),
|
|
||||||
// IsHumanLast: int64(l),
|
|
||||||
Challenge: challenge.String(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ╭───────────────────────────────────────────────────────────╮
|
|
||||||
// │ Create Passkey (/register/passkey) │
|
|
||||||
// ╰───────────────────────────────────────────────────────────╯
|
|
||||||
|
|
||||||
// CreatePasskeyParams represents the parameters for creating a passkey
|
|
||||||
type CreatePasskeyParams struct {
|
|
||||||
Address string
|
|
||||||
Handle string
|
|
||||||
Name string
|
|
||||||
Challenge string
|
|
||||||
CreationBlock string
|
|
||||||
}
|
|
||||||
|
|
||||||
// ╭───────────────────────────────────────────────────────────╮
|
|
||||||
// │ Create Profile (/register/profile) │
|
|
||||||
// ╰───────────────────────────────────────────────────────────╯
|
|
||||||
|
|
||||||
// CreateProfileParams represents the parameters for creating a profile
|
|
||||||
type CreateProfileParams struct {
|
|
||||||
TurnstileSiteKey string
|
|
||||||
FirstNumber int
|
|
||||||
LastNumber int
|
|
||||||
}
|
|
||||||
|
|
||||||
// Sum returns the sum of the first and last number
|
|
||||||
func (d CreateProfileParams) Sum() int {
|
|
||||||
return d.FirstNumber + d.LastNumber
|
|
||||||
}
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
package context
|
|
||||||
|
|
||||||
import (
|
|
||||||
"github.com/onsonr/sonr/crypto/mpc"
|
|
||||||
"github.com/onsonr/sonr/pkg/common"
|
|
||||||
"lukechampine.com/blake3"
|
|
||||||
)
|
|
||||||
|
|
||||||
func (cc *GatewayContext) Spawn(handle, origin string) (*CreatePasskeyParams, error) {
|
|
||||||
challenge := GetAuthChallenge(cc)
|
|
||||||
sid := GetSessionID(cc)
|
|
||||||
nonce, err := calcNonce(sid)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
encl, err := mpc.GenEnclave(nonce)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
cc.stagedEnclaves[sid] = encl
|
|
||||||
common.WriteCookie(cc, common.SonrAddress, encl.Address())
|
|
||||||
return &CreatePasskeyParams{
|
|
||||||
Address: encl.Address(),
|
|
||||||
Handle: handle,
|
|
||||||
Name: origin,
|
|
||||||
Challenge: challenge,
|
|
||||||
CreationBlock: cc.StatusBlock(),
|
|
||||||
}, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// Uses blake3 to hash the sessionID to generate a nonce of length 12 bytes
|
|
||||||
func calcNonce(sessionID string) ([]byte, error) {
|
|
||||||
hash := blake3.New(32, nil)
|
|
||||||
_, err := hash.Write([]byte(sessionID))
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
// Read the hash into a byte slice
|
|
||||||
nonce := make([]byte, 12)
|
|
||||||
_, err = hash.Write(nonce)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nonce, nil
|
|
||||||
}
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
// Package gateway provides the default routes for the Sonr hway.
|
|
||||||
package gateway
|
|
||||||
|
|
||||||
import (
|
|
||||||
"github.com/labstack/echo-contrib/echoprometheus"
|
|
||||||
"github.com/labstack/echo/v4"
|
|
||||||
echomiddleware "github.com/labstack/echo/v4/middleware"
|
|
||||||
"github.com/onsonr/sonr/app/gateway/context"
|
|
||||||
"github.com/onsonr/sonr/app/gateway/handlers"
|
|
||||||
config "github.com/onsonr/sonr/internal/config/hway"
|
|
||||||
hwayorm "github.com/onsonr/sonr/internal/database/hwayorm"
|
|
||||||
"github.com/onsonr/sonr/pkg/common"
|
|
||||||
)
|
|
||||||
|
|
||||||
type Gateway = *echo.Echo
|
|
||||||
|
|
||||||
// New returns a new Gateway instance
|
|
||||||
func New(env config.Hway, ipc common.IPFS, dbq *hwayorm.Queries) (Gateway, error) {
|
|
||||||
e := echo.New()
|
|
||||||
|
|
||||||
// Built-in middleware
|
|
||||||
e.Use(echomiddleware.Logger())
|
|
||||||
e.Use(echomiddleware.Recover())
|
|
||||||
e.IPExtractor = echo.ExtractIPDirect()
|
|
||||||
e.Use(echoprometheus.NewMiddleware("hway"))
|
|
||||||
e.Use(context.UseGateway(env, ipc, dbq))
|
|
||||||
|
|
||||||
// Register View Handlers
|
|
||||||
e.HTTPErrorHandler = handlers.ErrorHandler
|
|
||||||
e.GET("/", handlers.IndexHandler)
|
|
||||||
handlers.RegisterHandler(e.Group("/register"))
|
|
||||||
return e, nil
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
package handlers
|
|
||||||
|
|
||||||
import (
|
|
||||||
"github.com/labstack/echo/v4"
|
|
||||||
"github.com/onsonr/sonr/app/gateway/context"
|
|
||||||
)
|
|
||||||
|
|
||||||
func ErrorHandler(err error, c echo.Context) {
|
|
||||||
if he, ok := err.(*echo.HTTPError); ok {
|
|
||||||
// Log the error if needed
|
|
||||||
c.Logger().Errorf("Error: %v", he.Message)
|
|
||||||
context.RenderError(c, he)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
package handlers
|
|
||||||
|
|
||||||
import (
|
|
||||||
"github.com/labstack/echo/v4"
|
|
||||||
"github.com/onsonr/sonr/app/gateway/context"
|
|
||||||
)
|
|
||||||
|
|
||||||
func IndexHandler(c echo.Context) error {
|
|
||||||
id := context.GetSessionID(c)
|
|
||||||
if id == "" {
|
|
||||||
context.NewSession(c)
|
|
||||||
}
|
|
||||||
return context.RenderInitial(c)
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
package handlers
|
|
||||||
@@ -1,111 +0,0 @@
|
|||||||
package handlers
|
|
||||||
|
|
||||||
import (
|
|
||||||
"encoding/json"
|
|
||||||
|
|
||||||
"github.com/labstack/echo/v4"
|
|
||||||
"github.com/onsonr/sonr/app/gateway/context"
|
|
||||||
"github.com/onsonr/sonr/app/gateway/islands"
|
|
||||||
"github.com/onsonr/sonr/app/gateway/views"
|
|
||||||
hwayorm "github.com/onsonr/sonr/internal/database/hwayorm"
|
|
||||||
"github.com/onsonr/sonr/pkg/common"
|
|
||||||
)
|
|
||||||
|
|
||||||
func RegisterHandler(g *echo.Group) {
|
|
||||||
g.GET("/", renderProfileForm)
|
|
||||||
g.POST("/profile", validateProfileForm)
|
|
||||||
g.GET("/passkey", renderPasskeyForm)
|
|
||||||
g.POST("/passkey", validatePasskeyForm)
|
|
||||||
g.GET("/vault", renderVaultStatus)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ╭──────────────────────────────────────────────────────╮
|
|
||||||
// │ Registration Views │
|
|
||||||
// ╰──────────────────────────────────────────────────────
|
|
||||||
|
|
||||||
func renderProfileForm(c echo.Context) error {
|
|
||||||
params := context.CreateProfileParams{
|
|
||||||
FirstNumber: 6,
|
|
||||||
LastNumber: 3,
|
|
||||||
}
|
|
||||||
return context.Render(c, views.RegisterProfileView(params.FirstNumber, params.LastNumber))
|
|
||||||
}
|
|
||||||
|
|
||||||
func renderPasskeyForm(c echo.Context) error {
|
|
||||||
cc, err := context.GetGateway(c)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
handle := c.FormValue("handle")
|
|
||||||
origin := c.FormValue("origin")
|
|
||||||
name := c.FormValue("name")
|
|
||||||
cc.InsertProfile(context.BG(), hwayorm.InsertProfileParams{
|
|
||||||
Handle: handle,
|
|
||||||
Origin: origin,
|
|
||||||
Name: name,
|
|
||||||
})
|
|
||||||
|
|
||||||
params, err := cc.Spawn(handle, origin)
|
|
||||||
if err != nil {
|
|
||||||
return context.RenderError(c, err)
|
|
||||||
}
|
|
||||||
return context.Render(c, views.RegisterPasskeyView(params.Address, params.Handle, params.Name, params.Challenge, params.CreationBlock))
|
|
||||||
}
|
|
||||||
|
|
||||||
func renderVaultStatus(c echo.Context) error {
|
|
||||||
return context.Render(c, views.LoadingView())
|
|
||||||
}
|
|
||||||
|
|
||||||
// ╭─────────────────────────────────────────────────────────╮
|
|
||||||
// │ Validation Components │
|
|
||||||
// ╰─────────────────────────────────────────────────────────╯
|
|
||||||
|
|
||||||
func validateProfileForm(c echo.Context) error {
|
|
||||||
cc, err := context.GetGateway(c)
|
|
||||||
if err != nil {
|
|
||||||
return context.RenderError(c, err)
|
|
||||||
}
|
|
||||||
handle := c.FormValue("handle")
|
|
||||||
if handle == "" {
|
|
||||||
return context.Render(c, islands.InputHandleError(handle, "Please enter a 4-16 character handle"))
|
|
||||||
}
|
|
||||||
notok, err := cc.CheckHandleExists(context.BG(), handle)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
if notok {
|
|
||||||
return context.Render(c, islands.InputHandleError(handle, "Handle is already taken"))
|
|
||||||
}
|
|
||||||
cc.WriteCookie(common.UserHandle, handle)
|
|
||||||
return context.Render(c, islands.InputHandleSuccess(handle))
|
|
||||||
}
|
|
||||||
|
|
||||||
func validatePasskeyForm(c echo.Context) error {
|
|
||||||
cc, err := context.GetGateway(c)
|
|
||||||
if err != nil {
|
|
||||||
return context.RenderError(c, err)
|
|
||||||
}
|
|
||||||
handle := context.GetProfileHandle(c)
|
|
||||||
origin := c.Request().Host
|
|
||||||
credentialJSON := c.FormValue("credential")
|
|
||||||
cred := &context.CredentialDescriptor{}
|
|
||||||
|
|
||||||
// Unmarshal the credential JSON
|
|
||||||
err = json.Unmarshal([]byte(credentialJSON), cred)
|
|
||||||
if err != nil {
|
|
||||||
return context.RenderError(c, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
md := cred.ToModel(handle, origin)
|
|
||||||
_, err = cc.InsertCredential(context.BG(), hwayorm.InsertCredentialParams{
|
|
||||||
Handle: md.Handle,
|
|
||||||
CredentialID: md.CredentialID,
|
|
||||||
Origin: md.Origin,
|
|
||||||
Type: md.Type,
|
|
||||||
Transports: md.Transports,
|
|
||||||
})
|
|
||||||
if err != nil {
|
|
||||||
return context.RenderError(c, err)
|
|
||||||
}
|
|
||||||
return context.Render(c, views.LoadingView())
|
|
||||||
}
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
package islands
|
|
||||||
|
|
||||||
templ CardAccount(addr, name, handle, creationBlock string) {
|
|
||||||
<div class="profile-card min-w-[320px]">
|
|
||||||
<div class="text-white max-w-xs my-auto mx-auto bg-gradient-to-r from-cyan-600 to-cyan-300 p-4 py-5 px-5 rounded-xl">
|
|
||||||
<div class="flex justify-between">
|
|
||||||
<div>
|
|
||||||
<h2>sonr-testnet-1</h2>
|
|
||||||
<p class="text-2xl font-bold">{ handle }</p>
|
|
||||||
</div>
|
|
||||||
<div class="flex items-center opacity-60">
|
|
||||||
<sl-icon style="font-size: 52px;" library="sonr" name="sonr-fill"></sl-icon>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="mt-5 flex justify-between items-center w-52">
|
|
||||||
<span class="text-lg font-mono">{ shortenAddress(addr) }</span>
|
|
||||||
</div>
|
|
||||||
<div class="flex justify-between mt-5 w-48 ">
|
|
||||||
<div>
|
|
||||||
<h3 class="text-xs">Block Created </h3>
|
|
||||||
<p class="font-bold"><span>#</span>{ creationBlock }</p>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<h3 class="text-xs">Issued to</h3>
|
|
||||||
<p class="font-bold">{ name }</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
|
|
||||||
// Helper function to shorten address
|
|
||||||
func shortenAddress(address string) string {
|
|
||||||
if len(address) <= 20 {
|
|
||||||
return address
|
|
||||||
}
|
|
||||||
return address[:16] + "..." + address[len(address)-4:]
|
|
||||||
}
|
|
||||||
@@ -1,100 +0,0 @@
|
|||||||
// Code generated by templ - DO NOT EDIT.
|
|
||||||
|
|
||||||
// templ: version: v0.2.793
|
|
||||||
package islands
|
|
||||||
|
|
||||||
//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 CardAccount(addr, name, handle, creationBlock 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 class=\"profile-card min-w-[320px]\"><div class=\"text-white max-w-xs my-auto mx-auto bg-gradient-to-r from-cyan-600 to-cyan-300 p-4 py-5 px-5 rounded-xl\"><div class=\"flex justify-between\"><div><h2>sonr-testnet-1</h2><p class=\"text-2xl font-bold\">")
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
var templ_7745c5c3_Var2 string
|
|
||||||
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(handle)
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `app/gateway/islands/card_account.templ`, Line: 9, Col: 43}
|
|
||||||
}
|
|
||||||
_, 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("</p></div><div class=\"flex items-center opacity-60\"><sl-icon style=\"font-size: 52px;\" library=\"sonr\" name=\"sonr-fill\"></sl-icon></div></div><div class=\"mt-5 flex justify-between items-center w-52\"><span class=\"text-lg font-mono\">")
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
var templ_7745c5c3_Var3 string
|
|
||||||
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(shortenAddress(addr))
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `app/gateway/islands/card_account.templ`, Line: 16, Col: 58}
|
|
||||||
}
|
|
||||||
_, 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("</span></div><div class=\"flex justify-between mt-5 w-48 \"><div><h3 class=\"text-xs\">Block Created </h3><p class=\"font-bold\"><span>#</span>")
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
var templ_7745c5c3_Var4 string
|
|
||||||
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(creationBlock)
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `app/gateway/islands/card_account.templ`, Line: 21, Col: 55}
|
|
||||||
}
|
|
||||||
_, 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("</p></div><div><h3 class=\"text-xs\">Issued to</h3><p class=\"font-bold\">")
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
var templ_7745c5c3_Var5 string
|
|
||||||
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(name)
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `app/gateway/islands/card_account.templ`, Line: 25, Col: 32}
|
|
||||||
}
|
|
||||||
_, 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></div></div></div>")
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// Helper function to shorten address
|
|
||||||
func shortenAddress(address string) string {
|
|
||||||
if len(address) <= 20 {
|
|
||||||
return address
|
|
||||||
}
|
|
||||||
return address[:16] + "..." + address[len(address)-4:]
|
|
||||||
}
|
|
||||||
|
|
||||||
var _ = templruntime.GeneratedTemplate
|
|
||||||
@@ -1,70 +0,0 @@
|
|||||||
package islands
|
|
||||||
|
|
||||||
type Coin struct {
|
|
||||||
Ticker string
|
|
||||||
Name string
|
|
||||||
IsDefault bool
|
|
||||||
}
|
|
||||||
|
|
||||||
var defaultCoins = []Coin{
|
|
||||||
{Ticker: "SNR", Name: "Sonr", IsDefault: true},
|
|
||||||
{Ticker: "BTC", Name: "Bitcoin", IsDefault: true},
|
|
||||||
{Ticker: "ETH", Name: "Ethereum", IsDefault: true},
|
|
||||||
{Ticker: "SOL", Name: "Solana", IsDefault: false},
|
|
||||||
{Ticker: "LTC", Name: "Litecoin", IsDefault: false},
|
|
||||||
{Ticker: "DOGE", Name: "Dogecoin", IsDefault: false},
|
|
||||||
{Ticker: "XRP", Name: "Ripple", IsDefault: false},
|
|
||||||
{Ticker: "OSMO", Name: "Osmosis", IsDefault: false},
|
|
||||||
{Ticker: "ATOM", Name: "Cosmos", IsDefault: false},
|
|
||||||
{Ticker: "STARZ", Name: "Stargaze", IsDefault: false},
|
|
||||||
{Ticker: "AKT", Name: "Akash", IsDefault: false},
|
|
||||||
{Ticker: "EVMOS", Name: "Evmos", IsDefault: false},
|
|
||||||
{Ticker: "FIL", Name: "Filecoin", IsDefault: false},
|
|
||||||
{Ticker: "AXL", Name: "Axelar", IsDefault: false},
|
|
||||||
}
|
|
||||||
|
|
||||||
templ CoinSelect() {
|
|
||||||
<sl-select
|
|
||||||
label="Accounts"
|
|
||||||
name="selected_assets"
|
|
||||||
value="SNR BTC ETH"
|
|
||||||
help-text="Select Blockchains to connect with your Vault"
|
|
||||||
multiple
|
|
||||||
class="custom-tag py-2"
|
|
||||||
>
|
|
||||||
for _, a := range defaultCoins {
|
|
||||||
@CoinOption(a)
|
|
||||||
}
|
|
||||||
</sl-select>
|
|
||||||
<script>
|
|
||||||
const select = document.querySelector('.custom-tag');
|
|
||||||
select.getTag = (option, index) => {
|
|
||||||
// Use the same icon used in the <sl-option>
|
|
||||||
const name = option.querySelector('sl-icon[slot="prefix"]').name;
|
|
||||||
|
|
||||||
// You can return a string, a Lit Template, or an HTMLElement here
|
|
||||||
return `
|
|
||||||
<sl-tag removable>
|
|
||||||
<sl-icon name="${name}" library="crypto" style="padding-inline-end: .5rem;"></sl-icon>
|
|
||||||
${option.getTextLabel()}
|
|
||||||
</sl-tag>
|
|
||||||
`;
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
}
|
|
||||||
|
|
||||||
templ CoinOption(a Coin) {
|
|
||||||
if a.IsDefault {
|
|
||||||
<sl-option value={ a.Ticker } selected disabled>
|
|
||||||
<sl-icon slot="prefix" name={ a.Ticker } library="crypto"></sl-icon>
|
|
||||||
{ a.Name }
|
|
||||||
</sl-option>
|
|
||||||
<sl-divider></sl-divider>
|
|
||||||
} else {
|
|
||||||
<sl-option value={ a.Ticker }>
|
|
||||||
<sl-icon slot="prefix" name={ a.Ticker } library="crypto"></sl-icon>
|
|
||||||
{ a.Name }
|
|
||||||
</sl-option>
|
|
||||||
<sl-divider></sl-divider>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,187 +0,0 @@
|
|||||||
// Code generated by templ - DO NOT EDIT.
|
|
||||||
|
|
||||||
// templ: version: v0.2.793
|
|
||||||
package islands
|
|
||||||
|
|
||||||
//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 Coin struct {
|
|
||||||
Ticker string
|
|
||||||
Name string
|
|
||||||
IsDefault bool
|
|
||||||
}
|
|
||||||
|
|
||||||
var defaultCoins = []Coin{
|
|
||||||
{Ticker: "SNR", Name: "Sonr", IsDefault: true},
|
|
||||||
{Ticker: "BTC", Name: "Bitcoin", IsDefault: true},
|
|
||||||
{Ticker: "ETH", Name: "Ethereum", IsDefault: true},
|
|
||||||
{Ticker: "SOL", Name: "Solana", IsDefault: false},
|
|
||||||
{Ticker: "LTC", Name: "Litecoin", IsDefault: false},
|
|
||||||
{Ticker: "DOGE", Name: "Dogecoin", IsDefault: false},
|
|
||||||
{Ticker: "XRP", Name: "Ripple", IsDefault: false},
|
|
||||||
{Ticker: "OSMO", Name: "Osmosis", IsDefault: false},
|
|
||||||
{Ticker: "ATOM", Name: "Cosmos", IsDefault: false},
|
|
||||||
{Ticker: "STARZ", Name: "Stargaze", IsDefault: false},
|
|
||||||
{Ticker: "AKT", Name: "Akash", IsDefault: false},
|
|
||||||
{Ticker: "EVMOS", Name: "Evmos", IsDefault: false},
|
|
||||||
{Ticker: "FIL", Name: "Filecoin", IsDefault: false},
|
|
||||||
{Ticker: "AXL", Name: "Axelar", IsDefault: false},
|
|
||||||
}
|
|
||||||
|
|
||||||
func CoinSelect() 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("<sl-select label=\"Accounts\" name=\"selected_assets\" value=\"SNR BTC ETH\" help-text=\"Select Blockchains to connect with your Vault\" multiple class=\"custom-tag py-2\">")
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
for _, a := range defaultCoins {
|
|
||||||
templ_7745c5c3_Err = CoinOption(a).Render(ctx, templ_7745c5c3_Buffer)
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</sl-select><script>\n\t const select = document.querySelector('.custom-tag');\n select.getTag = (option, index) => {\n // Use the same icon used in the <sl-option>\n const name = option.querySelector('sl-icon[slot=\"prefix\"]').name;\n\n // You can return a string, a Lit Template, or an HTMLElement here\n return `\n <sl-tag removable>\n <sl-icon name=\"${name}\" library=\"crypto\" style=\"padding-inline-end: .5rem;\"></sl-icon>\n ${option.getTextLabel()}\n </sl-tag>\n `;\n };\n\t</script>")
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
func CoinOption(a Coin) 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)
|
|
||||||
if a.IsDefault {
|
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<sl-option value=\"")
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
var templ_7745c5c3_Var3 string
|
|
||||||
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(a.Ticker)
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `app/gateway/islands/coin_select.templ`, Line: 58, Col: 29}
|
|
||||||
}
|
|
||||||
_, 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("\" selected disabled><sl-icon slot=\"prefix\" name=\"")
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
var templ_7745c5c3_Var4 string
|
|
||||||
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(a.Ticker)
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `app/gateway/islands/coin_select.templ`, Line: 59, Col: 41}
|
|
||||||
}
|
|
||||||
_, 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("\" library=\"crypto\"></sl-icon> ")
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
var templ_7745c5c3_Var5 string
|
|
||||||
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(a.Name)
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `app/gateway/islands/coin_select.templ`, Line: 60, Col: 11}
|
|
||||||
}
|
|
||||||
_, 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("</sl-option> <sl-divider></sl-divider>")
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<sl-option value=\"")
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
var templ_7745c5c3_Var6 string
|
|
||||||
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(a.Ticker)
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `app/gateway/islands/coin_select.templ`, Line: 64, Col: 29}
|
|
||||||
}
|
|
||||||
_, 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("\"><sl-icon slot=\"prefix\" name=\"")
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
var templ_7745c5c3_Var7 string
|
|
||||||
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(a.Ticker)
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `app/gateway/islands/coin_select.templ`, Line: 65, Col: 41}
|
|
||||||
}
|
|
||||||
_, 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("\" library=\"crypto\"></sl-icon> ")
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
var templ_7745c5c3_Var8 string
|
|
||||||
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(a.Name)
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `app/gateway/islands/coin_select.templ`, Line: 66, Col: 11}
|
|
||||||
}
|
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</sl-option> <sl-divider></sl-divider>")
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
var _ = templruntime.GeneratedTemplate
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
package islands
|
|
||||||
|
|
||||||
import "fmt"
|
|
||||||
|
|
||||||
templ HumanSlider(firstNumber int, lastNumber int) {
|
|
||||||
<div hx-target="this" hx-swap="outerHTML">
|
|
||||||
<sl-range name="is_human" label={ humanLabel(firstNumber, lastNumber) } help-text="Prove you are a human." min="0" max="9" step="1" hx-post="/register/profile/is_human"></sl-range>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
|
|
||||||
templ HumanSliderError(firstNumber int, lastNumber int) {
|
|
||||||
<sl-range name="is_human" label={ humanLabel(firstNumber, lastNumber) } help-text="Prove you are a human." min="0" max="9" step="1"></sl-range>
|
|
||||||
<div slot="help-text">
|
|
||||||
<sl-icon name="x-lg" library="sonr"></sl-icon>
|
|
||||||
Invalid Human Sum
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
|
|
||||||
templ HumanSliderSuccess() {
|
|
||||||
<sl-range name="is_human" label="Success! Welcome Human." help-text="Prove you are a human." min="0" max="9" step="1" value="9" disabled></sl-range>
|
|
||||||
}
|
|
||||||
|
|
||||||
func humanLabel(firstNumber int, lastNumber int) string {
|
|
||||||
return fmt.Sprintf("What is %d + %d?", firstNumber, lastNumber)
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user