pyrecordbase

package module
v0.0.0-...-0ebef5a Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: BSD-3-Clause Imports: 12 Imported by: 0

README

crecordbase

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EnvPrefix = "$"
	TLSPrefix = "tls://"
)

Functions

This section is empty.

Types

type Entry

type Entry struct {
	Tenant     string              `json:"tenant,omitempty"`
	PrimaryKey string              `json:"primary_key,omitempty"`
	Version    int64               `json:"version,omitempty"`
	CreatedAt  int64               `json:"created_at,omitempty"`
	UpdatedAt  int64               `json:"updated_at,omitempty"`
	DeletedAt  int64               `json:"deleted_at,omitempty"`
	Attributes map[string]string   `json:"attributes,omitempty"`
	Tags       []string            `json:"tags,omitempty"`
	Bins       map[string][]byte   `json:"columns,omitempty"`
	Files      map[string]FileInfo `json:"files,omitempty"`
}

type FileInfo

type FileInfo struct {
	Name      string `json:"name,omitempty"` // could be a path
	Data      []byte `json:"data,omitempty"`
	Size      int32  `json:"size,omitempty"`
	CreatedAt int64  `json:"created_at,omitempty"`
	UpdatedAt int64  `json:"updated_at,omitempty"`
	DeletedAt int64  `json:"deleted_at,omitempty"`
}

type Instance

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

func Connect

func Connect(endpoint, token string, timeoutMillis int) (*Instance, error)

func (*Instance) Close

func (t *Instance) Close()

func (*Instance) Get

func (t *Instance) Get(tenant, primaryKey string, timeoutMillis int) (string, error)

func (*Instance) Merge

func (t *Instance) Merge(msgEntry string, timeoutMillis int) error

func (*Instance) Replace

func (t *Instance) Replace(msgEntry string, timeoutMillis int) error

Jump to

Keyboard shortcuts

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