Documentation ¶
Index ¶
Constants ¶
const ( Namespace = "account" TypeKey = "key" DefaultRoleId = "default" CompanyAdminRoleId = "company_admin" )
Variables ¶
This section is empty.
Functions ¶
func GetKeyCreateV1Type ¶ added in v1.3.0
func GetKeyCreateV1Type() string
GetKeyCreateV1Type returns the type string representation of a KeyCreateV1.
func GetKeyIdKey ¶ added in v1.3.0
func GetKeyIdKey() string
GetKeyIdKey returns the id key to index a key.
func GetKeyRevokeV1Type ¶ added in v1.3.0
func GetKeyRevokeV1Type() string
GetKeyRevokeV1Type returns the type string representation of a KeyRevokeV1.
func GetKeyRotateV1Type ¶ added in v1.3.0
func GetKeyRotateV1Type() string
GetKeyRotateV1Type returns the type string representation of a KeRotateV1.
Types ¶
type KeyCreateV1 ¶
type KeyCreateV1 struct { Id string `json:"id" validate:"required,uuid4"` PublicKey ed25519.PublicKey `json:"public_key" validate:"required,len=32"` Role string `json:"role" validate:"required,min=1"` }
KeyCreateV1 is the first version of a key create message.
func NewKeyCreateV1 ¶
func NewKeyCreateV1(id string, publicKey ed25519.PublicKey, role string) *KeyCreateV1
KeyCreateV1 constructor.
func (KeyCreateV1) GetNamespace ¶
func (kc KeyCreateV1) GetNamespace() string
GetNamespace returns the account namespace.
func (KeyCreateV1) GetStateIds ¶ added in v1.3.0
func (kc KeyCreateV1) GetStateIds(signerCompanyBcId string) map[string]string
GetStateIds returns key-value pairs of id keys and id values.
func (KeyCreateV1) GetType ¶
func (kc KeyCreateV1) GetType() string
GetType returns the type string representation.
type KeyRevokeV1 ¶
type KeyRevokeV1 struct {
Id string `json:"id" validate:"required,uuid4"`
}
KeyRevokeV1 is the first version of a key revoke message.
func (KeyRevokeV1) GetNamespace ¶
func (kr KeyRevokeV1) GetNamespace() string
GetNamespace returns the account namespace.
func (KeyRevokeV1) GetStateIds ¶ added in v1.3.0
func (kr KeyRevokeV1) GetStateIds(signerCompanyBcId string) map[string]string
GetStateIds returns key-value pairs of id keys and id values.
func (KeyRevokeV1) GetType ¶
func (kr KeyRevokeV1) GetType() string
GetType returns the type string representation.
type KeyRotateV1 ¶ added in v1.3.0
type KeyRotateV1 struct { Id string `json:"id" validate:"required,uuid4"` PublicKey ed25519.PublicKey `json:"public_key" validate:"required,len=32"` }
KeyRotateV1 is the first version of a key rotate message.
func NewKeyRotateV1 ¶ added in v1.3.0
func NewKeyRotateV1(id string, publicKey ed25519.PublicKey) *KeyRotateV1
KeyRotateV1 constructor.
func (KeyRotateV1) GetNamespace ¶ added in v1.3.0
func (kr KeyRotateV1) GetNamespace() string
GetNamespace returns the account namespace.
func (KeyRotateV1) GetStateIds ¶ added in v1.3.0
func (kr KeyRotateV1) GetStateIds(signerCompanyBcId string) map[string]string
GetStateIds returns key-value pairs of id keys and id values.
func (KeyRotateV1) GetType ¶ added in v1.3.0
func (kr KeyRotateV1) GetType() string
GetType returns the type string representation.
type KeyV1 ¶ added in v1.1.0
type KeyV1 struct { FqId string `json:"fqid" validate:"required,fqid"` PublicKey ed25519.PublicKey `json:"public_key" validate:"required,len=32"` IsActive bool `json:"is_active" validate:"required"` Role string `json:"role" validate:"required,min=1"` }
KeyV1 is the first version of a key.