user

package
v0.34.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: AGPL-3.0, AGPL-3.0-only Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CurrentUser added in v0.34.0

type CurrentUser struct {
	Avatar     res.Avatar   `json:"avatar"`
	Sign       string       `json:"sign"`
	URL        string       `json:"url"`
	Username   string       `json:"username"`
	Nickname   string       `json:"nickname"`
	ID         model.UserID `json:"id"`
	UserGroup  uint8        `json:"user_group"`
	TimeOffset int8         `json:"time_offset"`
}

type ReqEpisodeCollectionBatch

type ReqEpisodeCollectionBatch struct {
	EpisodeID []model.EpisodeID            `json:"episode_id"`
	Type      collection.EpisodeCollection `json:"type"`
}

func (ReqEpisodeCollectionBatch) Validate

func (r ReqEpisodeCollectionBatch) Validate() error

type ResUserEpisodeCollection

type ResUserEpisodeCollection struct {
	Episode res.Episode                  `json:"episode"`
	Type    collection.EpisodeCollection `json:"type"`
}

type User

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

func New

func New(
	person person.Repo,
	character character.Repo,
	user user.Repo,
	ctrl ctrl.Ctrl,
	subject subject.Repo,
	collect collections.Repo,
	episode episode.Repo,
	log *zap.Logger,
) (User, error)

func (User) Get

func (h User) Get(c echo.Context) error

func (User) GetAvatar

func (h User) GetAvatar(c echo.Context) error

func (User) GetCharacterCollection added in v0.34.0

func (h User) GetCharacterCollection(c echo.Context) error

func (User) GetCurrent

func (h User) GetCurrent(c echo.Context) error

func (User) GetEpisodeCollection

func (h User) GetEpisodeCollection(c echo.Context) error

func (User) GetPersonCollection added in v0.34.0

func (h User) GetPersonCollection(c echo.Context) error

func (User) GetSubjectCollection

func (h User) GetSubjectCollection(c echo.Context) error

func (User) GetSubjectEpisodeCollection

func (h User) GetSubjectEpisodeCollection(c echo.Context) error

GetSubjectEpisodeCollection return episodes with user's collection info.

func (User) ListCharacterCollection added in v0.34.0

func (h User) ListCharacterCollection(c echo.Context) error

func (User) ListPersonCollection added in v0.34.0

func (h User) ListPersonCollection(c echo.Context) error

func (User) ListSubjectCollection

func (h User) ListSubjectCollection(c echo.Context) error

func (User) PatchEpisodeCollectionBatch

func (h User) PatchEpisodeCollectionBatch(c echo.Context) error

PatchEpisodeCollectionBatch

/v0/users/-/collections/:subject_id/episodes"

func (User) PatchSubjectCollection

func (h User) PatchSubjectCollection(c echo.Context) error

func (User) PostSubjectCollection added in v0.32.9

func (h User) PostSubjectCollection(c echo.Context) error

func (User) PutEpisodeCollection

func (h User) PutEpisodeCollection(c echo.Context) error

PutEpisodeCollection

/v0/users/-/collections/-/episodes/:episode_id

Jump to

Keyboard shortcuts

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