Documentation
¶
Overview ¶
Package envelope defines the generic encapsulating format for torus objects.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CredentialInf ¶ added in v0.22.0
type CredentialInf interface {
Envelope
GetVersion() uint8 // schema version
Previous() *identity.ID
CredentialVersion() int
PathExp() *pathexp.PathExp
Name() string
Unset() bool
Nonce() *base64.Value
Credential() *primitive.CredentialValue
OrgID() *identity.ID
ProjectID() *identity.ID
}
CredentialInf is the common interface for all Credential schema versions.
type Envelope ¶
Envelope is the interface implemented by objects that encapsulate 'true' torus objects.
type KeyringInf ¶ added in v0.22.0
type KeyringInf interface {
Envelope
PathExp() *pathexp.PathExp
OrgID() *identity.ID
GetVersion() uint8 // Return the schema version of the keyring
}
KeyringInf is the common interface for all keyring schema versions.
type Signed ¶
type Signed struct {
ID *identity.ID `json:"id"`
Version uint8 `json:"version"`
Body identity.Immutable `json:"body"`
Signature primitive.Signature `json:"sig"`
}
Signed is the generic format for encapsulating signed immutable request/response objects to/from torus.
type Unsigned ¶
type Unsigned struct {
ID *identity.ID `json:"id"`
Version uint8 `json:"version"`
Body identity.Mutable `json:"body"`
}
Unsigned is the generic format for encapsulating unsigned mutable request/response objects to/from torus.
func (*Unsigned) GetVersion ¶ added in v0.22.0
GetVersion returns the Schema version of the object encapsulated in this envelope.
type UserInf ¶ added in v0.22.0
type UserInf interface {
Envelope
StructVersion() uint8
Username() string
Name() string
Email() string
Password() *primitive.UserPassword
Master() *primitive.MasterKey
State() string
}
UserInf is the common interface for all user schema versions.
func ConvertUser ¶ added in v0.22.0
ConvertUser converts an unsigned envelope to a UserInf interface which provides a common interface for all user versions.