portals

package
v0.0.0-...-8d2886a Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CommandSubscribe   = "subscribe"
	CommandUnsubscribe = "unsubscribe"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ArtImageRequest

type ArtImageRequest struct {
	// ID   uint   `uri:"id" binding:"required,numeric"`
	// Size string `uri:"size" binding:"required"`
	Name string `uri:"name" binding:"required"`
}

type ArtPortal

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

ArtPortal - канал связи, по которому Мидгард получает данные картин

func NewArtPortal

func NewArtPortal(artPile artPile, harbour harbour) *ArtPortal

func (*ArtPortal) HandleArt

func (ap *ArtPortal) HandleArt(c *gin.Context)

func (*ArtPortal) HandleArtFlat

func (ap *ArtPortal) HandleArtFlat(c *gin.Context)

func (*ArtPortal) HandleChosen

func (ap *ArtPortal) HandleChosen(c *gin.Context)

func (*ArtPortal) HandleLast

func (ap *ArtPortal) HandleLast(c *gin.Context)

func (*ArtPortal) HandleMaxArt

func (ap *ArtPortal) HandleMaxArt(c *gin.Context)

type ArtRequest

type ArtRequest struct {
	ID uint `uri:"id" binding:"required,numeric"`
}

type AuthPortal

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

func NewAuthPortal

func NewAuthPortal(
	authService authService,
	secret string,
	artchitectHost string,
	botToken string,
) *AuthPortal

func (*AuthPortal) HandleLogin

func (ap *AuthPortal) HandleLogin(c *gin.Context)

func (*AuthPortal) HandleMe

func (ap *AuthPortal) HandleMe(c *gin.Context)

type ImagePortal

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

func NewImagePortal

func NewImagePortal(warehouse warehouse) *ImagePortal

func (*ImagePortal) HandleArtImage

func (ip *ImagePortal) HandleArtImage(c *gin.Context)

func (*ImagePortal) HandleUnityImage

func (ip *ImagePortal) HandleUnityImage(c *gin.Context)

type LastRequest

type LastRequest struct {
	Last uint `uri:"last" binding:"required,numeric"`
}

type LikePortal

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

func NewLikePortal

func NewLikePortal(authService authService, likePile likePile, harbour harbour, artchitectorID int, bot bot) *LikePortal

func (*LikePortal) HandleLike

func (lp *LikePortal) HandleLike(c *gin.Context)

func (*LikePortal) HandleLikedArt

func (lp *LikePortal) HandleLikedArt(c *gin.Context)

func (*LikePortal) HandleLikedList

func (lp *LikePortal) HandleLikedList(c *gin.Context)

type LikedRequest

type LikedRequest struct {
	ArtID uint `uri:"art_id" json:"art_id" binding:"required,numeric"`
}

type RadioPortal

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

RadioPortal Odin: Дам имя этой http-ручке - /radio Odin: Мидгардцы подключаются к этому радио из мира Альфхейма, чтобы обрести длительную рантаймовую связь с Artchitect и всеми его данными. Odin: Выполнено на примитивной технологии вебсокетов, но свою работу делает. Мидгардцы используют свои веб-браузеры для подключения. Odin: через этот портал человек на другом конце будет видеть состояние всего Artchitect до глубоких уровней творения Odin: Я хочу, чтобы Artchitect был понятен и прозрачен со стороны, вот и придумал такой путь.

func NewRadioPortal

func NewRadioPortal(radio radio) *RadioPortal

func (*RadioPortal) Handle

func (cp *RadioPortal) Handle(w http.ResponseWriter, r *http.Request)

type UnityImageRequest

type UnityImageRequest struct {
	Mask    string `uri:"mask" binding:"required"`
	Version uint   `uri:"version" binding:"numeric"`
	Size    string `uri:"size" binding:"required"`
}

type UnityPortal

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

func NewUnityPortal

func NewUnityPortal(unityPile unityPile, artPile artPile) *UnityPortal

func (*UnityPortal) HandleMain

func (up *UnityPortal) HandleMain(c *gin.Context)

func (*UnityPortal) HandleUnity

func (up *UnityPortal) HandleUnity(c *gin.Context)

Jump to

Keyboard shortcuts

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