immuc

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(opts *Options) (*immuc, error)

Init ...

func PadRight

func PadRight(str, pad string, length int) string

PadRight ...

func PrintHealth added in v1.2.3

func PrintHealth(res *schema.DatabaseHealthResponse) string

func PrintKV added in v0.9.0

func PrintKV(
	entry *schema.Entry,
	verified, valueOnly bool,
) string

PrintKV ...

func PrintServerInfo added in v1.3.2

func PrintServerInfo(resp *schema.ServerInfoResponse) string

func PrintSetItem

func PrintSetItem(set []byte, referencedkey []byte, score float64, txhdr *schema.TxHeader, verified bool) string

PrintSetItem ...

func PrintState added in v0.9.0

func PrintState(root *schema.ImmutableState) string

PrintState ...

func PrintTx added in v0.9.0

func PrintTx(tx *schema.Tx, verified bool) string

PrintTx ...

Types

type Client

type Client interface {
	Connect(args []string) error
	Disconnect(args []string) error
	Execute(f func(immuClient client.ImmuClient) (interface{}, error)) (interface{}, error)
	ServerInfo(args []string) (string, error)
	HealthCheck(args []string) (string, error)
	DatabaseHealth(args []string) (string, error)
	CurrentState(args []string) (string, error)
	GetTxByID(args []string) (string, error)
	VerifiedGetTxByID(args []string) (string, error)
	Get(args []string) (string, error)
	VerifiedGet(args []string) (string, error)
	Login(args []string) (string, error)
	Logout(args []string) (string, error)
	History(args []string) (string, error)
	SetReference(args []string) (string, error)
	VerifiedSetReference(args []string) (string, error)
	ZScan(args []string) (string, error)
	Scan(args []string) (string, error)
	Count(args []string) (string, error)
	Set(args []string) (string, error)
	Restore(args []string) (string, error)
	VerifiedSet(args []string) (string, error)
	DeleteKey(args []string) (string, error)
	ZAdd(args []string) (string, error)
	VerifiedZAdd(args []string) (string, error)
	CreateDatabase(args []string) (string, error)
	DatabaseList(args []string) (string, error)
	UseDatabase(args []string) (string, error)
	UserCreate(args []string) (string, error)
	SetActiveUser(args []string, active bool) (string, error)
	SetUserPermission(args []string) (string, error)
	UserList(args []string) (string, error)
	ChangeUserPassword(args []string) (string, error)
	ValueOnly() bool     // TODO: ?
	SetValueOnly(v bool) // TODO: ?
	SQLExec(args []string) (string, error)
	SQLQuery(args []string) (string, error)
	ListTables() (string, error)
	DescribeTable(args []string) (string, error)

	WithFileTokenService(tkns tokenservice.TokenService) Client
}

Client ...

type Options added in v0.7.0

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

func OptionsFromEnv added in v1.3.0

func OptionsFromEnv() *Options

func (*Options) GetImmudbClientOptions added in v1.3.0

func (o *Options) GetImmudbClientOptions() *client.Options

func (*Options) GetRevisionSeparator added in v1.3.0

func (o *Options) GetRevisionSeparator() string

func (*Options) GetValueOnly added in v1.3.0

func (o *Options) GetValueOnly() bool

func (*Options) WithImmudbClientOptions added in v1.3.0

func (o *Options) WithImmudbClientOptions(opts *client.Options) *Options

func (*Options) WithRevisionSeparator added in v1.3.0

func (o *Options) WithRevisionSeparator(revisionSeparator string) *Options

func (*Options) WithValueOnly added in v1.3.0

func (o *Options) WithValueOnly(valueOnly bool) *Options

Jump to

Keyboard shortcuts

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