store

package
v0.0.0-...-d4a65ec Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemoryStore

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

func NewMemoryStore

func NewMemoryStore(id string) *MemoryStore

func (*MemoryStore) ReadAllEncodedAST

func (s *MemoryStore) ReadAllEncodedAST(id string) ([][]byte, error)

func (*MemoryStore) ReadSchema

func (s *MemoryStore) ReadSchema() (*dsl.DSL, error)

func (*MemoryStore) ReadVariables

func (s *MemoryStore) ReadVariables(id string) ([]dsl.Variable, error)

func (*MemoryStore) Reset

func (s *MemoryStore) Reset() error

func (*MemoryStore) WriteAllEncodedAST

func (s *MemoryStore) WriteAllEncodedAST(id string, allEncodedAST [][]byte) error

func (*MemoryStore) WriteSchema

func (s *MemoryStore) WriteSchema(dsl *dsl.DSL) error

func (*MemoryStore) WriteVariables

func (s *MemoryStore) WriteVariables(id string, variables []dsl.Variable) error

type RedisStore

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

func NewRedisStore

func NewRedisStore(id string, redisClient *redis.Client) *RedisStore

func (*RedisStore) ReadAllEncodedAST

func (s *RedisStore) ReadAllEncodedAST(id string) ([][]byte, error)

func (*RedisStore) ReadSchema

func (s *RedisStore) ReadSchema() (*dsl.DSL, error)

func (*RedisStore) ReadVariables

func (s *RedisStore) ReadVariables(id string) ([]dsl.Variable, error)

func (*RedisStore) Reset

func (s *RedisStore) Reset() error

func (*RedisStore) WriteAllEncodedAST

func (s *RedisStore) WriteAllEncodedAST(id string, allEncodedAST [][]byte) error

func (*RedisStore) WriteSchema

func (s *RedisStore) WriteSchema(dsl *dsl.DSL) error

func (*RedisStore) WriteVariables

func (s *RedisStore) WriteVariables(id string, variables []dsl.Variable) error

type Store

type Store interface {
	Reset() error
	WriteSchema(*dsl.DSL) error
	ReadSchema() (*dsl.DSL, error)
	WriteVariables(string, []dsl.Variable) error
	ReadVariables(string) ([]dsl.Variable, error)
	WriteAllEncodedAST(string, [][]byte) error
	ReadAllEncodedAST(string) ([][]byte, error)
}

Jump to

Keyboard shortcuts

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