Documentation
¶
Overview ¶
Package apitypes defines types shared between the daemon and its api client.
Index ¶
Constants ¶
const ( BadRequestError = "bad_request" NotFoundError = "not_found" InternalServerError = "internal_server" NotImplementedError = "not_implemented" )
These are the possible error types.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Credential ¶
type Credential struct {
Name string `json:"name"`
OrgID *identity.ID `json:"org_id"`
PathExp *pathexp.PathExp `json:"pathexp"`
ProjectID *identity.ID `json:"project_id"`
Value *CredentialValue `json:"value"`
}
Credential is the body of an unencrypted Credential
type CredentialEnvelope ¶
type CredentialEnvelope struct {
ID *identity.ID `json:"id"`
Version uint8 `json:"version"`
Body *Credential `json:"body"`
}
CredentialEnvelope is an unencrypted credential object with a deserialized body
type CredentialValue ¶
type CredentialValue struct {
// contains filtered or unexported fields
}
CredentialValue is the raw value of a credential.
func (*CredentialValue) IsUnset ¶
func (c *CredentialValue) IsUnset() bool
IsUnset returns if this credential has been unset (deleted)
func (*CredentialValue) String ¶
func (c *CredentialValue) String() string
String returns the string representation of this credential. It panics if the credential was deleted.
func (*CredentialValue) UnmarshalJSON ¶
func (c *CredentialValue) UnmarshalJSON(b []byte) error
UnmarshalJSON implements the json.Unmarshaler interface.
type Environment ¶
type Environment struct {
ID string `json:"id"`
Version int `json:"version"`
Body *primitive.Environment `json:"body"`
}
Environment contains information for creating a new Env object
type ErrorType ¶
type ErrorType string
ErrorType represents the string error types that the daemon and registry can return.
type InviteAccept ¶
type InviteAccept struct {
Org string `json:"org"`
Email string `json:"email"`
Code string `json:"code"`
}
InviteAccept contains data required to accept org invite
type OrgInvite ¶
type OrgInvite struct {
ID string `json:"id"`
Version int `json:"version"`
Body *primitive.OrgInvite `json:"body"`
}
OrgInvite contains information for sending an Org invite
type Profile ¶
type Profile struct {
ID *identity.ID `json:"id"`
Body *struct {
Name string `json:"name"`
Username string `json:"username"`
} `json:"body"`
}
Profile contains the fields in the response for the profiles endpoint
type Service ¶
type Service struct {
ID *identity.ID `json:"id"`
Version int `json:"version"`
Body *primitive.Service `json:"body"`
}
Service contains information for creating a new Service object
type SessionStatus ¶
SessionStatus contains details about the user's daemon session.
type Signup ¶
type Signup struct {
Name string
Username string
Email string
Passphrase string
InviteCode string
OrgName string
OrgInvite bool
}
Signup contains information required for registering an account