api

package
v0.0.0-...-b4fe549 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Error string `json:"error"`
}

type ReturnedCharacter

type ReturnedCharacter struct {
	Character string  `json:"character"`
	Class     string  `json:"class"`
	GearScore float64 `json:"gearScore"`
	LogCount  int64   `json:"logCount"`
}

type ReturnedEncounter

type ReturnedEncounter struct {
	ReturnedEncounterShort
	Thumbnail bool                  `json:"thumbnail"`
	Data      structs.EncounterData `json:"data"`
}

func (*ReturnedEncounter) Anonymize

func (enc *ReturnedEncounter) Anonymize(order map[string]string, character string, visibility int)

type ReturnedEncounterShort

type ReturnedEncounterShort struct {
	Uploader    *ReturnedUser                `json:"uploader"`
	ID          int32                        `json:"id"`
	Difficulty  string                       `json:"difficulty"`
	Boss        string                       `json:"boss"`
	Date        int64                        `json:"date"`
	Duration    int32                        `json:"duration"`
	LocalPlayer string                       `json:"localPlayer"`
	Anonymized  bool                         `json:"anonymized"`
	Actual      bool                         `json:"actual"`
	Place       int32                        `json:"place"`
	Visibility  *structs.EncounterVisibility `json:"visibility"`
	structs.EncounterHeader
}

func (*ReturnedEncounterShort) Anonymize

func (enc *ReturnedEncounterShort) Anonymize(order map[string]string, character string, visibility int)

func (*ReturnedEncounterShort) Order

func (enc *ReturnedEncounterShort) Order() map[string]string

type ReturnedEncounterShorts

type ReturnedEncounterShorts struct {
	Encounters []ReturnedEncounterShort `json:"encounters"`
	More       bool                     `json:"more"`
}

type ReturnedProfile

type ReturnedProfile struct {
	Characters []ReturnedCharacter `json:"characters"`
}

type ReturnedRaidStats

type ReturnedRaidStats struct {
	Raids   map[string]map[string]int64 `json:"raids"`
	Classes map[string]int64            `json:"classes"`
	Players int64                       `json:"players"`
}

type ReturnedSettings

type ReturnedSettings struct {
	HasToken            bool                         `json:"hasToken"`
	EncounterVisibility *structs.EncounterVisibility `json:"logVisibility"`
}

type ReturnedTokenUser

type ReturnedTokenUser struct {
	ID         string `json:"id"`
	DiscordTag string `json:"discordTag"`
	Avatar     bool   `json:"avatar"`
	Username   string `json:"username"`
	CanUpload  bool   `json:"canUpload"`
}

type ReturnedUser

type ReturnedUser struct {
	ID         string `json:"id"`
	DiscordTag string `json:"discordTag"`
	Avatar     bool   `json:"avatar"`
	Username   string `json:"username"`
}

type Server

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

func NewServer

func NewServer(conf *ServerConfig) *Server

func (*Server) Run

func (s *Server) Run(ctx context.Context) error

type ServerConfig

type ServerConfig struct {
	Address     string
	DatabaseURL string

	RedisAddress  string
	RedisPassword string
	SessionSecret string

	S3     *s3.Config
	OAuth2 *oauth2.Config
}

type SessionUser

type SessionUser struct {
	ID         string
	DiscordTag string
	Avatar     bool
	Username   string
}

type UpdateLogSettingsBody

type UpdateLogSettingsBody struct {
	Names int `json:"names"`
}

type UpdateLogSettingsParams

type UpdateLogSettingsParams struct {
	Log int32 `uri:"log" binding:"required"`
}

type UploadResponse

type UploadResponse struct {
	ID int32 `json:"id"`
}

type UserProfileParams

type UserProfileParams struct {
	Username string `uri:"username" binding:"required"`
}

Jump to

Keyboard shortcuts

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