dao

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2017 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	EtcdHost string `yaml:"etcd_host"`
	EtcdPort string `yaml:"etcd_port"`
}

type Dao

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

func NewDao

func NewDao(config Config, log *logging.Logger) (*Dao, error)

func (*Dao) BatchGetRaw

func (d *Dao) BatchGetRaw(dir string) (*[]string, error)

TODO: Streaming interface? Going to need to optimize all this for a full-load catalog response of 10k This is more likely to be paged given current proposal In which case, we need paged Batch gets 2 steps? GET /spec/manifest [/*ordered ids*/] BatchGet(offset, count)?

func (*Dao) BatchGetSpecs

func (d *Dao) BatchGetSpecs(dir string) ([]*ansibleapp.Spec, error)

func (*Dao) BatchSetSpecs

func (d *Dao) BatchSetSpecs(specs ansibleapp.SpecManifest) error

func (*Dao) DeleteServiceInstance

func (d *Dao) DeleteServiceInstance(id string) error

func (*Dao) GetRaw

func (d *Dao) GetRaw(key string) (string, error)

func (*Dao) GetServiceInstance

func (d *Dao) GetServiceInstance(id string) (*ansibleapp.ServiceInstance, error)

func (*Dao) GetSpec

func (d *Dao) GetSpec(id string) (*ansibleapp.Spec, error)

func (*Dao) SetRaw

func (d *Dao) SetRaw(key string, val string) error

func (*Dao) SetServiceInstance

func (d *Dao) SetServiceInstance(
	id string, serviceInstance *ansibleapp.ServiceInstance,
) error

func (*Dao) SetSpec

func (d *Dao) SetSpec(id string, spec *ansibleapp.Spec) error

Jump to

Keyboard shortcuts

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