gallery

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FxModule

func FxModule() fx.Option

FxModule teaches a fx.App how to instantiate an art.Service, and also optionally register its HTTP endpoints on api.V1 if provided.

Types

type Art

type Art struct {
	Server    ark.Server `json:"-" gorm:"primaryKey;type:game_server"`
	GalleryID string     `json:"-" gorm:""`
	SortID    int        `json:"-" gorm:""`

	ID          string `json:"id" gorm:"primaryKey;type:text COLLATE numeric;check:id=lower(id)"`
	Name        string `json:"name" gorm:""`
	Description string `json:"description" gorm:""`
	ArtID       string `json:"artID" gorm:"type:text COLLATE numeric;check:id=lower(id)"`
}

func (Art) TableName

func (a Art) TableName() string
type Gallery struct {
	Server ark.Server `json:"-" gorm:"primaryKey;type:game_server"`

	ID          string `json:"id" gorm:"primaryKey;type:text COLLATE numeric;check:id=lower(id)"`
	Name        string `json:"name" gorm:""`
	Description string `json:"description" gorm:""`
	Arts        []Art  `json:"arts" gorm:"foreignKey:Server,GalleryID;references:Server,ID;constraint:OnDelete:CASCADE"`
}

func (Gallery) TableName

func (g Gallery) TableName() string

type Service

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

func (*Service) GetGalleryArtByID

func (s *Service) GetGalleryArtByID(server ark.Server, id string) (*Art, error)

func (*Service) GetGalleryByID

func (s *Service) GetGalleryByID(server ark.Server, id string) (*Gallery, error)

func (*Service) ListGalleries

func (s *Service) ListGalleries(server ark.Server) ([]Gallery, error)

func (*Service) ListGalleryArts

func (s *Service) ListGalleryArts(server ark.Server) ([]Art, error)

func (*Service) Put

func (s *Service) Put(g []Gallery) (err error)

Jump to

Keyboard shortcuts

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