Documentation
¶
Overview ¶
Package envelope defines the generic encapsulating format for torus objects.
Index ¶
- type Claim
- type Credential
- func (c *Credential) Credential() *primitive.CredentialValue
- func (c *Credential) CredentialVersion() int
- func (e *Credential) GetID() *identity.ID
- func (c *Credential) GetVersion() uint8
- func (c *Credential) Name() string
- func (c *Credential) Nonce() *base64.Value
- func (c *Credential) OrgID() *identity.ID
- func (c *Credential) PathExp() *pathexp.PathExp
- func (c *Credential) Previous() *identity.ID
- func (c *Credential) ProjectID() *identity.ID
- func (c *Credential) Unset() bool
- type CredentialInf
- type CredentialV1
- func (c *CredentialV1) Credential() *primitive.CredentialValue
- func (c *CredentialV1) CredentialVersion() int
- func (e *CredentialV1) GetID() *identity.ID
- func (c *CredentialV1) GetVersion() uint8
- func (c *CredentialV1) Name() string
- func (c *CredentialV1) Nonce() *base64.Value
- func (c *CredentialV1) OrgID() *identity.ID
- func (c *CredentialV1) PathExp() *pathexp.PathExp
- func (c *CredentialV1) Previous() *identity.ID
- func (c *CredentialV1) ProjectID() *identity.ID
- func (CredentialV1) Unset() bool
- type Envelope
- type Environment
- type Keyring
- type KeyringInf
- type KeyringMember
- type KeyringMemberClaim
- type KeyringMemberV1
- type KeyringV1
- type MEKShare
- type Machine
- type MachineToken
- type Membership
- type Org
- type OrgInvite
- type Policy
- type PolicyAttachment
- type PrivateKey
- type Project
- type PublicKey
- type Service
- type Signed
- type Team
- type Token
- type Unsigned
- type User
- type UserInf
- type UserV1
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Claim ¶ added in v0.23.0
type Claim struct {
ID *identity.ID `json:"id"`
Version uint8 `json:"version"`
Body *primitive.Claim `json:"body"`
Signature primitive.Signature `json:"sig"`
}
Claim wraps primitive.Claim
type Credential ¶ added in v0.23.0
type Credential struct {
ID *identity.ID `json:"id"`
Version uint8 `json:"version"`
Body *primitive.Credential `json:"body"`
Signature primitive.Signature `json:"sig"`
}
Credential wraps primitive.Credential
func (*Credential) Credential ¶ added in v0.23.0
func (c *Credential) Credential() *primitive.CredentialValue
Credential returns the encrypted CredentialValue for this Credential.
func (*Credential) CredentialVersion ¶ added in v0.23.0
func (c *Credential) CredentialVersion() int
CredentialVersion returns the monotomically incremented version of the Credential for this PathExp/Name pair.
func (*Credential) GetID ¶ added in v0.23.0
func (e *Credential) GetID() *identity.ID
GetID returns the ID of the contained Credential.
func (*Credential) GetVersion ¶ added in v0.23.0
func (c *Credential) GetVersion() uint8
GetVersion returns the schema version of this Credential.
func (*Credential) Name ¶ added in v0.23.0
func (c *Credential) Name() string
Name returns this Credential's name.
func (*Credential) Nonce ¶ added in v0.23.0
func (c *Credential) Nonce() *base64.Value
Nonce returns the Nonce for this Credential's encrypted value.
func (*Credential) OrgID ¶ added in v0.23.0
func (c *Credential) OrgID() *identity.ID
OrgID returns the ID of the Org that this Credential belongs to.
func (*Credential) PathExp ¶ added in v0.23.0
func (c *Credential) PathExp() *pathexp.PathExp
PathExp returns the path expression for this Credential's location.
func (*Credential) Previous ¶ added in v0.23.0
func (c *Credential) Previous() *identity.ID
Previous returns the ID of the previous versino of this Credential, or nil if this Credential has no previous version.
func (*Credential) ProjectID ¶ added in v0.23.0
func (c *Credential) ProjectID() *identity.ID
ProjectID returns the ID of the Project that this Credential belongs to.
func (*Credential) Unset ¶ added in v0.23.0
func (c *Credential) Unset() bool
Unset returns a bool indicating if this Credential has been explicitly unset.
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 CredentialV1 ¶ added in v0.23.0
type CredentialV1 struct {
ID *identity.ID `json:"id"`
Version uint8 `json:"version"`
Body *primitive.CredentialV1 `json:"body"`
Signature primitive.Signature `json:"sig"`
}
CredentialV1 wraps primitive.CredentialV1
func (*CredentialV1) Credential ¶ added in v0.23.0
func (c *CredentialV1) Credential() *primitive.CredentialValue
Credential returns the encrypted CredentialValue for this Credential.
func (*CredentialV1) CredentialVersion ¶ added in v0.23.0
func (c *CredentialV1) CredentialVersion() int
CredentialVersion returns the monotomically incremented version of the Credential for this PathExp/Name pair.
func (*CredentialV1) GetID ¶ added in v0.23.0
func (e *CredentialV1) GetID() *identity.ID
GetID returns the ID of the contained CredentialV1.
func (*CredentialV1) GetVersion ¶ added in v0.23.0
func (c *CredentialV1) GetVersion() uint8
GetVersion returns the schema version of this Credential.
func (*CredentialV1) Name ¶ added in v0.23.0
func (c *CredentialV1) Name() string
Name returns this Credential's name.
func (*CredentialV1) Nonce ¶ added in v0.23.0
func (c *CredentialV1) Nonce() *base64.Value
Nonce returns the Nonce for this Credential's encrypted value.
func (*CredentialV1) OrgID ¶ added in v0.23.0
func (c *CredentialV1) OrgID() *identity.ID
OrgID returns the ID of the Org that this Credential belongs to.
func (*CredentialV1) PathExp ¶ added in v0.23.0
func (c *CredentialV1) PathExp() *pathexp.PathExp
PathExp returns the path expression for this Credential's location.
func (*CredentialV1) Previous ¶ added in v0.23.0
func (c *CredentialV1) Previous() *identity.ID
Previous returns the ID of the previous versino of this Credential, or nil if this Credential has no previous version.
func (*CredentialV1) ProjectID ¶ added in v0.23.0
func (c *CredentialV1) ProjectID() *identity.ID
ProjectID returns the ID of the Project that this Credential belongs to.
func (CredentialV1) Unset ¶ added in v0.23.0
func (CredentialV1) Unset() bool
Unset returns a bool indicating if this Credential has been explicitly unset. Version 1 credentials do not track this, so it is always false.
type Envelope ¶
Envelope is the interface implemented by objects that encapsulate 'true' torus objects.
type Environment ¶ added in v0.23.0
type Environment struct {
ID *identity.ID `json:"id"`
Version uint8 `json:"version"`
Body *primitive.Environment `json:"body"`
}
Environment wraps primitive.Environment
func (*Environment) GetID ¶ added in v0.23.0
func (e *Environment) GetID() *identity.ID
GetID returns the ID of the contained Environment.
type Keyring ¶ added in v0.23.0
type Keyring struct {
ID *identity.ID `json:"id"`
Version uint8 `json:"version"`
Body *primitive.Keyring `json:"body"`
Signature primitive.Signature `json:"sig"`
}
Keyring wraps primitive.Keyring
func (*Keyring) GetVersion ¶ added in v0.23.0
GetVersion returns the schema version of this Keyring.
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 KeyringMember ¶ added in v0.23.0
type KeyringMember struct {
ID *identity.ID `json:"id"`
Version uint8 `json:"version"`
Body *primitive.KeyringMember `json:"body"`
Signature primitive.Signature `json:"sig"`
}
KeyringMember wraps primitive.KeyringMember
func (*KeyringMember) GetID ¶ added in v0.23.0
func (e *KeyringMember) GetID() *identity.ID
GetID returns the ID of the contained KeyringMember.
type KeyringMemberClaim ¶ added in v0.23.0
type KeyringMemberClaim struct {
ID *identity.ID `json:"id"`
Version uint8 `json:"version"`
Body *primitive.KeyringMemberClaim `json:"body"`
Signature primitive.Signature `json:"sig"`
}
KeyringMemberClaim wraps primitive.KeyringMemberClaim
func (*KeyringMemberClaim) GetID ¶ added in v0.23.0
func (e *KeyringMemberClaim) GetID() *identity.ID
GetID returns the ID of the contained KeyringMemberClaim.
type KeyringMemberV1 ¶ added in v0.23.0
type KeyringMemberV1 struct {
ID *identity.ID `json:"id"`
Version uint8 `json:"version"`
Body *primitive.KeyringMemberV1 `json:"body"`
Signature primitive.Signature `json:"sig"`
}
KeyringMemberV1 wraps primitive.KeyringMemberV1
func (*KeyringMemberV1) GetID ¶ added in v0.23.0
func (e *KeyringMemberV1) GetID() *identity.ID
GetID returns the ID of the contained KeyringMemberV1.
type KeyringV1 ¶ added in v0.23.0
type KeyringV1 struct {
ID *identity.ID `json:"id"`
Version uint8 `json:"version"`
Body *primitive.KeyringV1 `json:"body"`
Signature primitive.Signature `json:"sig"`
}
KeyringV1 wraps primitive.KeyringV1
func (*KeyringV1) GetVersion ¶ added in v0.23.0
GetVersion returns the schema version of this Keyring.
type Machine ¶ added in v0.23.0
type Machine struct {
ID *identity.ID `json:"id"`
Version uint8 `json:"version"`
Body *primitive.Machine `json:"body"`
}
Machine wraps primitive.Machine
type MachineToken ¶ added in v0.23.0
type MachineToken struct {
ID *identity.ID `json:"id"`
Version uint8 `json:"version"`
Body *primitive.MachineToken `json:"body"`
}
MachineToken wraps primitive.MachineToken
func (*MachineToken) GetID ¶ added in v0.23.0
func (e *MachineToken) GetID() *identity.ID
GetID returns the ID of the contained MachineToken.
type Membership ¶ added in v0.23.0
type Membership struct {
ID *identity.ID `json:"id"`
Version uint8 `json:"version"`
Body *primitive.Membership `json:"body"`
}
Membership wraps primitive.Membership
func (*Membership) GetID ¶ added in v0.23.0
func (e *Membership) GetID() *identity.ID
GetID returns the ID of the contained Membership.
type Org ¶ added in v0.23.0
type Org struct {
ID *identity.ID `json:"id"`
Version uint8 `json:"version"`
Body *primitive.Org `json:"body"`
}
Org wraps primitive.Org
type OrgInvite ¶ added in v0.23.0
type OrgInvite struct {
ID *identity.ID `json:"id"`
Version uint8 `json:"version"`
Body *primitive.OrgInvite `json:"body"`
}
OrgInvite wraps primitive.OrgInvite
type Policy ¶ added in v0.23.0
type Policy struct {
ID *identity.ID `json:"id"`
Version uint8 `json:"version"`
Body *primitive.Policy `json:"body"`
}
Policy wraps primitive.Policy
type PolicyAttachment ¶ added in v0.23.0
type PolicyAttachment struct {
ID *identity.ID `json:"id"`
Version uint8 `json:"version"`
Body *primitive.PolicyAttachment `json:"body"`
}
PolicyAttachment wraps primitive.PolicyAttachment
func (*PolicyAttachment) GetID ¶ added in v0.23.0
func (e *PolicyAttachment) GetID() *identity.ID
GetID returns the ID of the contained PolicyAttachment.
type PrivateKey ¶ added in v0.23.0
type PrivateKey struct {
ID *identity.ID `json:"id"`
Version uint8 `json:"version"`
Body *primitive.PrivateKey `json:"body"`
Signature primitive.Signature `json:"sig"`
}
PrivateKey wraps primitive.PrivateKey
func (*PrivateKey) GetID ¶ added in v0.23.0
func (e *PrivateKey) GetID() *identity.ID
GetID returns the ID of the contained PrivateKey.
type Project ¶ added in v0.23.0
type Project struct {
ID *identity.ID `json:"id"`
Version uint8 `json:"version"`
Body *primitive.Project `json:"body"`
}
Project wraps primitive.Project
type PublicKey ¶ added in v0.23.0
type PublicKey struct {
ID *identity.ID `json:"id"`
Version uint8 `json:"version"`
Body *primitive.PublicKey `json:"body"`
Signature primitive.Signature `json:"sig"`
}
PublicKey wraps primitive.PublicKey
type Service ¶ added in v0.23.0
type Service struct {
ID *identity.ID `json:"id"`
Version uint8 `json:"version"`
Body *primitive.Service `json:"body"`
}
Service wraps primitive.Service
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.
func (*Signed) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface for Signed envelopes.
type Team ¶ added in v0.23.0
type Team struct {
ID *identity.ID `json:"id"`
Version uint8 `json:"version"`
Body *primitive.Team `json:"body"`
}
Team wraps primitive.Team
type Token ¶ added in v0.23.0
type Token struct {
ID *identity.ID `json:"id"`
Version uint8 `json:"version"`
Body *primitive.Token `json:"body"`
}
Token wraps primitive.Token
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.
func (*Unsigned) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface for Unsigned envelopes.
type User ¶ added in v0.23.0
type User struct {
ID *identity.ID `json:"id"`
Version uint8 `json:"version"`
Body *primitive.User `json:"body"`
}
User wraps primitive.User
func (*User) Password ¶ added in v0.23.0
func (u *User) Password() *primitive.UserPassword
Password returns the UserPassword for this User.
type UserInf ¶ added in v0.22.0
type UserInf interface {
Envelope
Username() string
Name() string
Email() string
Password() *primitive.UserPassword
Master() *primitive.MasterKey
}
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.
type UserV1 ¶ added in v0.23.0
type UserV1 struct {
ID *identity.ID `json:"id"`
Version uint8 `json:"version"`
Body *primitive.UserV1 `json:"body"`
}
UserV1 wraps primitive.UserV1
func (*UserV1) Password ¶ added in v0.23.0
func (u *UserV1) Password() *primitive.UserPassword
Password returns the UserPassword for this User.