author

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAuthor added in v0.0.5

func CreateAuthor(initStore *lib.InitStore, authorManager *author.Manager) fiber.Handler

CreateAuthor godoc @Summary Create a new author @Description Creates a new author with the specified name @Tags Authors @Accept json @Produce json @Param author body CreateDto true "Author data" @Success 200 {object} CreateDtoResponse @Failure 400 {object} errors.Error @Failure 500 {object} errors.Error @Security BearerAuth @Router /admin/api/author [post]

func CreateAuthorIfNotExistsFor added in v0.0.5

func CreateAuthorIfNotExistsFor(initStore *lib.InitStore, authorManager *author.Manager) fiber.Handler

CreateAuthorIfNotExistsFor godoc @Summary Create an author if not exists for a mapper @Description Creates an author for a mapper if it doesn't exist, otherwise returns existing author ID @Tags Authors @Accept json @Produce json @Param request body CreateAuthorIfNotExistsForRequest true "Author mapper and name" @Success 200 {object} CreateDtoResponse @Failure 400 {object} errors.Error @Failure 500 {object} errors.Error @Security BearerAuth @Router /admin/api/author/createIfNotExistsFor [post]

func GetAuthor added in v0.0.5

func GetAuthor(initStore *lib.InitStore, authorManager *author.Manager) fiber.Handler

GetAuthor godoc @Summary Get an author @Description Returns the information of an author by their ID @Tags Authors @Accept json @Produce json @Param authorId path string true "Author ID" @Success 200 {object} author.Author @Failure 400 {object} errors.Error @Failure 404 {object} errors.Error @Failure 500 {object} errors.Error @Security BearerAuth @Router /admin/api/author/{authorId} [get]

func GetAuthorName added in v0.0.5

func GetAuthorName(initStore *lib.InitStore, authorManager *author.Manager) fiber.Handler

GetAuthorName godoc @Summary Get author name @Description Returns the name of an author @Tags Authors @Accept json @Produce json @Param authorId path string true "Author ID" @Success 200 {object} AuthorNameResponse @Failure 400 {object} errors.Error @Failure 404 {object} errors.Error @Security BearerAuth @Router /admin/api/author/{authorId}/name [get]

func GetAuthorPads added in v0.0.5

func GetAuthorPads(initStore *lib.InitStore, authorManager *author.Manager) fiber.Handler

GetAuthorPads godoc @Summary Get all pads of an author @Description Returns all pad IDs that an author has contributed to @Tags Authors @Accept json @Produce json @Param authorId path string true "Author ID" @Success 200 {array} string @Failure 400 {object} errors.Error @Failure 404 {object} errors.Error @Failure 500 {object} errors.Error @Security BearerAuth @Router /admin/api/author/{authorId}/pads [get]

func Init

func Init(initStore *lib.InitStore)

Types

type AuthorNameResponse added in v0.0.5

type AuthorNameResponse struct {
	AuthorName string `json:"authorName"`
}

AuthorNameResponse represents the response with author name

type CreateAuthorIfNotExistsForRequest added in v0.0.5

type CreateAuthorIfNotExistsForRequest struct {
	AuthorMapper string `json:"authorMapper" validate:"required"`
	Name         string `json:"name"`
}

CreateAuthorIfNotExistsForRequest represents the request to create an author if not exists

type CreateDto

type CreateDto struct {
	Name string `json:"name" validate:"required" example:"John Doe"`
}

CreateDto represents the request to create an author

type CreateDtoResponse

type CreateDtoResponse struct {
	AuthorId string `json:"authorId" example:"a.s8oes9dhwrvt0zif"`
}

CreateDtoResponse represents the response when creating an author

type PadsResponse added in v0.0.5

type PadsResponse struct {
	PadIds []string `json:"padIds"`
}

PadsResponse represents a list of pad IDs

Jump to

Keyboard shortcuts

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