mirror of
https://github.com/onsonr/sonr.git
synced 2025-03-10 21:09:11 +00:00
- **docs: remove discord badge from README** - **fix: ensure go version is up-to-date** - **<no value>** - **refactor: update import paths for blocks to components** - **feat: add Hero component template** - **fix: update footer logo to svg** - **feat: add Query/Sign and Query/Verify RPC methods** - **refactor: rename Keyshares to KsVal in did/v1/state.proto**
47 lines
1.0 KiB
Go
47 lines
1.0 KiB
Go
// Code generated from Pkl module `models`. DO NOT EDIT.
|
|
package permissiongrant
|
|
|
|
import (
|
|
"encoding"
|
|
"fmt"
|
|
)
|
|
|
|
type PermissionGrant string
|
|
|
|
const (
|
|
None PermissionGrant = "none"
|
|
Read PermissionGrant = "read"
|
|
Write PermissionGrant = "write"
|
|
Verify PermissionGrant = "verify"
|
|
Broadcast PermissionGrant = "broadcast"
|
|
Admin PermissionGrant = "admin"
|
|
)
|
|
|
|
// String returns the string representation of PermissionGrant
|
|
func (rcv PermissionGrant) String() string {
|
|
return string(rcv)
|
|
}
|
|
|
|
var _ encoding.BinaryUnmarshaler = new(PermissionGrant)
|
|
|
|
// UnmarshalBinary implements encoding.BinaryUnmarshaler for PermissionGrant.
|
|
func (rcv *PermissionGrant) UnmarshalBinary(data []byte) error {
|
|
switch str := string(data); str {
|
|
case "none":
|
|
*rcv = None
|
|
case "read":
|
|
*rcv = Read
|
|
case "write":
|
|
*rcv = Write
|
|
case "verify":
|
|
*rcv = Verify
|
|
case "broadcast":
|
|
*rcv = Broadcast
|
|
case "admin":
|
|
*rcv = Admin
|
|
default:
|
|
return fmt.Errorf(`illegal: "%s" is not a valid PermissionGrant`, str)
|
|
}
|
|
return nil
|
|
}
|