Documentation ¶
Index ¶
- type Handler
- func (h *Handler) AuthDevice(serialRequest *asserts.SerialRequest, genericPrivateKey asserts.PrivateKey, ...) (*asserts.Serial, error)
- func (h *Handler) AuthNonce() *responses.Nonce
- func (h *Handler) AuthRequest() *responses.AuthRequestIDResp
- func (h *Handler) AuthSession() *responses.Session
- func (h *Handler) FindSnap(name string) (*responses.SearchV2Results, error)
- func (h *Handler) GetAccountAssertion(accountId string, rootStoreKey *rsa.PrivateKey, ...) (*asserts.Account, error)
- func (h *Handler) GetAccountKeyAssertion(keySHA3384 string, rootStoreKey *rsa.PrivateKey, ...) (*asserts.AccountKey, error)
- func (h *Handler) GetSections() (*responses.SectionResults, error)
- func (h *Handler) GetSnapDeclarationAssertion(snapStoreId string, rootStoreKey *rsa.PrivateKey, assertsDB *asserts.Database) (*asserts.SnapDeclaration, error)
- func (h *Handler) GetSnapNames() (*responses.CatalogResults, error)
- func (h *Handler) GetSnapRevisionAssertion(SHA3384Encoded string, rootStoreKey *rsa.PrivateKey, ...) (*asserts.SnapRevision, error)
- func (h *Handler) SnapDownload(snapFilename string) (*[]byte, error)
- func (h *Handler) SnapRefresh(actions *[]*requests.SnapActionJSON) (*responses.SnapActionResultList, error)
- func (h *Handler) UnscannedUpload(snapFile io.Reader) (string, error)
- type IStoreHandler
- type Store
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 NewHandler ¶
func NewHandler(accts repositories.IAccountRepository, snaps repositories.ISnapsRepository) *Handler
func (*Handler) AuthDevice ¶
func (h *Handler) AuthDevice(serialRequest *asserts.SerialRequest, genericPrivateKey asserts.PrivateKey, signingDB *assertstest.SigningDB) (*asserts.Serial, error)
func (*Handler) AuthRequest ¶
func (h *Handler) AuthRequest() *responses.AuthRequestIDResp
func (*Handler) AuthSession ¶
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) SnapRefresh ¶
func (h *Handler) SnapRefresh(actions *[]*requests.SnapActionJSON) (*responses.SnapActionResultList, 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 ¶
Click to show internal directories.
Click to hide internal directories.