driver

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: BSD-3-Clause Imports: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database interface {
	GetRepositoryByToken(token tokens.RepositoryToken) Repository
	Close() error
}

type Repository

type Repository interface {
	Insert(entity interface{}) (interface{}, error)
	Latest() (interface{}, error)
	UpdateById(id string, update interface{}) (interface{}, error)
	Find(order constants.SortOrder, pagination *entities.Pagination) (int, []interface{}, error)
	FindOneById(id string) (interface{}, error)
	FindOneBy(criteria map[string]interface{}) (interface{}, error)
	FindAll() ([]interface{}, error)
	DeleteById(id string) error
	DeleteBy(field string, operator constants.ComparisonOperator, value interface{}) error
}

type SearchInterface

type SearchInterface interface {
	Update(id string, data interface{}) error
	Delete(entityName, entityId string) error
	Search(entityDefinition interface{}, query string, count, offset int) ([]interface{}, error)
	SearchWithPagination(entityDefinition interface{}, query string, count, offset int) ([]interface{}, int, error)
}

type StaticFileSystemInterface

type StaticFileSystemInterface interface {
	Open(name string) (http.File, error)
}

type StorageClientInterface

type StorageClientInterface interface {
	// Save saves a file to storage. Make sure to close file after it's written
	Save(fileName string, file io.ReadCloser) (string, int64, error)
	Delete(path string) error
	Open(name string) (http.File, error)
}

Jump to

Keyboard shortcuts

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