Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TimeOrNil ¶
func TimeOrNil(d *DateTimeLocal) *time.Time
Types ¶
type CustomEmbed ¶
type CustomEmbed struct {
Title *string `json:"title" validate:"omitempty,min=1,max=256"`
Description *string `json:"description" validate:"omitempty,min=1,max=4096"`
Url *string `json:"url" validate:"omitempty,url,max=255"`
Colour Colour `json:"colour" validate:"gte=0,lte=16777215"`
Author Author `json:"author" validate:"dive"`
ImageUrl *string `json:"image_url" validate:"omitempty,max=255"`
ThumbnailUrl *string `json:"thumbnail_url" validate:"omitempty,max=255"`
Timestamp *DateTimeLocal `json:"timestamp" validate:"omitempty"`
Fields []Field `json:"fields" validate:"dive,max=25"`
}
func NewCustomEmbed ¶
func NewCustomEmbed(c *database.CustomEmbed, fields []database.EmbedField) *CustomEmbed
func (*CustomEmbed) IntoDatabaseStruct ¶
func (c *CustomEmbed) IntoDatabaseStruct() (*database.CustomEmbed, []database.EmbedField)
func (*CustomEmbed) IntoDiscordEmbed ¶
func (c *CustomEmbed) IntoDiscordEmbed() *embed.Embed
func (*CustomEmbed) TotalCharacterCount ¶
func (c *CustomEmbed) TotalCharacterCount() int
TotalCharacterCount returns the total number of characters in the embed
type DateTimeLocal ¶
func NewDateTimeLocalFromPtr ¶
func NewDateTimeLocalFromPtr(t *time.Time) *DateTimeLocal
func (DateTimeLocal) MarshalJSON ¶
func (d DateTimeLocal) MarshalJSON() ([]byte, error)
func (DateTimeLocal) Time ¶
func (d DateTimeLocal) Time() time.Time
func (*DateTimeLocal) UnmarshalJSON ¶
func (d *DateTimeLocal) UnmarshalJSON(b []byte) error
type Int64StringSlice ¶
type Int64StringSlice []int64
func (Int64StringSlice) MarshalJSON ¶
func (slice Int64StringSlice) MarshalJSON() ([]byte, error)
func (*Int64StringSlice) UnmarshalJSON ¶
func (slice *Int64StringSlice) UnmarshalJSON(b []byte) error
type UInt64StringSlice ¶
type UInt64StringSlice []uint64
func (UInt64StringSlice) MarshalJSON ¶
func (slice UInt64StringSlice) MarshalJSON() ([]byte, error)
func (*UInt64StringSlice) UnmarshalJSON ¶
func (slice *UInt64StringSlice) UnmarshalJSON(b []byte) error
Click to show internal directories.
Click to hide internal directories.