dao

package
v0.0.0-...-ecf3e4b Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PostgresDao

type PostgresDao interface {
	Get() (*[]image.Material, error)
	GetOne(uint) (*image.Material, error)
	Create(*image.Material) error
	Update(*image.Material) error
	Delete(uint) error
}

PostgresDao is an interface for accessing PostgreSQL

func NewPostgres

func NewPostgres(db *gorm.DB) (PostgresDao, error)

NewPostgres is a function that defines a new dao instance

type RedisDao

type RedisDao interface {
	Set(string, string) error
	Get(string) (string, error)
	Flush() error
}

RedisDao is an interface for accessing Redis

func NewRedisDao

func NewRedisDao(c *redis.Client) RedisDao

NewRedisDao creates a new Redis Client

type StorageDao

type StorageDao interface {
	CheckExists(string, string) (bool, error)
	GetObject(string, string) ([]byte, error)
	WriteObject(string, string, string, []byte) error
	RemoveObject(string, string) (bool, error)
}

StorageDao is an interface for managing Cloud Storage

func NewStorage

func NewStorage(c *storage.Client) StorageDao

NewStorage creates a new Cloud Storage Manager

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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