client

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2023 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	ReadResource(ctx context.Context, id string) (*data.Resource, error)
	WriteResource(ctx context.Context, value *data.Resource) error
	UpdateResource(ctx context.Context, value *data.Resource) error
	DeleteResource(ctx context.Context, id string) error
	ReadDataSource(ctx context.Context, id string) (*data.Resource, error)
}

type Local

type Local struct {
	ResourceDirectory string
	DataDirectory     string
}

func (Local) DeleteResource

func (local Local) DeleteResource(ctx context.Context, id string) error

func (Local) ReadDataSource

func (local Local) ReadDataSource(ctx context.Context, id string) (*data.Resource, error)

func (Local) ReadResource

func (local Local) ReadResource(ctx context.Context, id string) (*data.Resource, error)

func (Local) UpdateResource

func (local Local) UpdateResource(ctx context.Context, value *data.Resource) error

func (Local) WriteResource

func (local Local) WriteResource(ctx context.Context, value *data.Resource) error

type State

type State struct {
	DataDirectory string
}

func (State) DeleteResource

func (state State) DeleteResource(ctx context.Context, id string) error

func (State) ReadDataSource

func (state State) ReadDataSource(ctx context.Context, id string) (*data.Resource, error)

func (State) ReadResource

func (state State) ReadResource(ctx context.Context, id string) (*data.Resource, error)

func (State) UpdateResource

func (state State) UpdateResource(ctx context.Context, value *data.Resource) error

func (State) WriteResource

func (state State) WriteResource(ctx context.Context, value *data.Resource) error

Jump to

Keyboard shortcuts

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