storage

package
v0.0.0-...-6c8972c Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// NotFound is returned when the requested resource does not exist.
	NotFound = status.Error(codes.NotFound, "not found")
	// Conflict is returned when trying to create the same resource twice.
	Conflict = status.Error(codes.AlreadyExists, "conflict")
	// Triggers when request arguments are invalid
	InvalidArgument = status.Error(codes.InvalidArgument, "invalid arguments")
)
View Source
var ErrNotFound = errors.New("not found")

Functions

This section is empty.

Types

type ActiveStatus

type ActiveStatus int32
const (
	Active ActiveStatus
	Inactive
)

type Brand

type Brand struct {
	ID     string `db:"id"`
	Name   string `db:"name"`
	Status int32  `db:"status"`
	Count  int32
	CRUDTimeDate
}

type CRUDTimeDate

type CRUDTimeDate struct {
	CreatedAt time.Time      `db:"created_at,omitempty"`
	CreatedBy string         `db:"created_by"`
	UpdatedAt time.Time      `db:"updated_at,omitempty"`
	UpdatedBy string         `db:"updated_by,omitempty"`
	DeletedAt sql.NullTime   `db:"deleted_at,omitempty"`
	DeletedBy sql.NullString `db:"deleted_by,omitempty"`
}

type Category

type Category struct {
	ID     string `db:"id"`
	Name   string `db:"name"`
	Status int32  `db:"status"`
	Count  int32
	CRUDTimeDate
}

type ListBrandFilter

type ListBrandFilter struct {
	SortBy       string
	SearchTerm   string
	Limit        int32
	Offset       int32
	Status       ActiveStatus
	SortByColumn string
	StartDate    string
	EndDate      string
}

type ListCategoryFilter

type ListCategoryFilter struct {
	SortBy       string
	SearchTerm   string
	Limit        int32
	Offset       int32
	Status       ActiveStatus
	SortByColumn string
	StartDate    string
	EndDate      string
}

type ListRecipeFilter

type ListRecipeFilter struct {
	SortBy       string
	SearchTerm   string
	Limit        int32
	Offset       int32
	Status       ActiveStatus
	SortByColumn string
	StartDate    string
	EndDate      string
}

type Recipe

type Recipe struct {
	ID               string    `db:"id"`
	Title            string    `db:"title"`
	Ingredient       string    `db:"ingredient"`
	Image            string    `db:"image"`
	Description      string    `db:"description"`
	UserID           string    `db:"user_id"`
	AuthorSocialLink string    `db:"author_social_link"`
	ReadCount        int32     `db:"read_count"`
	ServingAmount    int32     `db:"serving_amount"`
	CookingTime      time.Time `db:"cooking_time"`
	IsUsed           int32     `db:"is_used"`
	Status           int32     `db:"status"`
	Count            int32
	CRUDTimeDate
}

type ResAct

type ResAct struct {
	Resource string
	Action   string
	Public   bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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