Documentation ¶
Index ¶
- func RegisterController(v0 *server.V0, c Controller)
- type Controller
- type Resource
- type ResourceType
- type Service
- func (s *Service) GetBackgroundByName(ctx context.Context, name string, resType ResourceType) (*Resource, error)
- func (s *Service) GetBackgrounds(ctx context.Context) ([]Resource, error)
- func (s *Service) GetImageByName(ctx context.Context, name string, resType ResourceType) (*Resource, error)
- func (s *Service) GetImages(ctx context.Context) ([]Resource, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterController ¶
func RegisterController(v0 *server.V0, c Controller)
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func NewController ¶
func NewController(service *Service) Controller
func (*Controller) GetBackgroundByName ¶
func (c *Controller) GetBackgroundByName(ctx *fiber.Ctx, name string, resTypeStr string) error
func (*Controller) GetBackgrounds ¶
func (c *Controller) GetBackgrounds(ctx *fiber.Ctx) error
func (*Controller) GetImageByName ¶
func (c *Controller) GetImageByName(ctx *fiber.Ctx, name string, resTypeStr string) error
func (*Controller) GetImages ¶
func (c *Controller) GetImages(ctx *fiber.Ctx) error
type ResourceType ¶
type ResourceType string
const ( Raw ResourceType = "raw" Thumbnail ResourceType = "thumbnail" )
func ResTypeFromString ¶
func ResTypeFromString(str string) (ResourceType, error)
func (ResourceType) FileName ¶
func (r ResourceType) FileName(base string) string
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(conf *config.Config, repo *avg.VersionRepo) *Service
func (*Service) GetBackgroundByName ¶
func (*Service) GetBackgrounds ¶
func (*Service) GetImageByName ¶
Click to show internal directories.
Click to hide internal directories.