mvpm

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 8 Imported by: 2

Documentation

Index

Constants

View Source
const (
	TypeNone        = Type(0)
	TypeUser        = Type(1)
	TypeFirstCustom = Type(100)
)

Variables

This section is empty.

Functions

func ParseKeys

func ParseKeys(s string) ([][]byte, error)

func RegisterType

func RegisterType(at Type, names ...string)

Types

type Keys

type Keys [][]byte

func KeysVar

func KeysVar(v *[][]byte) *Keys

func (Keys) Get

func (v Keys) Get() interface{}

func (Keys) Match added in v0.2.0

func (v Keys) Match(b []byte) bool

func (Keys) MatchString added in v0.2.0

func (v Keys) MatchString(str string) bool

func (*Keys) Set

func (v *Keys) Set(raw string) (err error)

func (Keys) String

func (v Keys) String() string

func (*Keys) UnmarshalJSON added in v0.2.0

func (v *Keys) UnmarshalJSON(b []byte) error

type MigrationID added in v0.2.1

type MigrationID = flake.ID

type MigrationRecord added in v0.2.1

type MigrationRecord struct {
	ID                MigrationID   `msgpack:"-"`
	Name              string        `msgpack:"n"`
	ExecutionTime     time.Time     `msgpack:"@"`
	ExecutionDuration time.Duration `msgpack:"d"`
}

type NamedKeySet

type NamedKeySet struct {
	Keys          map[string][]byte
	ActiveKeyName string
}

func (*NamedKeySet) ActiveKey

func (ks *NamedKeySet) ActiveKey() []byte

type Object

type Object interface {
	flake.IDable
	ObjectType() Type
}

type Ref

type Ref struct {
	Type Type
	ID   flake.ID
}

func ParseRef

func ParseRef(s string) (Ref, error)

func RefTo

func RefTo(obj Object) Ref

func (Ref) IsZero

func (ar Ref) IsZero() bool

func (Ref) MarshalText

func (v Ref) MarshalText() ([]byte, error)

func (Ref) String

func (ar Ref) String() string

func (*Ref) UnmarshalText

func (v *Ref) UnmarshalText(b []byte) error

type StoreAffinity

type StoreAffinity int
const (
	UnknownAffinity StoreAffinity = 0
	SafeReader      StoreAffinity = 1
	SafeWriter      StoreAffinity = 2
	ExclusiveWriter StoreAffinity = 3
	Manual          StoreAffinity = 4
	DBUnused        StoreAffinity = 5
)

func ParseStoreAffinity

func ParseStoreAffinity(s string) (StoreAffinity, error)

func (StoreAffinity) IsWriter

func (v StoreAffinity) IsWriter() bool

func (StoreAffinity) MarshalText

func (v StoreAffinity) MarshalText() ([]byte, error)

func (StoreAffinity) String

func (v StoreAffinity) String() string

func (*StoreAffinity) UnmarshalText

func (v *StoreAffinity) UnmarshalText(b []byte) error

func (StoreAffinity) WantsAutomaticTx added in v0.2.2

func (v StoreAffinity) WantsAutomaticTx() bool

type Type

type Type int

func ParseType

func ParseType(s string) (Type, error)

func (Type) MarshalText

func (v Type) MarshalText() ([]byte, error)

func (Type) String

func (v Type) String() string

func (*Type) UnmarshalText

func (v *Type) UnmarshalText(b []byte) error

type URLOption

type URLOption uint64

func NewURLOption

func NewURLOption(name string) URLOption

func (URLOption) Contains

func (v URLOption) Contains(c URLOption) bool

func (URLOption) String

func (v URLOption) String() string

Jump to

Keyboard shortcuts

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