image

package
v0.0.0-...-7b086e4 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Image

type Image struct {
	ID       int         `db:"id" json:"id"`
	FileName string      `db:"file_name" json:"file_name"`
	Caption  null.String `db:"caption" json:"caption"`
}

type Store

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

Store stores the dependencies

func NewImageRepo

func NewImageRepo(db *sqlx.DB) *Store

NewImageRepo stores our dependency

func (*Store) AddImage

func (s *Store) AddImage(ctx context.Context, imageParam Image) (Image, error)

func (*Store) DeleteImage

func (s *Store) DeleteImage(ctx context.Context, imageParam Image) error

func (*Store) GetImage

func (s *Store) GetImage(ctx context.Context, imageParam Image) (Image, error)

func (*Store) GetImages

func (s *Store) GetImages(ctx context.Context) ([]Image, error)

Jump to

Keyboard shortcuts

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