store

package
v0.0.0-...-ea178e4 Latest Latest
Warning

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

Go to latest
Published: May 8, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB interface {
	NamedQueryContext(ctx context.Context, query string, arg interface{}) (*sqlx.Rows, error)
	GetContext(ctx context.Context, dest interface{}, query string, args ...interface{}) error
	NamedExecContext(ctx context.Context, query string, arg interface{}) (sql.Result, error)
	ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
	QueryxContext(ctx context.Context, query string, args ...interface{}) (*sqlx.Rows, error)
}

DB represents a type for interfacing with a database.

type RecordStore

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

RecordStore provides functionality for working with a database.

func New

func New(db DB) *RecordStore

New will instantiate a new instance of RecordStore.

func (*RecordStore) GetMedia

func (s *RecordStore) GetMedia(ctx context.Context, id string) (*model.MediaRecord, error)

func (*RecordStore) InsertMedia

func (s *RecordStore) InsertMedia(ctx context.Context, m *model.MediaRecord) (*model.MediaRecord, error)

func (*RecordStore) UpdateMedia

func (s *RecordStore) UpdateMedia(ctx context.Context, m *model.MediaRecord) (*model.MediaRecord, error)

Jump to

Keyboard shortcuts

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