afs

package
v0.16.2 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: Apache-2.0 Imports: 18 Imported by: 1

Documentation

Index

Constants

View Source
const (
	NotExistStatus = iota
	InUseStatus
	ErrorStatus
	ExistsStatus
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

func NewCache

func NewCache(URL string, ttl time.Duration, signature string, stream *option.Stream, options ...interface{}) (*Cache, error)

NewCache creates new cache.

func (*Cache) AddValues

func (c *Cache) AddValues(ctx context.Context, e *cache.Entry, values []interface{}) error

func (*Cache) AsSource

func (c *Cache) AsSource(ctx context.Context, entry *cache.Entry) (cache.Source, error)

func (*Cache) AssignRows

func (c *Cache) AssignRows(entry *cache.Entry, rows *sql.Rows) error

func (*Cache) Close

func (c *Cache) Close(ctx context.Context, e *cache.Entry) error

func (*Cache) Delete

func (c *Cache) Delete(ctx context.Context, entry *cache.Entry) error

func (*Cache) Get

func (c *Cache) Get(ctx context.Context, SQL string, args []interface{}, options ...interface{}) (*cache.Entry, error)

func (*Cache) IndexBy

func (c *Cache) IndexBy(ctx context.Context, db *sql.DB, column, SQL string, args []interface{}) (int, error)

func (*Cache) Rollback

func (c *Cache) Rollback(ctx context.Context, entry *cache.Entry) error

func (*Cache) UpdateType

func (c *Cache) UpdateType(ctx context.Context, entry *cache.Entry, values []interface{}) (bool, error)

type Source

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

func (*Source) CheckType

func (s *Source) CheckType(ctx context.Context, values []interface{}) (bool, error)

func (*Source) Close

func (s *Source) Close(ctx context.Context) error

func (*Source) ConvertColumns

func (s *Source) ConvertColumns() ([]io.Column, error)

func (*Source) Err added in v0.14.0

func (s *Source) Err() error

func (*Source) Next

func (s *Source) Next() bool

func (*Source) Rollback

func (s *Source) Rollback(ctx context.Context) error

func (*Source) Scanner

func (s *Source) Scanner(context.Context) cache.ScannerFn

func (*Source) XTypes

func (s *Source) XTypes() []*xunsafe.Type

Jump to

Keyboard shortcuts

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