appwrite

package
v0.0.0-...-9e48597 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LIST_METHOD   = "list"
	CREATE_METHOD = "create"
	GET_METHOD    = "get"
	UPDATE_METHOD = "update"
	DELETE_METHOD = "delete"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	Method string                 `validate:"required,oneof=list create get update delete"`
	Opts   map[string]interface{} `validate:"required"`
}

type ActionExecutor

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

func (*ActionExecutor) CreateDoc

func (a *ActionExecutor) CreateDoc() (common.RuntimeResult, error)

func (*ActionExecutor) DeleteDoc

func (a *ActionExecutor) DeleteDoc() (common.RuntimeResult, error)

func (*ActionExecutor) GetDoc

func (a *ActionExecutor) GetDoc() (common.RuntimeResult, error)

func (*ActionExecutor) ListDocs

func (a *ActionExecutor) ListDocs() (common.RuntimeResult, error)

func (*ActionExecutor) UpdateDoc

func (a *ActionExecutor) UpdateDoc() (common.RuntimeResult, error)

type BaseOpts

type BaseOpts struct {
	CollectionID string
	DocumentID   string
}

type Connector

type Connector struct {
	Resource Resource
	Action   Action
}

func (*Connector) GetMetaInfo

func (a *Connector) GetMetaInfo(resourceOptions map[string]interface{}) (common.MetaInfoResult, error)

func (*Connector) Run

func (a *Connector) Run(resourceOptions map[string]interface{}, actionOptions map[string]interface{}, rawActionOptions map[string]interface{}) (common.RuntimeResult, error)

func (*Connector) TestConnection

func (a *Connector) TestConnection(resourceOptions map[string]interface{}) (common.ConnectionResult, error)

func (*Connector) ValidateActionTemplate

func (a *Connector) ValidateActionTemplate(actionOptions map[string]interface{}) (common.ValidateResult, error)

func (*Connector) ValidateResourceOptions

func (a *Connector) ValidateResourceOptions(resourceOptions map[string]interface{}) (common.ValidateResult, error)

type Filter

type Filter struct {
	Attribute string
	Operator  string
	Value     string
}

type ListOpts

type ListOpts struct {
	CollectionID string
	Filter       []Filter
	OrderBy      []Order
	Limit        int
}

type Order

type Order struct {
	Attribute string
	Value     string
}

type Resource

type Resource struct {
	Host       string `validate:"required"`
	ProjectID  string `validate:"required"`
	DatabaseID string `validate:"required"`
	APIKey     string `validate:"required"`
}

type WithDataOpts

type WithDataOpts struct {
	CollectionID string
	DocumentID   string
	Data         map[string]interface{}
}

Jump to

Keyboard shortcuts

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