state

package
v0.0.0-...-e31961d Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository struct {
	Redis redis.Redis
	// contains filtered or unexported fields
}

Repository struct

func New

func New(redis redis.Redis) *Repository

New repository

func (*Repository) Delete

func (r *Repository) Delete(ctx context.Context, stateID string) error

Delete state

func (*Repository) Get

func (r *Repository) Get(ctx context.Context, stateID string) (stateentity.State, error)

Get return available state

func (*Repository) Save

func (r *Repository) Save(ctx context.Context, id string, data stateentity.State) error

Save state

func (*Repository) SetExpire

func (r *Repository) SetExpire(ctx context.Context, stateID string, expiryTime time.Duration) error

SetExpire to set expire for state

Jump to

Keyboard shortcuts

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