personas

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option struct {
	Max     uint16 `yaml:"max" json:"max"`
	Storage Storage
}

type Personas

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

func NewPersonas

func NewPersonas(option *Option) (personas *Personas)

func (*Personas) DelProperty added in v0.0.2

func (p *Personas) DelProperty(id string, property uint16) (ok bool, err error)

func (*Personas) Destroy added in v0.0.2

func (p *Personas) Destroy(id string) (ok bool, err error)

func (*Personas) Exists

func (p *Personas) Exists(data []byte, property uint16) (exists bool)

func (*Personas) GetProperty

func (p *Personas) GetProperty(id string, property uint16) (exists bool, err error)

func (*Personas) Load added in v0.0.2

func (p *Personas) Load(id string) (data []byte, err error)

func (*Personas) SetProperty

func (p *Personas) SetProperty(id string, property uint16, value bool) (ok bool, err error)

type Storage

type Storage interface {
	Load(id string) (data []byte, err error)
	Set(id string, property uint16, value bool) (ok bool, err error)
	Get(id string, property uint16) (exists bool, err error)
	Destroy(id string) (ok bool, err error)
}

func NewRedisPersonas

func NewRedisPersonas(driver *redis.Group, prefix string) (storage Storage)

Jump to

Keyboard shortcuts

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