structs

package
v2.1.8 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2021 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

Package structs primarily contains structs used for JSON operations.

Index

Constants

View Source
const (
	InternalServerError   = "Internal Server Error"
	NoSuchFileOrDirectory = "No such file or directory"
	ServiceUnavailable    = "Service Unavailable"
	BadRequest            = "Bad Request"
)

Error messages.

View Source
const (
	BadRequestAPI       = "bad request"
	PermissionDeniedAPI = "permission denied"
)

API error messages.

Variables

This section is empty.

Functions

This section is empty.

Types

type GuildInfo

type GuildInfo struct {
	Name         string     `json:"name"`
	ID           string     `json:"id"`
	CreationTime time.Time  `json:"creation_time"`
	IconURL      string     `json:"icon_url"`
	Members      []UserInfo `json:"members"`
}

GuildInfo represents information of a guild.

type H

type H map[string]interface{}

H is a shortcut to a string to interface map.

type LeaderboardEntry

type LeaderboardEntry struct {
	User       UserInfo `json:"user"`
	Experience int      `json:"experience"`
	Level      int      `json:"level"`
}

LeaderboardEntry represents an entry in a leaderboard.

type UserInfo

type UserInfo struct {
	Name          string    `json:"name"`
	ID            string    `json:"id"`
	CreationTime  time.Time `json:"creation_time"`
	AvatarURL     string    `json:"avatar_url"`
	Discriminator string    `json:"discriminator"`
	Bot           bool      `json:"bot"`
}

UserInfo represents information of a user.

Jump to

Keyboard shortcuts

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