mongo

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: 10 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 NewMongo

func NewMongo(cfg *config.Config, l lru.Cache) (provider.Provider, error)

NewMongo creates a new instance of the MongoDB provider

Types

type Cachable

type Cachable struct {
	Key  string
	Data []byte
}

type Mongo

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

Mongo

func (*Mongo) AllowHostPolicy

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

func (*Mongo) Bootstrap

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

prepareTable checks for the main table

func (*Mongo) CreateDomain

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

CreateDomain creates a domain in DynamoDB.

func (*Mongo) Delete

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

func (*Mongo) DeleteDomain

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

func (*Mongo) Get

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

func (*Mongo) GetDomain

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

func (*Mongo) ListDomains

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

func (*Mongo) Name

func (d *Mongo) Name() string

Name returns the name of the provider

func (*Mongo) Put

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

func (*Mongo) UpdateDomain

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

Jump to

Keyboard shortcuts

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