ds

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2024 License: Apache-2.0 Imports: 9 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNoSuchEntityError added in v0.1.0

func IsNoSuchEntityError(err error) bool

Types

type Client

type Client interface {
	Get(kind Kind, id string, dst interface{}) error
	GetAll(kind Kind, dst interface{}) error
	GetFilter(kind Kind, filters []FilterField, dst interface{}) error
	Put(kind Kind, id string, src interface{}) error
	Close() error
}

func NewClient added in v0.2.6

func NewClient(project string, namespace string) Client

func NewClientAuth added in v0.2.6

func NewClientAuth(project string, namespace string) Client

func NewInMemoryClient

func NewInMemoryClient(data map[Kind]interface{}) Client

type ClientWrapper

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

func (*ClientWrapper) Close added in v0.0.5

func (c *ClientWrapper) Close() error

func (*ClientWrapper) Get

func (c *ClientWrapper) Get(kind Kind, id string, dst interface{}) error

func (*ClientWrapper) GetAll

func (c *ClientWrapper) GetAll(kind Kind, dst interface{}) error

func (*ClientWrapper) GetFilter added in v0.1.0

func (c *ClientWrapper) GetFilter(kind Kind, filters []FilterField, dst interface{}) error

func (*ClientWrapper) Put

func (c *ClientWrapper) Put(kind Kind, id string, src interface{}) error

type FilterField added in v0.1.0

type FilterField struct {
	Name     string
	Operator Operator
	Value    interface{}
}

type InMemoryClient

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

func (*InMemoryClient) Close added in v0.0.5

func (c *InMemoryClient) Close() error

func (*InMemoryClient) Get

func (c *InMemoryClient) Get(kind Kind, id string, dst interface{}) error

func (*InMemoryClient) GetAll

func (c *InMemoryClient) GetAll(kind Kind, dst interface{}) error

func (*InMemoryClient) GetFilter added in v0.1.0

func (c *InMemoryClient) GetFilter(kind Kind, filters []FilterField, dst interface{}) error

func (*InMemoryClient) Put

func (c *InMemoryClient) Put(kind Kind, id string, src interface{}) error

type Kind

type Kind string
const (
	KindTenant  Kind = "tenant"
	KindWebhook Kind = "webhook"
)

type Operator added in v0.2.28

type Operator string
const (
	LessThan    Operator = "<"
	LessEq      Operator = "<="
	Equal       Operator = "="
	GreaterEq   Operator = ">="
	GreaterThan Operator = ">"
	In          Operator = "in"
	NotIn       Operator = "not-in"
	NotEqual    Operator = "!="
)

type Tenant

type Tenant struct {
	Id           string `datastore:"id" json:"id"`
	Name         string `datastore:"name" json:"name"`
	Email        string `datastore:"email" json:"email"`
	Callback     string `datastore:"callback" json:"callback"`
	SlackChannel string `datastore:"slack_channel" json:"slack_channel"`
	Created      int64  `datastore:"created" json:"created"`
	Comment      int64  `datastore:"comment" json:"comment"`
}

type Webhook

type Webhook struct {
	Id        string `datastore:"id" json:"id"`
	Name      string `datastore:"name" json:"name"`
	TenantId  string `datastore:"tenant_id" json:"tenant_id"`
	Spec      string `datastore:"spec" json:"spec"`
	Copy      string `datastore:"copy" json:"copy"`
	Created   int64  `datastore:"created" json:"created"`
	Updated   int64  `datastore:"updated" json:"updated"`
	Owner     string `datastore:"owner" json:"owner"`
	Repo      string `datastore:"repo" json:"repo"`
	Path      string `datastore:"path" json:"path"`
	Branch    string `datastore:"branch" json:"branch"` // revision branch to compare the base spec
	Changelog string `datastore:"changelog" json:"changelog"`
}

Jump to

Keyboard shortcuts

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