Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var StructureTypes = []StructureType{ StructureObject, StructureEvent, StructureProperties, }
Functions ¶
This section is empty.
Types ¶
type Document ¶
type Document struct {
Structures []Structure
}
Document represents a single Markdown page.
type Structure ¶
type Structure struct { Name string RawName string Type StructureType Fields []Field }
Structure is a single structure, typically represented by a Markdown table.
func NewStructure ¶
NewStructure creates a new structure from the raw name taken from a table cell. If the structure type cannot be derived from the given name, then a zero-value Structure is returned.
type StructureType ¶
type StructureType string
const ( StructureObject StructureType = "Structure" StructureEvent StructureType = "Event Fields" StructureProperties StructureType = "Properties" )
type Type ¶
type Type struct { Names []TypeName // or types Array bool ArraySize int // 0 == slice/not an array Nullable bool RawText string }
Type represents a type for each field. Types may be duplicated or slightly different from other types elsewhere in other fields and structures.
type TypeName ¶
type TypeName string
TypeName represents a short, normalized type name. These names are normalized on a best effort basis; they may not cover every single edge case in the documentation. As such, one shouldn't rely on the uniqueness of those names too much and instead handle unknown type names (edge cases) appropriately.
const ( TypeSnowflake TypeName = "snowflake" TypeString TypeName = "string" TypeInteger TypeName = "integer" // also "int" TypeBoolean TypeName = "boolean" TypeArray TypeName = "array" // use ParseTypeName to handle this. TypeMixed TypeName = "mixed" TypeObject TypeName = "object" // this is a thing and I don't know why. TypeImageData TypeName = "image data" TypeTimestamp TypeName = "ISO8601 timestamp" )
Primitives.
const ( TypeUser TypeName = "user" TypeRole TypeName = "role" TypeEmoji TypeName = "emoji" TypeParty TypeName = "party" TypeAssets TypeName = "assets" TypeAccount TypeName = "account" TypeWebhook TypeName = "webhook" TypeSecrets TypeName = "secrets" TypeActivity TypeName = "activity" TypeReaction TypeName = "reaction" TypeOverwrite TypeName = "overwrite" TypeAttachment TypeName = "attachment" TypeTimestamps TypeName = "timestamps" TypeApplication TypeName = "application" TypeVoiceState TypeName = "voice state" TypeClientStatus TypeName = "client_status" TypeUpdateStatus TypeName = "update status" TypeAllowedMentionType TypeName = "allowed mention type" TypePresence TypeName = "presence" TypePresenceUpdate TypeName = "presence update" TypeIntegration TypeName = "integration" TypeIntegrationExpireBehavior TypeName = "integration expire behavior" TypeChannel TypeName = "channel" TypeChannelMention TypeName = "channel mention" TypeGuild TypeName = "guild" TypeGuildMember TypeName = "guild member" // also "member" TypeGuildFeature TypeName = "guild feature" TypeMessage TypeName = "message" TypeMessageActivity TypeName = "message activity" TypeMessageReference TypeName = "message reference" TypeMessageApplication TypeName = "message application" TypeEmbed TypeName = "embed" TypeEmbedImage TypeName = "embed image" TypeEmbedThumbnail TypeName = "embed thumbnail" TypeEmbedVideo TypeName = "embed video" TypeEmbedProvider TypeName = "embed provider" TypeEmbedAuthor TypeName = "embed author" TypeEmbedField TypeName = "embed field" TypeAuditLog TypeName = "audit log" TypeAuditLogEvent TypeName = "audit log event" TypeAuditLogEntry TypeName = "audit log entry" TypeAuditLogChange TypeName = "audit log change" TypeAuditEntryInfo TypeName = "audit entry info" )
Object Types.