Documentation ¶
Index ¶
- Variables
- type By
- type Domain
- type DomainDB
- type DomainList
- type DynamoConnection
- type DynamoDB
- func (d *DynamoDB) CheckPassword(username string, plainPwd string) error
- func (d *DynamoDB) DeleteAllDomains() error
- func (d *DynamoDB) DeleteByDomain(domain string) (bool, error)
- func (d *DynamoDB) DeleteTLSCacheEntry(key string) error
- func (d *DynamoDB) FetchAll() ([]Domain, error)
- func (d *DynamoDB) FetchAllPaginated(cursor *string) ([]Domain, *string, error)
- func (d *DynamoDB) FetchAllSorted() ([]Domain, error)
- func (d *DynamoDB) FetchByDomain(domain string) (*Domain, error)
- func (d *DynamoDB) GetTLSCache(key string) ([]byte, error)
- func (d *DynamoDB) Import(e *ExportDomains) error
- func (d *DynamoDB) InsertDomain(domain Domain) error
- func (d *DynamoDB) UpdateCertificateData(domain string, data []byte) error
- func (d *DynamoDB) UpdateTLSCache(key string, data []byte) error
- type ExportDomains
- type PathList
- type PathMappingEntry
- type TLSCacheEntry
- type User
Constants ¶
This section is empty.
Variables ¶
var (
// DBTablePrefix holds the db prefix
DBTablePrefix = ""
)
Functions ¶
This section is empty.
Types ¶
type By ¶
type By func(p1, p2 *PathMappingEntry) bool
By is the type of a "less" function that defines the ordering of its arguments.
type Domain ¶
type Domain struct { ID string `json:"id"` Name string `json:"domain"` PathMapping *PathList `json:"paths"` Redirect string `json:"redirect"` Promotable bool `json:"promotable"` Wildcard bool `json:"wildcard"` Certificate string `json:"certificate"` RedirectCode int `json:"code"` Description string `json:"description"` Created string `json:"created"` Modified string `json:"modified"` }
Domain struct as it is received via the request body entry
func (*Domain) GetRedirect ¶
GetRedirect returns calculated routes
type DynamoConnection ¶
type DynamoConnection struct { Endpoint string Key string Secret string TableName string Region string }
DynamoConnection model
type DynamoDB ¶
DynamoDB model
func NewDynamoDB ¶
func NewDynamoDB(c *DynamoConnection, bootstrap bool) (*DynamoDB, error)
NewDynamoDB creates a new instance
func (*DynamoDB) CheckPassword ¶
CheckPassword checks pwd hash on db against entered plain pwd
func (*DynamoDB) DeleteAllDomains ¶
DeleteAllDomains deletes all items from the domains table
func (*DynamoDB) DeleteByDomain ¶
DeleteByDomain items from domains table
func (*DynamoDB) DeleteTLSCacheEntry ¶
DeleteTLSCacheEntry deletes a chache entry
func (*DynamoDB) FetchAllPaginated ¶
FetchAllPaginated items from domains table
func (*DynamoDB) FetchAllSorted ¶
FetchAllSorted returns all items from table with a sorted paths (important for the redirects!)
func (*DynamoDB) FetchByDomain ¶
FetchByDomain items from domains table
func (*DynamoDB) GetTLSCache ¶
GetTLSCache items from tls cache table
func (*DynamoDB) Import ¶
func (d *DynamoDB) Import(e *ExportDomains) error
Import imports a export set
func (*DynamoDB) InsertDomain ¶
InsertDomain stores a domain
func (*DynamoDB) UpdateCertificateData ¶
UpdateCertificateData updates the cert data if a domain entry exist
type ExportDomains ¶
type ExportDomains struct {
Domains []Domain `json:"domains"`
}
ExportDomains model
type PathMappingEntry ¶
PathMappingEntry model
type TLSCacheEntry ¶
TLSCacheEntry model