server

package
v0.0.0-...-c4b491b Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DashboardHandler

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

func (*DashboardHandler) AddAccountKey

func (d *DashboardHandler) AddAccountKey(accountEmail string, keyName string, publicKeyId string, pubKeyEncoded string) (*models.Key, error)

func (*DashboardHandler) GetACLMacaroon

func (d *DashboardHandler) GetACLMacaroon(acl string) (*macaroonv2.Macaroon, error)

func (*DashboardHandler) GetAccount

func (d *DashboardHandler) GetAccount(accountEmail string) (*responses.AccountInfo, error)

func (*DashboardHandler) GetSnapChannelMap

func (d *DashboardHandler) GetSnapChannelMap(snapName string) (*generatedResponses.Root, error)

func (*DashboardHandler) GetUploadStatus

func (d *DashboardHandler) GetUploadStatus(upDownId string) (*responses.Status, error)

func (*DashboardHandler) PushSnap

func (d *DashboardHandler) PushSnap(snapName string, upDownId string, fileSize uint, channels []string) (*store.Upload, error)

func (*DashboardHandler) RegisterSnapName

func (d *DashboardHandler) RegisterSnapName(accountEmail string, isDryRun bool, snapName string) (*responses.RegisterSnap, error)

func (*DashboardHandler) ReleaseSnap

func (d *DashboardHandler) ReleaseSnap(name string, revision uint, channels []string) (bool, error)

func (*DashboardHandler) VerifyACL

func (d *DashboardHandler) VerifyACL(verify *requests.Verify) (*responses.Verify, error)

type IDashboardHandler

type IDashboardHandler interface {
	VerifyACL(verify *requests.Verify) (*responses.Verify, error)
	GetAccount(accountEmail string) (*responses.AccountInfo, error)
	RegisterSnapName(accountEmail string, dryRun bool, snapName string) (*responses.RegisterSnap, error)
	AddAccountKey(accountEmail string, keyName string, publicKeyId string, pubKeyEncoded string) (*models.Key, error)
	GetACLMacaroon(acl string) (*macaroonv2.Macaroon, error)
	GetUploadStatus(upDownId string) (*responses.Status, error)
	PushSnap(snapName string, upDownId string, fileSize uint, channels []string) (*store.Upload, error)
	ReleaseSnap(name string, revision uint, channels []string) (bool, error)
	GetSnapChannelMap(snapName string) (*generatedResponses.Root, error)
}

type Server

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

func New

func New(useRequestLogger bool, handler IDashboardHandler, dashboardPort int) *Server

func (*Server) Run

func (s *Server) Run()

func (*Server) SetupEndpoints

func (s *Server) SetupEndpoints(checkForAuthorizedUser gin.HandlerFunc)

Jump to

Keyboard shortcuts

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