This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
otter-space-sdk/pkg/models/const.go
SoXX 5f9ace9bd3
All checks were successful
Gitea Build Check / Build (push) Successful in 11m38s
feat: implemented all functions
Signed-off-by: SoXX <soxx@fenpa.ws>
2024-07-01 13:42:53 +02:00

49 lines
961 B
Go

package models
import "time"
type AnthroveUserID string
type AnthrovePostID string
type AnthroveSourceID string
type AnthroveSourceDomain string
type AnthrovePostURL string
type AnthroveTagGroupName string
type AnthroveTagAliasName string
type AnthroveTagID string
type AnthroveScrapeTimeInterval int
type AnthroveUserLastScrapeTime time.Time
type Rating string
type TagType string
const (
SFW Rating = "safe"
NSFW Rating = "explicit"
Questionable Rating = "questionable"
Unknown Rating = "unknown"
)
const (
General TagType = "general"
Species TagType = "species"
Character TagType = "character"
Artist TagType = "artist"
Lore TagType = "lore"
Meta TagType = "meta"
Invalid TagType = "invalid"
Copyright TagType = "copyright"
)
func (r *Rating) Convert(e621Rating string) {
switch e621Rating {
case "e":
*r = NSFW
case "q":
*r = Questionable
case "s":
*r = SFW
default:
*r = Unknown
}
}