sql

package
v5.0.0-...-1b49765 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2025 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, driver string, dsn string, prefix string) (config.Store, error)

Types

type DAO

type DAO interface {
	Migrate(ctx context.Context) error
	Get(ctx context.Context) ([]byte, error)
	Set(ctx context.Context, data []byte) error
}

func NewDAO

func NewDAO(db *gorm.DB) DAO

type KV

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

type SQL

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

func (*SQL) As

func (s *SQL) As(out any) bool

func (*SQL) Close

func (s *SQL) Close(_ context.Context) error

func (*SQL) Context

func (s *SQL) Context(ctx context.Context) configx.Values

func (*SQL) Default

func (s *SQL) Default(def any) configx.Values

func (*SQL) Del

func (s *SQL) Del() error

func (*SQL) Done

func (s *SQL) Done() <-chan struct{}

func (*SQL) Get

func (s *SQL) Get() any

func (*SQL) Key

func (s *SQL) Key() []string

func (*SQL) Lock

func (s *SQL) Lock()

func (*SQL) Options

func (s *SQL) Options() *configx.Options

func (*SQL) Save

func (s *SQL) Save(ctxUser, ctxMessage string) error

func (*SQL) Set

func (s *SQL) Set(value interface{}) error

func (*SQL) Unlock

func (s *SQL) Unlock()

func (*SQL) Val

func (s *SQL) Val(path ...string) configx.Values

func (*SQL) Watch

func (s *SQL) Watch(oo ...configx.WatchOption) (configx.Receiver, error)

type URLOpener

type URLOpener struct{}

func (*URLOpener) Open

func (o *URLOpener) Open(ctx context.Context, urlstr string) (config.Store, error)

Jump to

Keyboard shortcuts

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