Documentation ¶
Index ¶
- type ConfigerNewer
- type IndexAlias
- type IndexAliases
- type Storer
- func (s *Storer) Close() error
- func (s *Storer) Delete(alias, domain string) error
- func (s *Storer) Description() string
- func (s *Storer) Get(a, d string) (*alias.Alias, error)
- func (s *Storer) Open(readOnly bool) error
- func (s *Storer) Put(alias alias.Alias, updateModified bool) error
- func (s *Storer) Search(f alias.Filter, matchAnyRegexp bool) (alias.Aliases, error)
- func (s *Storer) Suspend(alias, domain string) error
- func (s *Storer) Type() string
- func (s *Storer) Unsuspend(alias, domain string) error
- func (s *Storer) Update(alias alias.Alias, updateModified bool) error
- Bugs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigerNewer ¶
type ConfigerNewer struct{}
ConfigerNewer implements the factory methods for the s3 provider.
func (*ConfigerNewer) Config ¶
func (cn *ConfigerNewer) Config() error
Config takes input from the user to configure the s3 provider.
type IndexAlias ¶
type IndexAlias struct { Alias string `json:"alias"` Domain string `json:"domain"` EmailAddresses []string `json:"email_addresses"` Description string `json:"description"` Suspended bool `json:"suspended"` CreatedTS metadataTime `json:"created_ts"` ModifiedTS metadataTime `json:"modified_ts"` SuspendedTS metadataTime `json:"suspended_ts"` }
IndexAlias represents an alias as stored in the S3 index blob
func (*IndexAlias) FromAlias ¶
func (ia *IndexAlias) FromAlias(a alias.Alias)
FromAlias converts an Alias to an internal S3 representation of an alias
func (*IndexAlias) ToAlias ¶
func (ia *IndexAlias) ToAlias() alias.Alias
ToAlias converts the internal S3 representation of an alias to an Alias
type IndexAliases ¶
type IndexAliases []IndexAlias
IndexAliases represent an array of aliases in the S3 index blob
type Storer ¶
type Storer struct {
// contains filtered or unexported fields
}
Storer implements the storage provder methods and state for the s3 provider.
func (*Storer) Close ¶
Close updates the index stored in S3 if the MD5 sum of the index JSON and key MD5 sum are different. An error is returned if there is a failure interacting with S3.
func (*Storer) Delete ¶
Delete removes the S3 key representing the alias. An error is returned if there is a failure interacting with S3.
func (*Storer) Description ¶
Description returns the description of the provider this package implements
func (*Storer) Get ¶
Get HEADs a key in S3 and returns a pointer to an Alias. An error is returned if there is a failure interacting with S3.
func (*Storer) Open ¶
Open prepares the s3 provider for use. The bucket will be listed and if the alias key is the newest key in the bucket listing, the index file is loaded. Otherwise, all alias keys are HEADed and their metadata is extracted and assembled into a slice of aliases. An error is returned if there is a failure interacting with S3.
func (*Storer) Put ¶
Put PUTs an Alias' content into an S3 key. The alias fields are stored in the key metadata. An error is returned if there is a failure interacting with S3.
func (*Storer) Search ¶
Search applies the filter to the internal map of aliases and returns a sorted list of aliases that match the filter criteria.
func (*Storer) Suspend ¶
Suspend updates the S3 key representing the alias with the suspended flag and updates the suspended timestamp. An error is returned if there is a failure interacting with S3.
Notes ¶
Bugs ¶
make configurable
pass the error back with the result...