domain

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Post

type Post struct {
	ID        int
	Title     string
	Published bool
	OwnerID   int
	PinnerIDs []int
}

func (*Post) ToList

func (e *Post) ToList() PostList

ToList wraps the Post in a PostList.

type PostList

type PostList []*Post

PostList is a slice of Post.

func (PostList) GetIDs

func (ds PostList) GetIDs() []int

GetIDs returns the ID of each item in the list. Nil elements yield the zero value of the ID type at their index.

type Tag

type Tag struct {
	ID      int
	Name    string
	UserIDs []int
	Users   UserList
}

func (*Tag) ToList

func (e *Tag) ToList() TagList

ToList wraps the Tag in a TagList.

type TagList

type TagList []*Tag

TagList is a slice of Tag.

func (TagList) GetIDs

func (ds TagList) GetIDs() []int

GetIDs returns the ID of each item in the list. Nil elements yield the zero value of the ID type at their index.

type User

type User struct {
	ID                   int
	Name                 string
	Bio                  *string
	Status               UserStatus
	CreatedAt            time.Time
	Username             string
	Score                *int
	ExternalID           uuid.UUID
	UpdatedAt            *time.Time
	Settings             map[string]interface{}
	Labels               map[string]interface{}
	TagNames             []string
	Metadata             UserMetadata
	PostIDs              []int
	Posts                PostList
	PinnedPostID         int
	PinnedPost           *Post
	TagIDs               []int
	Tags                 TagList
	FullName             string
	IsPremium            bool
	ExpiresAt            time.Time
	SubscriptionDuration time.Duration
}

func (*User) ToList

func (e *User) ToList() UserList

ToList wraps the User in a UserList.

type UserList

type UserList []*User

UserList is a slice of User.

func (UserList) GetIDs

func (ds UserList) GetIDs() []int

GetIDs returns the ID of each item in the list. Nil elements yield the zero value of the ID type at their index.

type UserMetadata

type UserMetadata struct {
	Links []string
}

type UserStatus

type UserStatus string
const (
	UserStatusActive   UserStatus = "active"
	UserStatusInactive UserStatus = "inactive"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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