store

package
v1.2.9 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(key string) error

Delete .

func Init

func Init(opts ...store.Option)

Init .

func Key

func Key(args ...string) string

Key .

func Read

func Read(key string, valPointer interface{}) error

Read .

func ReadBool

func ReadBool(key string) (result bool, err error)

ReadBool .

func ReadInt

func ReadInt(key string) (result int, err error)

ReadInt .

func ReadString

func ReadString(key string) (result string, err error)

ReadString .

func Write

func Write(key string, val interface{}, opts ...store.WriteOption) error

Write .

Types

type Config

type Config struct {
	Domain string
}

Config .

func NewConfig

func NewConfig() *Config

NewConfig .

func (*Config) Delete

func (c *Config) Delete(key string) error

Delete .

func (*Config) Read

func (c *Config) Read(key string) (string, error)

Read .

func (*Config) Write

func (c *Config) Write(key string, val string, expiry time.Duration) error

Write .

type Register

type Register struct {
	Domain    string
	Extension string
}

Register .

func NewRegister

func NewRegister(domain string, extension string) *Register

NewRegister .

func (*Register) Delete

func (r *Register) Delete() error

Delete .

func (*Register) Read

func (r *Register) Read() (map[string]interface{}, error)

Read .

func (*Register) Write

func (r *Register) Write(data map[string]interface{}) error

Write .

type Route

type Route struct {
	Domain string `json:"domain"`
}

Route .

func NewRoute

func NewRoute(domain string) *Route

NewRoute .

func (*Route) Delete

func (r *Route) Delete() error

Delete .

type Session

type Session struct {
	ID        string `json:"id"`
	Domain    string `json:"domain"`
	CreatedAt string `json:"created_at"`
}

Session .

func NewSession

func NewSession(domain string) *Session

NewSession .

func NewSessionById

func NewSessionById(id string, domain string) *Session

NewSession .

func ReadSession

func ReadSession(id string) *Session

ReadSession .

func (*Session) ReadBool

func (s *Session) ReadBool(key string) bool

ReadBool .

func (*Session) ReadInt

func (s *Session) ReadInt(key string) int

ReadInt .

func (*Session) ReadString

func (s *Session) ReadString(key string) string

ReadString .

func (*Session) Write

func (s *Session) Write(key string, val interface{}) error

Write .

type Setting

type Setting struct {
	Address  string `json:"address"`
	Auth     bool   `json:"auth,string"`
	Password string `json:"password"`
}

Setting .

type Template

type Template struct {
	Section  string
	Context  string
	KeyValue string
	// contains filtered or unexported fields
}

Template .

func NewTemplate

func NewTemplate(section string, keyValue string, context string) *Template

NewTemplate .

func (*Template) Delete

func (t *Template) Delete() error

Delete .

Jump to

Keyboard shortcuts

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