entities

package
v0.0.0-...-1fa16a9 Latest Latest
Warning

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

Go to latest
Published: May 26, 2023 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const CHALLENGE_MESSAGE string = `` /* 144-byte string literal not displayed */

the message that will be presented to the user in their wallet when signing

Variables

This section is empty.

Functions

This section is empty.

Types

type Challenge

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

func GenerateChallenge

func GenerateChallenge(address string) Challenge

func NewChallenge

func NewChallenge(address string, message string) Challenge

func (*Challenge) Address

func (c *Challenge) Address() string

func (*Challenge) Message

func (c *Challenge) Message() string

type Comment

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

func NewComment

func NewComment(params CommentParams) Comment

func (*Comment) Content

func (c *Comment) Content() string

func (*Comment) CreatedAt

func (c *Comment) CreatedAt() time.Time

func (*Comment) DeletedAt

func (c *Comment) DeletedAt() *time.Time

func (*Comment) Id

func (c *Comment) Id() int64

func (*Comment) Image

func (c *Comment) Image() *Image

func (*Comment) IsDeleted

func (c *Comment) IsDeleted() bool

func (*Comment) RepliedToComment

func (c *Comment) RepliedToComment() *Comment

func (*Comment) SetRepliedToComment

func (c *Comment) SetRepliedToComment(comment *Comment)

func (*Comment) ThreadId

func (c *Comment) ThreadId() int64

func (*Comment) User

func (c *Comment) User() User

func (*Comment) Votes

func (c *Comment) Votes() int64

type CommentParams

type CommentParams struct {
	Id               int64
	RepliedToComment *Comment
	ThreadId         int64
	Content          string
	Image            Image
	User             User
	IsDeleted        bool
	CreatedAt        time.Time
	DeletedAt        *time.Time
	Votes            int64
}

type Image

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

func NewImage

func NewImage(fileName string, url string, contentType string) Image

func (Image) ContentType

func (i Image) ContentType() string

func (Image) FileName

func (i Image) FileName() string

func (Image) Url

func (i Image) Url() string

type Thread

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

func NewThread

func NewThread(params ThreadParams) Thread

func (*Thread) Comments

func (t *Thread) Comments() *[]Comment

returned comments can be nil if not hydrated

func (*Thread) Content

func (t *Thread) Content() string

func (*Thread) CreatedAt

func (t *Thread) CreatedAt() time.Time

func (*Thread) DeletedAt

func (t *Thread) DeletedAt() *time.Time

func (*Thread) Id

func (t *Thread) Id() int64

func (*Thread) Image

func (t *Thread) Image() *Image

func (*Thread) IsDeleted

func (t *Thread) IsDeleted() bool

func (*Thread) SetComments

func (t *Thread) SetComments(comments *[]Comment)

func (*Thread) Title

func (t *Thread) Title() string

func (*Thread) User

func (t *Thread) User() User

func (*Thread) Votes

func (t *Thread) Votes() int64

type ThreadParams

type ThreadParams struct {
	Id        int64
	Title     string
	Content   string
	Image     Image
	User      User
	Comments  *[]Comment
	IsDeleted bool
	CreatedAt time.Time
	DeletedAt *time.Time
	Votes     int64
}

type User

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

func NewUser

func NewUser(params UserParams) User

func (*User) Address

func (u *User) Address() string

func (*User) CreatedAt

func (u *User) CreatedAt() time.Time

func (*User) EnsAvatar

func (u *User) EnsAvatar() *Image

func (*User) EnsName

func (u *User) EnsName() *string

func (*User) Reputation

func (u *User) Reputation() int64

func (*User) UpdatedAt

func (u *User) UpdatedAt() *time.Time

type UserParams

type UserParams struct {
	Address    string
	EnsName    *string
	EnsAvatar  *Image
	Reputation int64
	CreatedAt  time.Time
	UpdatedAt  *time.Time
}

type Vote

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

func NewVote

func NewVote(id int64, address string, value common.VoteValue, voteType common.VoteType, updatedAt int64) Vote

func (*Vote) Address

func (v *Vote) Address() string

func (*Vote) Id

func (v *Vote) Id() int64

func (*Vote) Type

func (v *Vote) Type() common.VoteType

func (*Vote) UpdatedAt

func (v *Vote) UpdatedAt() int64

func (*Vote) Value

func (v *Vote) Value() common.VoteValue

Jump to

Keyboard shortcuts

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