internal

package
v0.1.43 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

type Base[T any] struct {
	Name string
	Key  string

	ToBase  func([]byte) (T, error)
	ToBytes func(T) ([]byte, error)
	Scope   []Option
	// contains filtered or unexported fields
}

func (*Base[T]) Get

func (b *Base[T]) Get() error

func (*Base[T]) GetOrCreate

func (b *Base[T]) GetOrCreate() error

func (*Base[T]) Put

func (b *Base[T]) Put() error

func (*Base[T]) Set

func (b *Base[T]) Set(v T) error

func (*Base[T]) Value

func (b *Base[T]) Value() T

type BaseInterface

type BaseInterface[T any] interface {
	Value() T
	Set(v T) error
}

type Instance

type Instance struct {
	Application uint32
	Function    uint32
}

func (*Instance) Get

func (i *Instance) Get(name string) ([]byte, error)

func (*Instance) GetOrCreate

func (i *Instance) GetOrCreate(name string) ([]byte, error)

func (*Instance) Put

func (i *Instance) Put(name string, value []byte) error

type Number

type Number[T constraints.Unsigned | constraints.Float] struct {
	*Base[T]
}

type NumberInterface

type NumberInterface[T constraints.Unsigned | constraints.Float] interface {
	BaseInterface[T]
}

type Option

type Option func(i *Instance)

type String

type String struct {
	*Base[string]
}

type StringInterface

type StringInterface interface {
	BaseInterface[string]
}

Jump to

Keyboard shortcuts

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