ds

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: Apache-2.0 Imports: 8 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Get(kind Kind, id string, dst interface{}) error
	GetAll(kind Kind, dst interface{}) error
	Put(kind Kind, id string, src interface{}) error
	Close() error
}

func NewClientWrapper

func NewClientWrapper(project 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) Put

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

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) 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 `json:"id" datastore:"id"`
	Name    string `json:"name" datastore:"name"`
	Created int64  `json:"created" datastore:"created"`
}

type Webhook

type Webhook struct {
	TenantId string `json:"tenant_id" datastore:"tenant_id"`
	Callback string `json:"callback" datastore:"callback"`
	Spec     string `json:"spec" datastore:"spec"`
	Copy     string `json:"copy" datastore:"copy"`
	Created  int64  `json:"created" datastore:"created"`
}

Jump to

Keyboard shortcuts

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