subject

package
v0.30.4 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2022 License: AGPL-3.0, AGPL-3.0-only Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertDao

func ConvertDao(s *dao.Subject) (model.Subject, error)

Types

type Filter added in v0.27.4

type Filter struct {
	// if nsfw subject are allowed
	NSFW null.Bool
}

type Repo added in v0.27.4

type Repo interface {
	// Get return a repository model.
	Get(ctx context.Context, id model.SubjectID, filter Filter) (model.Subject, error)
	GetByIDs(ctx context.Context, ids []model.SubjectID, filter Filter) (map[model.SubjectID]model.Subject, error)

	GetPersonRelated(ctx context.Context, personID model.PersonID) ([]domain.SubjectPersonRelation, error)
	GetCharacterRelated(ctx context.Context, characterID model.CharacterID) ([]domain.SubjectCharacterRelation, error)
	GetSubjectRelated(ctx context.Context, subjectID model.SubjectID) ([]domain.SubjectInternalRelation, error)

	GetActors(
		ctx context.Context, subjectID model.SubjectID, characterIDs []model.CharacterID,
	) (map[model.CharacterID][]model.PersonID, error)
}

func NewMysqlRepo

func NewMysqlRepo(q *query.Query, log *zap.Logger) (Repo, error)

type Tag added in v0.21.1

type Tag struct {
	Name  *string `php:"tag_name"`
	Count int     `php:"result,string"`
}

Jump to

Keyboard shortcuts

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