routers

package
v0.0.0-...-55f83f6 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SwarmPoolConnectionInfoResponse

type SwarmPoolConnectionInfoResponse struct {
	NetworkName string   `json:"network_name" binding:"required"`
	PrivateKey  string   `json:"private_key"`
	PeerID      []string `json:"peer_id"`
}

type SwarmPoolConnectionInfoSerializer

type SwarmPoolConnectionInfoSerializer struct {
	C          *gin.Context
	SwarmPool  v1alpha1.SwarmPool
	PrivateKey string
}

func (*SwarmPoolConnectionInfoSerializer) Response

type SwarmPoolModelValidator

type SwarmPoolModelValidator struct {
	SwarmPool struct {
		Name         string   `json:"name" binding:"required,dnsrfc1123,min=4,max=127"`
		IsPrivate    bool     `json:"is_private"`
		PrivateKey   string   `json:"private_key" binding:"required_with=JoiningNodes,isdefault_ifnotprivate,omitempty,base64,min=2,max=2048"`
		JoiningNodes []string `json:"joining_nodes" binding:"isdefault_ifnotprivate,omitempty,gte=1,lte=100,dive,max=1024"`
		EntryPoint   string   `json:"entrypoint" binding:"required,min=3,max=31"`
	} `json:"network"`
	// contains filtered or unexported fields
}

func NewSwarmPoolModelValidator

func NewSwarmPoolModelValidator() SwarmPoolModelValidator

func (*SwarmPoolModelValidator) Bind

type SwarmPoolResponse

type SwarmPoolResponse struct {
	Name         string   `json:"name" binding:"required"`
	IsPrivate    bool     `json:"is_private"`
	JoiningNodes []string `json:"joining_nodes,omitempty"`
	EntryPoint   string   `json:"entrypoint" binding:"required"`
}

type SwarmPoolSerializer

type SwarmPoolSerializer struct {
	C         *gin.Context
	SwarmPool v1alpha1.SwarmPool
}

func (*SwarmPoolSerializer) Response

func (s *SwarmPoolSerializer) Response() SwarmPoolResponse

type SwarmPoolStatusResponse

type SwarmPoolStatusResponse struct {
	NetworkState        api.NetworkState `json:"state"`
	IsIdentityPublished bool             `json:"is_identity_published"`
}

type SwarmPoolStatusSerializer

type SwarmPoolStatusSerializer struct {
	C                   *gin.Context
	NetworkState        api.NetworkState
	IsIdentityPublished bool
}

func (*SwarmPoolStatusSerializer) Response

type SwarmPoolsHandler

type SwarmPoolsHandler struct {
	S models.ISwarmPools
	I models.IIdentity
}

func NewSwarmPoolsHandler

func NewSwarmPoolsHandler() *SwarmPoolsHandler

func (*SwarmPoolsHandler) SetupRoutes

func (S *SwarmPoolsHandler) SetupRoutes(router *gin.RouterGroup)

type SwarmPoolsSerializer

type SwarmPoolsSerializer struct {
	C          *gin.Context
	SwarmPools []v1alpha1.SwarmPool
}

func (*SwarmPoolsSerializer) Response

func (s *SwarmPoolsSerializer) Response() []SwarmPoolResponse

Jump to

Keyboard shortcuts

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