images

package
v0.0.0-...-8bc6207 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2023 License: MIT Imports: 4 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       uint64 `json:"id"`
	FileName string `json:"file_name"`
	Caption  string `json:"caption"`
}

type ImageRepo

type ImageRepo interface {
	GetImageById(id uint64) (Image, error)
	ListAllImages() ([]Image, error)
	AddImage(image *Image) (Image, error)
	DeleteImage(id uint64) error
}

type Store

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

func NewStore

func NewStore(scope *gocb.Scope) *Store

func (*Store) AddImage

func (m *Store) AddImage(i *Image) error

func (*Store) DeleteImage

func (m *Store) DeleteImage(id uint64) error

func (*Store) GetImageById

func (m *Store) GetImageById(id uint64) (i Image, err error)

func (*Store) ListAllImages

func (m *Store) ListAllImages() (i []Image, err error)

Jump to

Keyboard shortcuts

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