Documentation
¶
Overview ¶
Package account coordinates official-service credentials outside relay handshakes.
Index ¶
- Constants
- Variables
- type Challenge
- type Config
- type Credential
- type FileStore
- type HTTPClient
- type MemoryStore
- type Node
- type Proof
- type Record
- type Service
- func (service *Service) Close()
- func (service *Service) Login(ctx context.Context, username, password string) error
- func (service *Service) RequestEmail(ctx context.Context, email string) error
- func (service *Service) Retry()
- func (service *Service) RevokeCredential(ctx context.Context, credential [16]byte) error
- func (service *Service) SetPassword(ctx context.Context, username, password string) error
- func (service *Service) Snapshot() (Snapshot, <-chan struct{})
- func (service *Service) Source(address string) *Source
- func (service *Service) Start()
- func (service *Service) VerifyEmail(ctx context.Context, code string) error
- type Snapshot
- type Source
- type State
- type Store
Constants ¶
Variables ¶
View Source
var ErrNotConfigured = errors.New("official account service is not configured")
View Source
var ErrSuperseded = errors.New("account changed while the operation was in progress")
Functions ¶
This section is empty.
Types ¶
type Credential ¶
type MemoryStore ¶
type MemoryStore struct {
// contains filtered or unexported fields
}
type Record ¶
type Record struct {
Issuer string `json:"issuer"`
SetupSecret string `json:"setup_secret,omitempty"`
Credential *Credential `json:"credential,omitempty"`
Certificate string `json:"certificate,omitempty"`
Ticket string `json:"ticket,omitempty"`
Entitlement serviceauthority.Entitlement `json:"entitlement"`
Denial string `json:"denial,omitempty"`
Proof *Proof `json:"proof,omitempty"`
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) RequestEmail ¶
func (*Service) RevokeCredential ¶
func (*Service) SetPassword ¶
type Snapshot ¶
type Snapshot struct {
Active bool `json:"active"`
State State `json:"state"`
Account string `json:"account,omitempty"`
Credential string `json:"credential,omitempty"`
Username string `json:"username,omitempty"`
Allowance serviceauthority.Allowance `json:"allowance"`
RemainingBytes uint64 `json:"remaining_bytes"`
ResetAt time.Time `json:"reset_at"`
ValidUntil time.Time `json:"valid_until"`
TicketExpires time.Time `json:"ticket_expires"`
RetryAt time.Time `json:"retry_at"`
Hashes uint64 `json:"hashes,omitempty"`
ProofElapsed time.Duration `json:"proof_elapsed,omitempty"`
Reason string `json:"reason,omitempty"`
}
type Source ¶
type Source struct {
// contains filtered or unexported fields
}
func (*Source) RegistrationAuthorization ¶
func (source *Source) RegistrationAuthorization() serviceauthority.RegistrationAuthorization
Click to show internal directories.
Click to hide internal directories.