Documentation ¶
Index ¶
- type AddTeamMember
- type Alert
- type AlertList
- type AlertPatch
- type AlertPatchItem
- type AlertPriority
- type AlertType
- type Announcement
- type AnnouncementList
- type ApiError
- type AppListResponse
- type AppMeta
- type AppResponse
- type Asset
- type AssetMetadata
- type Attachment
- type AuthorizeRequest
- type Blog
- type BlogListPost
- type BlogPost
- type BoosterStatus
- type Bot
- type BotFlags
- type BotPack
- type BotSettingsUpdate
- type BotStats
- type Changelog
- type ChangelogEntry
- type CreateBlogPost
- type CreateBot
- type CreateEditTeam
- type CreateReview
- type CreateTeamResponse
- type DiscordBotMeta
- type EditBlogPost
- type EditReview
- type EditTeamMember
- type EntityVote
- type FeaturedUserAlerts
- type GetTestWebhookMeta
- type HCaptchaInfo
- type IndexBot
- type IndexBotPack
- type IndexServer
- type Invite
- type Link
- type ListIndexBot
- type ListIndexServer
- type ListStats
- type Message
- type NotifBrowserInfo
- type NotifGet
- type NotifGetList
- type NotificationInfo
- type OauthMeta
- type PagedResult
- type Partner
- type PartnerList
- type PartnerTypes
- type PatchBotTeam
- type PatchWebhook
- type PaymentPlan
- type PermissionData
- type PermissionDataOverride
- type PermissionResponse
- type PermissionUpdate
- type PlanList
- type Position
- type ProfileUpdate
- type PublishBlogPost
- type Question
- type RandomBots
- type RandomServers
- type Reminder
- type ReminderList
- type ResolvedReminder
- type Review
- type ReviewList
- type SEO
- type SearchFilter
- type SearchQuery
- type SearchResponse
- type Server
- type ServerSettingsUpdate
- type StaffTeam
- type StaffTemplate
- type StaffTemplateList
- type StaffTemplateType
- type StatusDocs
- type TagFilter
- type TagMode
- type Task
- type TaskCreateResponse
- type Team
- type TeamBulkFetch
- type TeamEntities
- type TeamMember
- type TestAuth
- type TestWebhookType
- type TestWebhookVariables
- type Ticket
- type User
- type UserEntityPerms
- type UserExperiment
- type UserLogin
- type UserPerm
- type UserSubscription
- type UserVote
- type ValidVote
- type Vanity
- type VoteInfo
- type VoteWait
- type Webhook
- type WebhookLogEntry
- type WebhookType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddTeamMember ¶
type Alert ¶
type Alert struct { ITag pgtype.UUID `` /* 128-byte string literal not displayed */ URL pgtype.Text `db:"url" json:"url" description:"The URL to send the alert to"` // Optional Message string `db:"message" json:"message" validate:"required"` Type AlertType `db:"type" json:"type" validate:"required,oneof=success error info warning"` Title string `db:"title" json:"title" validate:"required"` CreatedAt pgtype.Timestamptz `db:"created_at" json:"created_at" description:"The alert's creation date"` Acked bool `db:"acked" json:"acked" description:"Whether the alert has been acknowledged"` AlertData map[string]any `db:"alert_data" json:"alert_data"` // Optional Icon string `db:"icon" json:"icon"` // Optional Priority AlertPriority `db:"priority" json:"priority" enum:"1,2,3"` // Optional }
type AlertPatch ¶
type AlertPatch struct {
Patches []AlertPatchItem `json:"patches" validate:"required" description:"List of patches to apply to alerts"`
}
type AlertPatchItem ¶
type AlertPriority ¶
type AlertPriority int
const ( AlertPriorityLow AlertPriority = iota AlertPriorityMedium AlertPriorityHigh )
type Announcement ¶
type Announcement struct { UserID string `db:"author" json:"-"` Author *dovetypes.PlatformUser `json:"author"` // Must be parsed internally ID pgtype.UUID `db:"id" json:"id"` Title string `db:"title" json:"title"` Content string `db:"content" json:"content"` LastModified time.Time `db:"modified_date" json:"last_modified"` Status string `db:"status" json:"status"` Target pgtype.Text `db:"target" json:"target"` }
An announcement
type AnnouncementList ¶
type AnnouncementList struct {
Announcements []Announcement `json:"announcements"`
}
type ApiError ¶
type ApiError struct { Context map[string]string `json:"context,omitempty" description:"Context of the error. Usually used for validation error contexts"` Message string `json:"message" description:"Message of the error"` }
This represents a IBL Popplio API Error
type AppListResponse ¶
type AppListResponse struct {
Apps []AppResponse `json:"apps"`
}
type AppResponse ¶
type AppResponse struct { AppID string `db:"app_id" json:"app_id"` User *dovetypes.PlatformUser `db:"-" json:"user,omitempty"` UserID string `db:"user_id" json:"user_id"` Questions []Question `db:"questions" json:"questions"` Answers map[string]string `db:"answers" json:"answers"` State string `db:"state" json:"state"` CreatedAt time.Time `db:"created_at" json:"created_at"` Position string `db:"position" json:"position"` ReviewFeedback *string `db:"review_feedback" json:"review_feedback"` }
type AssetMetadata ¶
type AssetMetadata struct { Exists bool `json:"exists" description:"Whether the asset exists or not"` Path string `json:"path,omitempty" description:"The path to the asset based on $cdnUrl"` DefaultPath string `json:"default_path" description:"The path to the default asset based on $cdnUrl. May be empty if there is no default asset"` Type string `json:"type,omitempty" description:"Asset type (banner, icon etc.)"` Size int64 `json:"size,omitempty" description:"The size of the asset in bytes, if it exists"` LastModified *time.Time `json:"last_modified,omitempty" description:"The last modified date of the asset, if it exists"` Errors []string `json:"errors,omitempty" description:"Any errors that occurred while trying to get the asset"` }
type Attachment ¶
type Attachment struct { ID string `json:"id"` // ID of the attachment within the ticket Name string `json:"name"` // Name of the attachment ContentType string `json:"content_type"` // Content type of the attachment Size int `json:"size"` // Size of the attachment in bytes Errors []string `json:"errors"` // Non-fatal errors that occurred while uploading the attachment }
type AuthorizeRequest ¶
type AuthorizeRequest struct { ClientID string `json:"client_id" validate:"required"` Code string `json:"code" validate:"required,min=5"` RedirectURI string `json:"redirect_uri" validate:"required"` Protocol string `` /* 152-byte string literal not displayed */ Scope string `json:"scope" validate:"required,oneof=normal ban_exempt external_auth"` }
type Blog ¶
type Blog struct {
Posts []BlogListPost `json:"posts" description:"The list of blog posts on the blog"`
}
type BlogListPost ¶
type BlogListPost struct { Slug string `db:"slug" json:"slug" description:"The slug/vanity of the blog post"` Title string `db:"title" json:"title" description:"The title of the blog post"` Description string `db:"description" json:"description" description:"The summary/short description of the blog post"` UserID string `db:"user_id" json:"-"` // Must be parsed internally Author *dovetypes.PlatformUser `db:"-" json:"author" description:"The author of the blog post"` CreatedAt time.Time `db:"created_at" json:"created_at" description:"The time the blog post was created at"` Draft bool `db:"draft" json:"draft" description:"Whether the blog post is a draft or not (hidden or public)"` Tags []string `db:"tags" json:"tags" description:"The tags of the blog post for filtering purposes"` }
type BlogPost ¶
type BlogPost struct { Slug string `db:"slug" json:"slug" description:"The slug/vanity of the blog post"` Title string `db:"title" json:"title" description:"The title of the blog post"` Description string `db:"description" json:"description" description:"The summary/short description of the blog post"` UserID string `db:"user_id" json:"-"` // Must be parsed internally Author *dovetypes.PlatformUser `db:"-" json:"author" description:"The author of the blog post"` CreatedAt time.Time `db:"created_at" json:"created_at" description:"The time the blog post was created at"` Content string `db:"content" json:"content" description:"The content of the blog post in markdown format"` Draft bool `db:"draft" json:"draft" description:"Whether the blog post is a draft or not (hidden or public)"` Tags []string `db:"tags" json:"tags" description:"The tags of the blog post for filtering purposes"` }
type BoosterStatus ¶
type Bot ¶
type Bot struct { ITag pgtype.UUID `db:"itag" json:"itag" description:"The bot's internal ID. An artifact of database migrations."` BotID string `db:"bot_id" json:"bot_id" description:"The bot's ID"` ClientID string `` /* 149-byte string literal not displayed */ ExtraLinks []Link `db:"extra_links" json:"extra_links" description:"The bot's links that it wishes to advertise"` Tags []string `db:"tags" json:"tags" description:"The bot's tags (e.g. music, moderation, etc.)"` Flags []BotFlags `db:"flags" json:"flags" description:"The bot's flags"` Prefix string `db:"prefix" json:"prefix" description:"The bot's prefix"` User *dovetypes.PlatformUser `db:"-" json:"user" description:"The bot's user information" ci:"internal"` // Must be parsed internally Owner pgtype.Text `db:"owner" json:"-"` MainOwner *dovetypes.PlatformUser `` // Must be parsed internally /* 148-byte string literal not displayed */ Short string `db:"short" json:"short" description:"The bot's short description"` Long string `` /* 135-byte string literal not displayed */ Library string `db:"library" json:"library" description:"The bot's library"` NSFW bool `db:"nsfw" json:"nsfw" description:"Whether the bot is NSFW or not"` Premium bool `db:"premium" json:"premium" description:"Whether the bot is a premium bot or not"` LastStatsPost pgtype.Timestamptz `` /* 126-byte string literal not displayed */ Servers int `db:"servers" json:"servers" description:"The bot's server count"` Shards int `db:"shards" json:"shards" description:"The bot's shard count"` ShardList []int `db:"shard_list" json:"shard_list" description:"The number of servers per shard"` Users int `db:"users" json:"users" description:"The bot's user count"` Votes int `db:"votes" json:"votes" description:"The bot's vote count"` Clicks int `db:"clicks" json:"clicks" description:"The bot's total click count"` UniqueClicks int64 `db:"-" json:"unique_clicks" description:"The bot's unique click count based on SHA256 hashed IPs" ci:"internal"` // Must be parsed internally InviteClicks int `db:"invite_clicks" json:"invite_clicks" description:"The bot's invite click count (via users inviting the bot from IBL)"` Banner *AssetMetadata `db:"-" json:"banner" description:"Banner information/metadata" ci:"internal"` // Must be parsed internally Invite string `db:"invite" json:"invite" description:"The bot's invite URL. Must be present"` Type string `` /* 154-byte string literal not displayed */ VanityRef pgtype.UUID `` /* 146-byte string literal not displayed */ Vanity string `db:"-" json:"vanity" description:"The bot's vanity URL" ci:"internal"` // Must be parsed internally VoteBanned bool `db:"vote_banned" json:"vote_banned" description:"Whether the bot is vote banned or not"` StartPeriod pgtype.Timestamptz `db:"start_premium_period" json:"start_premium_period"` PremiumPeriodLength time.Duration `db:"premium_period_length" json:"premium_period_length" description:"The period of premium for the bot in nanoseconds"` CertReason pgtype.Text `db:"cert_reason" json:"cert_reason" description:"The reason for the bot being certified"` Uptime int `db:"uptime" json:"uptime" description:"The bot's total number of successful uptime checks"` TotalUptime int `db:"total_uptime" json:"total_uptime" description:"The bot's total number of uptime checks"` UptimeLastChecked pgtype.Timestamptz `db:"uptime_last_checked" json:"uptime_last_checked" description:"The bot's last uptime check"` Note pgtype.Text `db:"approval_note" json:"approval_note" description:"The note for the bot's approval"` CreatedAt pgtype.Timestamptz `db:"created_at" json:"created_at" description:"The bot's creation date"` ClaimedBy pgtype.Text `db:"claimed_by" json:"claimed_by" description:"The user who claimed the bot"` LastClaimed pgtype.Timestamptz `db:"last_claimed" json:"last_claimed" description:"The bot's last claimed date"` TeamOwnerID pgtype.UUID `db:"team_owner" json:"-"` TeamOwner *Team `` // Must be parsed internally /* 161-byte string literal not displayed */ CaptchaOptOut bool `` /* 140-byte string literal not displayed */ }
@ci table=bots
Bot represents a bot.
type BotPack ¶
type BotPack struct { Owner string `db:"owner" json:"-" ci:"internal"` ResolvedOwner *dovetypes.PlatformUser `db:"-" json:"owner"` Name string `db:"name" json:"name"` Short string `db:"short" json:"short"` Votes int `db:"votes" json:"votes" description:"The pack's vote count"` Tags []string `db:"tags" json:"tags"` URL string `db:"url" json:"url"` CreatedAt time.Time `db:"created_at" json:"created_at"` Bots []string `db:"bots" json:"bot_ids"` ResolvedBots []IndexBot `db:"-" json:"bots"` }
Represents a Bot Pack
type BotSettingsUpdate ¶
type BotSettingsUpdate struct { Short string `db:"short" json:"short" validate:"required,min=30,max=150" msg:"Short description must be between 30 and 150 characters"` // impld Long string `db:"long" json:"long" validate:"required,min=500" msg:"Long description must be at least 500 characters"` // impld Prefix string `db:"prefix" json:"prefix" validate:"required,min=1,max=10" msg:"Prefix must be between 1 and 10 characters"` // impld Invite string `db:"invite" json:"invite" validate:"required,https" msg:"Invite is required and must be a valid HTTPS URL"` // impld Library string `db:"library" json:"library" validate:"required,min=1,max=50" msg:"Library must be between 1 and 50 characters"` // impld ExtraLinks []Link `db:"extra_links" json:"extra_links" validate:"required" msg:"Extra links must be sent"` // Impld Tags []string `` /* 224-byte string literal not displayed */ NSFW bool `db:"nsfw" json:"nsfw"` CaptchaOptOut bool `db:"captcha_opt_out" json:"captcha_opt_out"` }
type Changelog ¶
type Changelog struct {
Entries []ChangelogEntry `json:"entries" validate:"required,dive,required" description:"The changelog entries."`
}
type ChangelogEntry ¶
type ChangelogEntry struct { Version string `db:"version" json:"version" validate:"required" description:"The version for the changelog entry. (4.3.0 etc.)"` ExtraDescription string `db:"extra_description" json:"extra_description" description:"The extra description for the version, if applicable"` GithubHTML pgtype.Text `db:"github_html" json:"github_html" description:"The Github-backed HTML for the changelog entry."` Published bool `db:"published" json:"published" description:"Whether or not this is a published changelog"` Prerelease bool `db:"prerelease" json:"prerelease" description:"Whether or not this is a prerelease."` Added []string `db:"added" json:"added" validate:"required" description:"The added features for the version."` Updated []string `db:"updated" json:"updated" validate:"required" description:"The changed features for the version."` Removed []string `db:"removed" json:"removed" validate:"required" description:"The removed features for the version."` CreatedAt time.Time `db:"created_at" json:"created_at" description:"The time the changelog entry was created."` }
@ci table=changelogs
Changelogs for the list
type CreateBlogPost ¶
type CreateBlogPost struct { Slug string `` /* 127-byte string literal not displayed */ Title string `db:"title" json:"title" validate:"required" description:"The title of the blog post"` Description string `db:"description" json:"description" validate:"required" description:"The summary/short description of the blog post"` Content string `db:"content" json:"content" validate:"required" description:"The content of the blog post in markdown format"` Tags []string `db:"tags" json:"tags" validate:"required,dive,required" description:"The tags of the blog post for filtering purposes"` }
type CreateBot ¶
type CreateBot struct { BotID string `db:"bot_id" json:"bot_id" validate:"required,numeric" msg:"Bot ID must be numeric"` // impld ClientID string `db:"client_id" json:"client_id" validate:"required,numeric" msg:"Client ID must be numeric"` // impld Short string `db:"short" json:"short" validate:"required,min=30,max=150" msg:"Short description must be between 30 and 150 characters"` // impld Long string `db:"long" json:"long" validate:"required,min=500" msg:"Long description must be at least 500 characters"` // impld Prefix string `db:"prefix" json:"prefix" validate:"required,min=1,max=10" msg:"Prefix must be between 1 and 10 characters"` // impld Invite string `db:"invite" json:"invite" validate:"required,https" msg:"Invite is required and must be a valid HTTPS URL"` // impld Library string `db:"library" json:"library" validate:"required,min=1,max=50" msg:"Library must be between 1 and 50 characters"` // impld ExtraLinks []Link `db:"extra_links" json:"extra_links" validate:"required" msg:"Extra links must be sent"` // Impld Tags []string `` /* 224-byte string literal not displayed */ NSFW bool `db:"nsfw" json:"nsfw"` StaffNote *string `db:"approval_note" json:"staff_note" validate:"omitempty,max=512" msg:"Staff note must be less than 512 characters if sent"` // impld TeamOwner string `db:"-" json:"team_owner" ci:"internal"` // May or may not be present // Not needed to send, resolved in backend Owner string `db:"owner" json:"-"` GuildCount *int `db:"servers" json:"-"` VanityRef pgtype.UUID `db:"vanity_ref" json:"-"` }
@ci table=bots, unfilled=1
CreateBot represents the data sent for the creation of a bot.
type CreateEditTeam ¶
type CreateEditTeam struct { Name string `json:"name" validate:"required,nonvulgar,min=3,max=32" msg:"Team name must be between 3 and 32 characters long"` Short *string `json:"short" validate:"omitempty,max=150" msg:"Short description must be a maximum of 150 characters"` // impld Tags *[]string `` /* 204-byte string literal not displayed */ ExtraLinks *[]Link `json:"extra_links" description:"The team's links that it wishes to advertise"` NSFW *bool `json:"nsfw" description:"Whether the team is NSFW (primarily makes NSFW content)"` }
type CreateReview ¶
type CreateReview struct { Content string `db:"content" json:"content" validate:"required,min=5,max=4000" msg:"Content must be between 5 and 4000 characters"` Stars int32 `db:"stars" json:"stars" validate:"required,min=1,max=5" msg:"Stars must be between 1 and 5 stars"` ParentID string `db:"parent_id" json:"parent_id" validate:"omitempty,uuid" msg:"Parent ID must be a valid UUID if provided"` OwnerReview bool `db:"owner_review" json:"owner_review" description:"Whether or not the review is an owner review"` }
type CreateTeamResponse ¶
type CreateTeamResponse struct {
TeamID string `json:"team_id" description:"The ID of the created team"`
}
type DiscordBotMeta ¶
type DiscordBotMeta struct { BotID string `json:"bot_id" description:"The bot's ID"` ClientID string `json:"client_id" description:"The bot's client ID"` Name string `json:"name" description:"The bot's name"` Avatar string `json:"avatar" description:"The bot's avatar"` ListType string `json:"list_type" description:"If this is empty, then it is not on the list"` GuildCount int `json:"guild_count" description:"The bot's guild count"` BotPublic bool `json:"bot_public" description:"Whether or not the bot is public"` Flags []string `json:"flags" description:"The bot's flags"` Description string `json:"description" description:"The suggested description for the bot"` Tags []string `json:"tags" description:"The suggested tags for the bot"` Fallback bool `json:"fallback" description:"Whether or not we had to fallback to RPC from JAPI.rest"` FetchErrors map[string]string `json:"fetch_errors" description:"The errors that occurred when fetching the bot"` }
type EditBlogPost ¶
type EditBlogPost struct { Title string `db:"title" json:"title" validate:"required" description:"The title of the blog post"` Description string `db:"description" json:"description" validate:"required" description:"The summary/short description of the blog post"` Content string `db:"content" json:"content" validate:"required" description:"The content of the blog post in markdown format"` Tags []string `db:"tags" json:"tags" validate:"required,dive,required" description:"The tags of the blog post for filtering purposes"` }
type EditReview ¶
type EditTeamMember ¶
type EditTeamMember struct { PermUpdate *PermissionUpdate `json:"perm_update" description:"The permissions to update"` Mentionable *bool `` /* 126-byte string literal not displayed */ DataHolder *bool `` /* 194-byte string literal not displayed */ }
type EntityVote ¶
type EntityVote struct { ITag pgtype.UUID `db:"itag" json:"itag" description:"The internal ID of the entity."` TargetType string `db:"target_type" json:"target_type" description:"The type of the entity that was voted on"` TargetID string `db:"target_id" json:"target_id" description:"The ID of the entity that was voted on"` AuthorID string `db:"author" json:"author" description:"The ID of the user who voted"` Upvote bool `db:"upvote" json:"upvote" description:"Whether or not the vote was an upvote"` Void bool `db:"void" json:"void" description:"Whether or not the vote was voided"` VoidReason pgtype.Text `db:"void_reason" json:"void_reason" description:"The reason the vote was voided"` VoidedAt pgtype.Timestamp `db:"voided_at" json:"voided_at" description:"The time the vote was voided, if it was voided"` CreatedAt time.Time `db:"created_at" json:"created_at"` VoteNum int `db:"vote_num" json:"vote_num" description:"The number of the vote (second vote of double vote will have vote_num as 2 etc.)"` }
@ci table=entity_votes
Entity Vote represents a vote on an entity.
type FeaturedUserAlerts ¶
type GetTestWebhookMeta ¶
type GetTestWebhookMeta struct {
Types []TestWebhookType `json:"data" description:"The types of webhooks to test."`
}
type HCaptchaInfo ¶
type HCaptchaInfo struct {
SiteKey string `json:"site_key"`
}
type IndexBot ¶
type IndexBot struct { BotID string `db:"bot_id" json:"bot_id" description:"The bot's ID"` User *dovetypes.PlatformUser `db:"-" json:"user" description:"The bot's user information" ci:"internal"` // Must be parsed internally Short string `db:"short" json:"short" description:"The bot's short description"` Type string `db:"type" json:"type" description:"The bot's type (e.g. pending/approved/certified/denied etc.)"` VanityRef pgtype.UUID `` /* 146-byte string literal not displayed */ Vanity string `db:"-" json:"vanity" description:"The bot's vanity URL" ci:"internal"` // Must be parsed internally Votes int `db:"votes" json:"votes" description:"The bot's vote count"` Shards int `db:"shards" json:"shards" description:"The bot's shard count"` Library string `db:"library" json:"library" description:"The bot's library"` InviteClick int `db:"invite_clicks" json:"invite_clicks" description:"The bot's invite click count (via users inviting the bot from IBL)"` Clicks int `db:"clicks" json:"clicks" description:"The bot's view count"` Servers int `db:"servers" json:"servers" description:"The bot's server count"` NSFW bool `db:"nsfw" json:"nsfw" description:"Whether the bot is NSFW or not"` Tags []string `db:"tags" json:"tags" description:"The bot's tags (e.g. music, moderation, etc.)"` Premium bool `db:"premium" json:"premium" description:"Whether the bot is a premium bot or not"` Banner *AssetMetadata `db:"-" json:"banner" description:"Banner information/metadata" ci:"internal"` // Must be parsed internally }
@ci table=bots, unfilled=1
Represents a 'index bot' (a small subset of the bot object for use in cards etc.)
type IndexBotPack ¶
type IndexBotPack struct { Owner string `db:"owner" json:"owner_id"` Name string `db:"name" json:"name"` Short string `db:"short" json:"short"` Votes int `db:"votes" json:"votes" description:"The pack's vote count"` Tags []string `db:"tags" json:"tags"` URL string `db:"url" json:"url"` CreatedAt time.Time `db:"created_at" json:"created_at"` Bots []string `db:"bots" json:"bot_ids"` }
type IndexServer ¶
type IndexServer struct { ServerID string `db:"server_id" json:"server_id" description:"The server's ID"` Name string `db:"name" json:"name" description:"The server's name"` Avatar string `db:"avatar" json:"avatar" description:"The server's avatar"` TotalMembers int `db:"total_members" json:"total_members" description:"The server's total member count"` OnlineMembers int `db:"online_members" json:"online_members" description:"The server's online member count"` Short string `db:"short" json:"short" description:"The server's short description"` Type string `db:"type" json:"type" description:"The server's type (e.g. pending/approved/certified/denied etc.)"` VanityRef pgtype.UUID `` /* 149-byte string literal not displayed */ Vanity string `db:"-" json:"vanity" description:"The server's vanity URL" ci:"internal"` // Must be parsed internally Votes int `db:"votes" json:"votes" description:"The server's vote count"` InviteClicks int `` /* 126-byte string literal not displayed */ Clicks int `db:"clicks" json:"clicks" description:"The server's view count"` NSFW bool `db:"nsfw" json:"nsfw" description:"Whether the server is NSFW or not"` Tags []string `db:"tags" json:"tags" description:"The server's tags (e.g. music, moderation, etc.)"` Premium bool `db:"premium" json:"premium" description:"Whether the server is a premium server or not"` Banner *AssetMetadata `db:"-" json:"banner" description:"Banner information/metadata" ci:"internal"` // Must be parsed internally }
@ci table=servers, unfilled=1
Represents a 'index server' (a small subset of the server object for use in cards etc.)
type Link ¶
type Link struct { Name string `json:"name" description:"Name of the link. Links starting with an underscore are 'asset links' and are not visible"` Value string `json:"value" description:"Value of the link. Must normally be HTTPS with the exception of 'asset links'"` }
A link is any extra link
type ListIndexBot ¶
type ListIndexBot struct { Certified []IndexBot `json:"certified"` Premium []IndexBot `json:"premium"` MostViewed []IndexBot `json:"most_viewed"` Packs []IndexBotPack `json:"packs"` RecentlyAdded []IndexBot `json:"recently_added"` TopVoted []IndexBot `json:"top_voted"` }
List Index
type ListIndexServer ¶
type ListIndexServer struct { Certified []IndexServer `json:"certified"` Premium []IndexServer `json:"premium"` MostViewed []IndexServer `json:"most_viewed"` RecentlyAdded []IndexServer `json:"recently_added"` TopVoted []IndexServer `json:"top_voted"` }
List Index
type ListStats ¶
type ListStats struct { TotalBots int64 `json:"total_bots" description:"The list of all bots on the list as ListStatsBot objects (partial bot objects)"` TotalApprovedBots int64 `json:"total_approved_bots" description:"The total number of approved bots on the list"` TotalCertifiedBots int64 `json:"total_certified_bots" description:"The total number of certified bots on the list"` TotalStaff int64 `json:"total_staff" description:"The total number of staff members on the list"` TotalUsers int64 `json:"total_users" description:"The total number of users on the list"` TotalVotes int64 `json:"total_votes" description:"The total number of votes on the list"` TotalPacks int64 `json:"total_packs" description:"The total number of packs on the list"` TotalTickets int64 `json:"total_tickets" description:"The total number of tickets created on the list"` }
type Message ¶
type Message struct { ID string `json:"id"` Timestamp time.Time `json:"timestamp"` // Not in DB, but generated from snowflake ID Content string `json:"content"` Embeds []*discordgo.MessageEmbed `json:"embeds"` AuthorID string `json:"author_id"` Author *dovetypes.PlatformUser `json:"author"` Attachments []Attachment `json:"attachments"` }
type NotifBrowserInfo ¶
type NotifBrowserInfo struct { // The OS of the browser OS string `json:"os" description:"The OS of the browser"` Browser string `json:"browser" description:"The browser"` BrowserVer string `json:"browser_ver" description:"The browser version"` Mobile bool `json:"mobile" description:"Whether the browser is on mobile or not"` }
type NotifGet ¶
type NotifGet struct { Endpoint string `db:"endpoint" json:"endpoint" description:"The endpoint for the subscription returned by PushSubscription"` NotifID string `db:"notif_id" json:"notif_id" description:"The ID of the notification"` CreatedAt time.Time `db:"created_at" json:"created_at" description:"The time the notification was created"` UA string `db:"ua" json:"-"` // Must be parsed internally BrowserInfo NotifBrowserInfo `db:"-" json:"browser_info" description:"information about the browser attached to the push notification"` // Must be parsed from UA internally }
Notification
type NotifGetList ¶
type NotifGetList struct {
Notifications []NotifGet `json:"notifications"`
}
type NotificationInfo ¶
type NotificationInfo struct {
PublicKey string `json:"public_key"`
}
type PagedResult ¶
type PagedResult[T any] struct { Count uint64 `json:"count"` PerPage uint64 `json:"per_page"` Results T `json:"results"` }
Paged result common
type Partner ¶
type Partner struct { ID string `db:"id" json:"id" description:"The partners ID" validate:"required"` Name string `db:"name" json:"name" description:"The partners name" validate:"required"` Avatar *AssetMetadata `db:"-" json:"avatar" description:"The partners avatar" ci:"internal"` // Must be parsed internally Short string `db:"short" json:"short" description:"Short description of the partner" validate:"required"` Links []Link `db:"links" json:"links" description:"Links of the partners" validate:"required,min=1,max=2"` Type string `db:"type" json:"type" description:"Type of partner" validate:"required"` CreatedAt time.Time `db:"created_at" json:"created_at" description:"When the partner was created on DB" validate:"required"` UserID string `db:"user_id" json:"-" description:"User ID of the partner. Is an internal field" validate:"required"` User *dovetypes.PlatformUser `db:"-" json:"user" description:"The partner's user information" ci:"internal"` // Must be parsed internally }
@ci table=partners
Partner represents a IBL partner.
type PartnerList ¶
type PartnerList struct { Partners []Partner `json:"partners"` PartnerTypes []PartnerTypes `json:"partner_types"` }
type PartnerTypes ¶
type PartnerTypes struct { ID string `db:"id" json:"id" description:"The partner type ID"` Name string `db:"name" json:"name" description:"The partner type name"` Short string `db:"short" json:"short" description:"Short description of the partner type"` Icon string `db:"icon" json:"icon" description:"Iconify icon of the partner type"` CreatedAt time.Time `db:"created_at" json:"created_at" description:"When the partner type was created on DB"` }
@ci table=partner_types
PartnerTypes represents a IBL partner type.
type PatchBotTeam ¶
type PatchBotTeam struct {
TeamID string `json:"team_id" description:"The team ID to add the bot to"`
}
type PatchWebhook ¶
type PatchWebhook struct { WebhookID string `json:"webhook_id" description:"The ID of the webhook to update. If not set, the webhook will be created."` Name string `json:"name" description:"The name of the webhook."` WebhookURL string `json:"webhook_url" description:"The URL of the webhook."` WebhookSecret string `json:"webhook_secret" description:"The secret of the webhook."` SimpleAuth bool `` /* 126-byte string literal not displayed */ EventWhitelist []string `` /* 134-byte string literal not displayed */ Delete bool `json:"delete" description:"Whether to clear the webhook."` }
type PaymentPlan ¶
type PaymentPlan struct { ID string `json:"id" validate:"required"` Name string `json:"name" validate:"required"` Benefit string `json:"benefit" validate:"required"` // To be fixed TimePeriod int `json:"time_period" validate:"required"` // In seconds Price float32 `json:"price" validate:"required"` // In USD }
type PermissionData ¶
type PermissionDataOverride ¶
type PermissionResponse ¶
type PermissionResponse struct {
Perms []PermissionData `json:"perms"`
}
type PermissionUpdate ¶
type PlanList ¶
type PlanList struct {
Plans []PaymentPlan `json:"plans"`
}
type Position ¶
type Position struct { ID string `json:"id" validate:"required"` Tags []string `json:"tags" validate:"required"` Info string `json:"info" validate:"required"` Name string `json:"name" validate:"required"` Questions []Question `json:"questions" validate:"gt=0,required"` Hidden bool `json:"hidden"` Closed bool `json:"closed"` // Internal fields Channel func() string `json:"-"` ExtraLogic func(d uapi.RouteData, p Position, answers map[string]string) error `json:"-"` PositionDescription func(d uapi.RouteData, p Position) string `json:"-"` // Used for custom position descriptions AllowedForBanned bool `json:"-"` // If true, banned users can apply for this position BannedOnly bool `json:"-"` // If true, only banned users can apply for this position ReviewLogic func(d uapi.RouteData, resp AppResponse, reason string, approved bool) error `json:"-"` // If set, this function will be called when the position is reviewed. If it returns true, the app will be approved/denied }
type ProfileUpdate ¶
type PublishBlogPost ¶
type PublishBlogPost struct {
Draft bool `db:"draft" json:"draft" description:"Whether or not the blog post is a draft or not."`
}
type RandomBots ¶
type RandomBots struct {
Bots []IndexBot `json:"bots"`
}
type RandomServers ¶
type RandomServers struct {
Servers []IndexServer `json:"servers"`
}
type Reminder ¶
type Reminder struct { UserID string `db:"user_id" json:"user_id"` TargetType string `db:"target_type" json:"target_type"` TargetID string `db:"target_id" json:"target_id"` Resolved *ResolvedReminder `db:"-" json:"resolved"` CreatedAt time.Time `db:"created_at" json:"created_at"` LastAcked time.Time `db:"last_acked" json:"last_acked"` }
type ReminderList ¶
type ReminderList struct {
Reminders []Reminder `json:"reminders"`
}
type ResolvedReminder ¶
type Review ¶
type Review struct { ID pgtype.UUID `db:"id" json:"id" description:"The review ID"` TargetType string `db:"target_type" json:"target_type" description:"The target type (bot/server) the review is for"` TargetID string `db:"target_id" json:"target_id" description:"The target ID the review is for"` AuthorID string `db:"author" json:"-" description:"The author ID of the review"` Author *dovetypes.PlatformUser `db:"-" json:"author" description:"The author of the review"` OwnerReview bool `db:"owner_review" json:"owner_review" description:"Whether or not the review is an owner review"` Content string `db:"content" json:"content"` Stars int32 `db:"stars" json:"stars"` CreatedAt time.Time `db:"created_at" json:"created_at"` ParentID pgtype.UUID `db:"parent_id" json:"parent_id"` }
A review is a review on ibl
type ReviewList ¶
type ReviewList struct {
Reviews []Review `json:"reviews"`
}
type SEO ¶
type SEO struct { Name string `json:"name" description:"Name of the entity"` ID string `json:"id" description:"ID of the entity"` Avatar string `json:"avatar" description:"The entities resolved avatar URL (not just hash)"` Short string `json:"short" description:"Short description of the entity"` }
SEO object (minified bot/user/server for seo purposes)
type SearchFilter ¶
type SearchQuery ¶
type SearchQuery struct { Query string `json:"query"` TargetTypes []string `json:"target_types"` // Defaults to 'bot' if unset Servers SearchFilter `json:"servers" msg:"Servers must be a valid filter"` Votes SearchFilter `json:"votes" msg:"Votes must be a valid filter"` Shards SearchFilter `json:"shards" msg:"Shards must be a valid filter"` TotalMembers SearchFilter `json:"total_members" msg:"Total members must be a valid filter"` TagFilter TagFilter `json:"tags" msg:"Tags must be a valid filter"` }
type SearchResponse ¶
type SearchResponse struct { TargetTypes []string `json:"target_types"` Bots []IndexBot `json:"bots"` Servers []IndexServer `json:"servers"` }
type Server ¶
type Server struct { ServerID string `db:"server_id" json:"server_id" description:"The server's ID"` Name string `db:"name" json:"name" description:"The server's name"` Avatar string `db:"avatar" json:"avatar" description:"The server's avatar"` TotalMembers int `db:"total_members" json:"total_members" description:"The server's total member count"` OnlineMembers int `db:"online_members" json:"online_members" description:"The server's online member count"` Short string `db:"short" json:"short" description:"The server's short description"` Long string `` /* 130-byte string literal not displayed */ Type string `db:"type" json:"type" description:"The server's type (e.g. pending/approved/certified/denied etc.)"` State string `db:"state" json:"state" description:"The server's state (public, private, unlisted, defunct)"` Tags []string `db:"tags" json:"tags" description:"The server's tags"` Flags []string `db:"flags" json:"flags" description:"The server's flags"` VanityRef pgtype.UUID `db:"vanity_ref" json:"vanity_ref"` Vanity string `db:"-" json:"vanity" description:"The server's vanity URL" ci:"internal"` // Must be parsed internally ExtraLinks []Link `db:"extra_links" json:"extra_links" description:"The server's links that it wishes to advertise"` TeamOwnerID pgtype.UUID `db:"team_owner" json:"-"` TeamOwner *Team `db:"-" json:"team_owner" description:"If the server is in a team, who owns the server." ci:"internal"` // Must be parsed internally InviteClicks int `` /* 126-byte string literal not displayed */ Banner *AssetMetadata `db:"-" json:"banner" description:"Banner information/metadata" ci:"internal"` // Must be parsed internally Clicks int `db:"clicks" json:"clicks" description:"The server's total click count"` UniqueClicks int64 `db:"-" json:"unique_clicks" description:"The server's unique click count based on SHA256 hashed IPs" ci:"internal"` // Must be parsed internally NSFW bool `db:"nsfw" json:"nsfw" description:"Whether the serber is NSFW or not"` Votes int `db:"votes" json:"votes" description:"The server's vote count"` VoteBanned bool `db:"vote_banned" json:"vote_banned" description:"Whether the server is vote banned or not"` Premium bool `db:"premium" json:"premium" description:"Whether the server is a premium server or not"` StartPeriod pgtype.Timestamptz `db:"start_premium_period" json:"start_premium_period"` PremiumPeriodLength time.Duration `db:"premium_period_length" json:"premium_period_length" description:"The period of premium for the server in nanoseconds"` CaptchaOptOut bool `` /* 143-byte string literal not displayed */ CreatedAt pgtype.Timestamptz `db:"created_at" json:"created_at" description:"The server's creation date"` ClaimedBy pgtype.Text `db:"claimed_by" json:"claimed_by" description:"The user who claimed the server"` LastClaimed pgtype.Timestamptz `db:"last_claimed" json:"last_claimed" description:"The server's last claimed date"` }
@ci table=servers
Server represents a server.
type ServerSettingsUpdate ¶
type ServerSettingsUpdate struct { Short string `db:"short" json:"short" validate:"required,min=30,max=150" msg:"Short description must be between 30 and 150 characters"` // impld Long string `db:"long" json:"long" validate:"required,min=500" msg:"Long description must be at least 500 characters"` // impld ExtraLinks []Link `db:"extra_links" json:"extra_links" validate:"required" msg:"Extra links must be sent"` // Impld State string `` /* 145-byte string literal not displayed */ Tags []string `` /* 224-byte string literal not displayed */ NSFW bool `db:"nsfw" json:"nsfw"` CaptchaOptOut bool `db:"captcha_opt_out" json:"captcha_opt_out"` }
type StaffTemplate ¶
type StaffTemplate struct { ID string `db:"id" json:"id"` Name string `db:"name" json:"name"` Emoji string `db:"emoji" json:"emoji"` Tags []string `db:"tags" json:"tags"` Description string `db:"description" json:"description"` Type string `db:"type" json:"type"` CreatedAt time.Time `db:"created_at" json:"created_at"` }
type StaffTemplateList ¶
type StaffTemplateList struct { TemplateTypes []StaffTemplateType `json:"template_types"` Templates []StaffTemplate `json:"templates"` }
type StaffTemplateType ¶
type StatusDocs ¶
type StatusDocs struct { Key1 string `json:"key1" description:"Some key-value pairs from our status API"` Key2 string `json:"key2" description:"Some key-value pairs from our status API"` Key3 string `json:"key3" description:"Some key-value pairs from our status API"` Etc string `json:"etc" description:"And so on..."` }
type Task ¶
type Task struct { TaskId string `db:"task_id" json:"task_id" validate:"required" description:"The task ID."` TaskKey pgtype.Text `db:"task_key" json:"-" validate:"required" description:"The task key."` AllowUnauthenticated bool `db:"allow_unauthenticated" json:"allow_unauthenticated" description:"Whether the task can be accessed without authentication"` TaskName string `db:"task_name" json:"task_name" validate:"required" description:"The task name."` Output map[string]any `db:"output" json:"output" description:"The task output."` Statuses []map[string]any `db:"statuses" json:"statuses" validate:"required" description:"The task statuses."` ForUser pgtype.Text `db:"for_user" json:"for_user" description:"The user this task is for."` Expiry pgtype.Interval `db:"expiry" json:"expiry" validate:"required" description:"The task expiry."` State string `db:"state" json:"state" validate:"required" description:"The tasks current state (pending/completed etc)."` CreatedAt pgtype.Timestamptz `db:"created_at" json:"created_at" description:"The time the task was created."` }
@ci table=tasks
Tasks are background processes that can be run on the server.
type TaskCreateResponse ¶
type TaskCreateResponse struct { TaskID string `json:"task_id" description:"The ID of the newly created task"` TaskKey pgtype.Text `json:"task_key" description:"The key of the newly created task"` AllowUnauthenticated bool `json:"allow_unauthenticated" description:"Whether the task can be accessed without authentication"` TaskName string `db:"task_name" json:"task_name" validate:"required" description:"The task name."` Expiry pgtype.Interval `db:"expiry" json:"expiry" validate:"required" description:"The task expiry."` }
type Team ¶
type Team struct { ID string `db:"id" json:"id" description:"The ID of the team"` Name string `db:"name" json:"name" description:"The name of the team"` Avatar *AssetMetadata `db:"-" json:"avatar" description:"The avatar of the team"` Banner *AssetMetadata `db:"-" json:"banner" description:"Banner information/metadata"` Short pgtype.Text `db:"short" json:"short" description:"The teams's short description if it has one, otherwise null"` Tags []string `db:"tags" json:"tags" description:"The teams's tags if it has any, otherwise null"` VoteBanned bool `db:"vote_banned" json:"vote_banned" description:"Whether the team is banned from voting"` Votes int `db:"votes" json:"votes" description:"The teams's vote count"` ExtraLinks []Link `db:"extra_links" json:"extra_links" description:"The teams's links that it wishes to advertise"` Entities *TeamEntities `db:"-" json:"entities" description:"The entities of the team"` // Must be handled internally NSFW bool `db:"nsfw" json:"nsfw" description:"Whether the team is NSFW (primarily makes NSFW content)"` VanityRef pgtype.UUID `` /* 147-byte string literal not displayed */ Vanity string `db:"-" json:"vanity" description:"The team's vanity URL" ci:"internal"` // Must be parsed internally }
@ci table=teams
Team represents a team on Infinity List.
type TeamBulkFetch ¶
type TeamBulkFetch struct {
Teams []Team `json:"teams"`
}
type TeamEntities ¶
type TeamEntities struct { Targets []string `json:"targets,omitempty" description:"The targets available in the response"` Members []TeamMember `json:"members,omitempty" description:"Members of the team"` Bots []IndexBot `json:"bots,omitempty" description:"Bots of the team"` Servers []IndexServer `json:"servers,omitempty" description:"Servers of the team"` }
type TeamMember ¶
type TeamMember struct { ITag pgtype.UUID `db:"itag" json:"itag" description:"The ID of the team member"` UserID string `db:"user_id" json:"-" description:"The ID of the user"` User *dovetypes.PlatformUser `db:"-" json:"user" description:"A user object representing the user"` Flags []string `db:"flags" json:"flags" description:"The permissions/flags of the team member"` CreatedAt time.Time `db:"created_at" json:"created_at" description:"The time the team member was added"` Mentionable bool `db:"mentionable" json:"mentionable" description:"Whether the user is mentionable (for alerts in bot-logs etc.)"` DataHolder bool `` /* 194-byte string literal not displayed */ }
type TestWebhookType ¶
type TestWebhookType struct { Type string `json:"type" description:"The type of webhook to test."` Data []TestWebhookVariables }
type TestWebhookVariables ¶
type TestWebhookVariables struct { ID string `json:"id" description:"The ID of the variable."` Name string `json:"name" description:"The name of the variable."` Description string `json:"description" description:"The description of the variable."` Value string `json:"value" description:"The default value of the variable."` Type WebhookType `json:"type" description:"The type of the variable."` }
type Ticket ¶
type Ticket struct { ID string `db:"id" json:"id"` ChannelID string `db:"channel_id" json:"channel_id"` TopicID string `db:"topic_id" json:"topic_id"` Issue string `db:"issue" json:"issue"` TicketContext map[string]string `db:"ticket_context" json:"ticket_context"` Messages []Message `db:"messages" json:"messages"` UserID string `db:"user_id" json:"-"` Author *dovetypes.PlatformUser `db:"-" json:"author"` CloseUserID pgtype.Text `db:"close_user_id" json:"-"` CloseUser *dovetypes.PlatformUser `db:"-" json:"close_user"` Open bool `db:"open" json:"open"` CreatedAt time.Time `db:"created_at" json:"created_at"` EncKey pgtype.Text `db:"enc_key" json:"enc_key"` }
type User ¶
type User struct { ITag pgtype.UUID `db:"itag" json:"itag" description:"The user's internal ID. An artifact of database migrations."` ID string `db:"user_id" json:"-"` User *dovetypes.PlatformUser `db:"-" json:"user" ci:"internal"` // Must be handled internally Experiments []string `db:"experiments" json:"experiments" description:"The experiments the user is in"` Certified bool `db:"certified" json:"certified"` BotDeveloper bool `db:"developer" json:"bot_developer"` BugHunters bool `db:"bug_hunters" json:"bug_hunters"` CaptchaSponsorEnabled bool `db:"captcha_sponsor_enabled" json:"captcha_sponsor_enabled"` ExtraLinks []Link `db:"extra_links" json:"extra_links" description:"The users links that it wishes to advertise"` About pgtype.Text `db:"about" json:"about"` VoteBanned bool `db:"vote_banned" json:"vote_banned"` Banned bool `db:"banned" json:"banned"` UserTeams []Team `db:"-" json:"user_teams" ci:"internal"` // Must be handled internally UserBots []IndexBot `db:"-" json:"user_bots" ci:"internal"` // Must be handled internally UserPacks []IndexBotPack `db:"-" json:"user_packs" ci:"internal"` // Must be handled internally }
@ci table=users
type UserEntityPerms ¶
type UserEntityPerms struct {
Perms []string `json:"perms" description:"The user's permissions on an entity"`
}
type UserExperiment ¶
type UserExperiment string
const (
ServerListingUserExperiment UserExperiment = "SERVER_LISTING"
)
type UserPerm ¶
type UserPerm struct { ID string `db:"user_id" json:"-"` User *dovetypes.PlatformUser `db:"-" json:"user"` // Must be handled internally Experiments []string `db:"experiments" json:"experiments"` Banned bool `db:"banned" json:"banned"` CaptchaSponsorEnabled bool `db:"captcha_sponsor_enabled" json:"captcha_sponsor_enabled"` VoteBanned bool `db:"vote_banned" json:"vote_banned"` }
type UserSubscription ¶
type UserSubscription struct { Auth string `json:"auth" description:"The auth key for the subscription returned by PushSubscription"` P256dh string `json:"p256dh" description:"The p256dh key for the subscription returned by PushSubscription"` Endpoint string `json:"endpoint" description:"The endpoint for the subscription returned by PushSubscription"` }
A user subscription for push notifications
type UserVote ¶
type UserVote struct { HasVoted bool `json:"has_voted" description:"Whether or not the user has voted"` ValidVotes []*ValidVote `json:"valid_votes" description:"Some information about a valid vote"` VoteInfo *VoteInfo `json:"vote_info" description:"Some information about the vote"` Wait *VoteWait `json:"wait" description:"The time until the user can vote again"` }
A user vote is a struct containing basic info on a users vote
type Vanity ¶
type Vanity struct { ITag pgtype.UUID `db:"itag" json:"itag" description:"The vanities internal ID."` TargetID string `db:"target_id" json:"target_id" description:"The ID of the entity"` TargetType string `db:"target_type" json:"target_type" description:"The type of the entity"` Code string `db:"code" json:"code" description:"The code of the vanity"` CreatedAt time.Time `db:"created_at" json:"created_at" description:"The time the vanity was created"` }
type VoteInfo ¶
type VoteInfo struct { PerUser int `json:"per_user" description:"The amount of votes a single vote creates on this entity"` VoteTime uint16 `json:"vote_time" description:"The amount of time in hours until a user can vote again"` }
Vote Info
type VoteWait ¶
type VoteWait struct { Hours int `json:"hours"` Minutes int `json:"minutes"` Seconds int `json:"seconds"` }
Stores the hours, minutes and seconds until the user can vote again
type Webhook ¶
type Webhook struct { ID pgtype.UUID `db:"id" json:"id" description:"The bot's internal ID. An artifact of database migrations."` Name string `db:"name" json:"name" description:"The name of the webhook."` TargetID string `db:"target_id" json:"target_id" description:"The target ID."` TargetType string `db:"target_type" json:"target_type" description:"The target type (bot/team etc.)."` Url string `db:"url" json:"url" description:"The URL of the webhook."` Broken bool `db:"broken" json:"broken" description:"Whether the webhook is broken."` SimpleAuth bool `` /* 143-byte string literal not displayed */ EventWhitelist []string `` /* 155-byte string literal not displayed */ CreatedAt time.Time `db:"created_at" json:"created_at" description:"The time when the webhook was created."` }
@ci table=webhooks
Represents a webhook on IBL
type WebhookLogEntry ¶
type WebhookLogEntry struct { ID pgtype.UUID `db:"id" json:"id" description:"The ID of the webhook log."` WebhookID pgtype.UUID `db:"webhook_id" json:"webhook_id" description:"The ID of the webhook."` TargetID string `db:"target_id" json:"target_id" description:"The target ID."` TargetType string `db:"target_type" json:"target_type" description:"The target type (bot/team etc.)."` UserID string `db:"user_id" json:"-"` User *dovetypes.PlatformUser `db:"-" json:"user" description:"User ID the webhook is intended for" ci:"internal"` // Must be parsed internally URL string `db:"url" json:"url" description:"The URL of the webhook."` Data map[string]any `db:"data" json:"data" description:"The data of the webhook."` Response pgtype.Text `db:"response" json:"response" description:"The response of the webhook request."` CreatedAt time.Time `db:"created_at" json:"created_at" description:"The time when the webhook was created."` State string `db:"state" json:"state" description:"The state of the webhook."` Tries int `db:"tries" json:"tries" description:"The number of send tries attempted on this webhook."` LastTry time.Time `db:"last_try" json:"last_try" description:"The time of the last send try."` BadIntent bool `db:"bad_intent" json:"bad_intent" description:"Whether the webhook was sent with bad intent."` StatusCode int `db:"status_code" json:"status_code" description:"The status code of the webhook request."` }
@ci table=webhook_logs
Webhook log
type WebhookType ¶
type WebhookType = string
const ( WebhookTypeText WebhookType = "text" WebhookTypeTextArray WebhookType = "text[]" WebhookTypeLinkArray WebhookType = "link[]" WebhookTypeNumber WebhookType = "number" WebhookTypeChangeset WebhookType = "changeset" WebhookTypeBoolean WebhookType = "boolean" )