dynamodb

package
v1.0.0-beta.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFlags

func AddFlags(cmd *cobra.Command, cfg *config.Config)

func NewDynamoDB

func NewDynamoDB(cfg *config.Config) (provider.Provider, error)

NewDynamoDB creates a new instance

Types

type Domain

type Domain struct {
	ID           string    `json:"id"`
	Name         string    `json:"domain"`
	PathMapping  *PathList `json:"path"`
	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 db entry

type DomainList

type DomainList struct {
	Domains []Domain `json:"domains"`
}

DomainList db entry

type DynamoConnection

type DynamoConnection struct {
	Endpoint  string
	Key       string
	Secret    string
	TableName string
	Region    string
}

DynamoConnection model

type DynamoDB

type DynamoDB struct {
	// contains filtered or unexported fields
}

DynamoDB model

func (*DynamoDB) AllowHostPolicy

func (d *DynamoDB) AllowHostPolicy(ctx context.Context, host string) error

func (*DynamoDB) Bootstrap

func (d *DynamoDB) Bootstrap(ctx context.Context) error

prepareTable checks for the main table

func (*DynamoDB) CreateDomain

func (d *DynamoDB) CreateDomain(ctx context.Context, domain *pb.Domain) (*pb.Domain, error)

CreateDomain creates a domain in DynamoDB.

func (*DynamoDB) Delete

func (d *DynamoDB) Delete(ctx context.Context, key string) error

func (*DynamoDB) DeleteDomain

func (d *DynamoDB) DeleteDomain(ctx context.Context, domain *pb.Domain) (bool, error)

func (*DynamoDB) Get

func (d *DynamoDB) Get(ctx context.Context, key string) ([]byte, error)

func (*DynamoDB) GetDomain

func (d *DynamoDB) GetDomain(ctx context.Context, domain *pb.Domain) (*pb.Domain, error)

func (*DynamoDB) ListDomains

func (d *DynamoDB) ListDomains(ctx context.Context) ([]*pb.Domain, error)

func (*DynamoDB) Name

func (d *DynamoDB) Name() string

func (*DynamoDB) Put

func (d *DynamoDB) Put(ctx context.Context, key string, data []byte) error

func (*DynamoDB) UpdateDomain

func (d *DynamoDB) UpdateDomain(ctx context.Context, domain *pb.Domain) (*pb.Domain, error)

type ExportDomains

type ExportDomains struct {
	Domains []Domain `json:"domains"`
}

ExportDomains model

type PathList

type PathList []PathMappingEntry

PathList model

type PathMappingEntry

type PathMappingEntry struct {
	From string `json:"from"`
	To   string `json:"to"`
}

PathMappingEntry model

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL