store

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: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

func (*Handler) AuthDevice

func (h *Handler) AuthDevice(serialRequest *asserts.SerialRequest, genericPrivateKey asserts.PrivateKey, signingDB *assertstest.SigningDB) (*asserts.Serial, error)

func (*Handler) AuthNonce

func (h *Handler) AuthNonce() *responses.Nonce

func (*Handler) AuthRequest

func (h *Handler) AuthRequest() *responses.AuthRequestIDResp

func (*Handler) AuthSession

func (h *Handler) AuthSession() *responses.Session

func (*Handler) FindSnap

func (h *Handler) FindSnap(name string) (*responses.SearchV2Results, error)

func (*Handler) GetAccountAssertion

func (h *Handler) GetAccountAssertion(accountId string, rootStoreKey *rsa.PrivateKey, signingDB *assertstest.SigningDB) (*asserts.Account, error)

func (*Handler) GetAccountKeyAssertion

func (h *Handler) GetAccountKeyAssertion(keySHA3384 string, rootStoreKey *rsa.PrivateKey, signingDB *assertstest.SigningDB) (*asserts.AccountKey, error)

func (*Handler) GetSections

func (h *Handler) GetSections() (*responses.SectionResults, error)

func (*Handler) GetSnapDeclarationAssertion

func (h *Handler) GetSnapDeclarationAssertion(snapStoreId string, rootStoreKey *rsa.PrivateKey, assertsDB *asserts.Database) (*asserts.SnapDeclaration, error)

func (*Handler) GetSnapNames

func (h *Handler) GetSnapNames() (*responses.CatalogResults, error)

func (*Handler) GetSnapRevisionAssertion

func (h *Handler) GetSnapRevisionAssertion(SHA3384Encoded string, rootStoreKey *rsa.PrivateKey, assertsDB *asserts.Database) (*asserts.SnapRevision, error)

func (*Handler) SnapDownload

func (h *Handler) SnapDownload(snapFilename string) (*[]byte, error)

func (*Handler) SnapRefresh

func (h *Handler) SnapRefresh(actions *[]*requests.SnapActionJSON) (*responses.SnapActionResultList, error)

func (*Handler) UnscannedUpload

func (h *Handler) UnscannedUpload(snapFile io.Reader) (string, error)

type IStoreHandler

type IStoreHandler interface {
	GetSections() (*responses.SectionResults, error)
	GetSnapNames() (*responses.CatalogResults, error)
	FindSnap(name string) (*responses.SearchV2Results, error)
	SnapRefresh(actions *[]*requests.SnapActionJSON) (*responses.SnapActionResultList, error)
	SnapDownload(snapFilename string) (*[]byte, error)
	GetSnapRevisionAssertion(SHA3384Encoded string, rootStoreKey *rsa.PrivateKey, assertsDB *asserts.Database) (*asserts.SnapRevision, error)
	GetSnapDeclarationAssertion(snapId string, rootStoreKey *rsa.PrivateKey, assertsDB *asserts.Database) (*asserts.SnapDeclaration, error)
	GetAccountKeyAssertion(keySHA3384 string, rootStoreKey *rsa.PrivateKey, signingDB *assertstest.SigningDB) (*asserts.AccountKey, error)
	GetAccountAssertion(accountId string, rootStoreKey *rsa.PrivateKey, signingDB *assertstest.SigningDB) (*asserts.Account, error)
	UnscannedUpload(snapFile io.Reader) (string, error)
	AuthRequest() *responses.AuthRequestIDResp
	AuthDevice(serialRequest *asserts.SerialRequest, genericPrivateKey asserts.PrivateKey, signingDB *assertstest.SigningDB) (*asserts.Serial, error)
	AuthNonce() *responses.Nonce
	AuthSession() *responses.Session
}

type Store

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

func New

func New(handler IStoreHandler, assertsDB *asserts.Database, rootStoreKey *rsa.PrivateKey, genericPrivateKey *rsa.PrivateKey, signingDB *assertstest.SigningDB) *Store

func (*Store) SetupEndpoints

func (s *Store) SetupEndpoints(r *gin.Engine)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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