ds

package
v0.2.9 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 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 string
	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 Tenant

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

type Webhook

type Webhook struct {
	Id       string `datastore:"id"`
	Name     string `datastore:"name"`
	TenantId string `datastore:"tenant_id"`
	Spec     string `datastore:"spec"`
	Copy     string `datastore:"copy"`
	Created  int64  `datastore:"created"`
}

Jump to

Keyboard shortcuts

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