catalog

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2016 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//Catalog
	CodeCatalogGetCatalogError    = "404-15031"
	CodeCatalogListCatalogError   = "503-15032"
	CodeCatalogInvalidUser        = "401-15033"
	CodeCatalogInvalidCatalogId   = "400-15034"
	CodeCatalogInvalidParam       = "400-15035"
	CodeCatalogInvalidIcon        = "400-15036"
	CodeCatalogDeleteFailed       = "503-15037"
	CodeCatalogForbiddenOperation = "403-15038"
	CodeCatalogUpdateFailed       = "503-15039"
	CodeCatalogCreateFailed       = "503-15040"
)
View Source
const (
	CATALOG_SYSTEM_DEFAULT = 0
	CATALOG_USER_CUSTOM    = 1
)

Variables

This section is empty.

Functions

func ImageHandle

func ImageHandle(request *http.Request) (string, error)

func Init

func Init(dbClient *gorm.DB)

Types

type Catalog

type Catalog struct {
	ID          uint64 `json:"Id"`
	Name        string `json:"Name"`
	Bundle      string `json:"Bundle" gorm:"size:65532"`
	Description string `json:"Description" gorm:"size:65532"`
	IconData    string `json:"IconData" gorm:"size:65532"`
	AccountId   uint64 `json:"AccountId"`
	Type        uint8  `json:"Type"`
}

type CatalogApi

type CatalogApi struct {
	CatalogPath string
	DbClient    *gorm.DB
}

func (*CatalogApi) ApiRegister

func (catalogApi *CatalogApi) ApiRegister(router *gin.Engine, middlewares ...gin.HandlerFunc)

func (*CatalogApi) CreateCatalog

func (catalogApi *CatalogApi) CreateCatalog(ctx *gin.Context)

func (*CatalogApi) Delete

func (catalogApi *CatalogApi) Delete(catalogId uint64) error

func (*CatalogApi) DeleteCatalog

func (catalogApi *CatalogApi) DeleteCatalog(ctx *gin.Context)

func (*CatalogApi) Get

func (catalogApi *CatalogApi) Get(catalogId uint64) (Catalog, error)

func (*CatalogApi) GetCatalog

func (catalogApi *CatalogApi) GetCatalog(ctx *gin.Context)

func (*CatalogApi) List

func (catalogApi *CatalogApi) List() ([]Catalog, error)

func (*CatalogApi) ListCatalog

func (catalogApi *CatalogApi) ListCatalog(ctx *gin.Context)

func (*CatalogApi) Save

func (catalogApi *CatalogApi) Save(catalog *Catalog) error

func (*CatalogApi) Update

func (catalogApi *CatalogApi) Update(catalog *Catalog) error

func (*CatalogApi) UpdateCatalog

func (catalogApi *CatalogApi) UpdateCatalog(ctx *gin.Context)

Jump to

Keyboard shortcuts

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