responses

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alias

type Alias struct {
	Name string `json:"name"`
}

type AuthRequestIDResp

type AuthRequestIDResp struct {
	RequestID string `json:"request-id"`
}

type CatalogItem

type CatalogItem struct {
	Name    string   `json:"package_name"`
	Version string   `json:"version"`
	Summary string   `json:"summary"`
	Aliases []Alias  `json:"aliases"`
	Apps    []string `json:"apps"`
	Title   string   `json:"title"`
}

type CatalogPayload

type CatalogPayload struct {
	Items []CatalogItem `json:"clickindex:package"`
}

type CatalogResults

type CatalogResults struct {
	Payload CatalogPayload `json:"_embedded"`
}

type ErrorListEntry

type ErrorListEntry struct {
	Code    string `json:"code"`
	Message string `json:"message"`
	// for assertions
	Type       string   `json:"type"`
	PrimaryKey []string `json:"primary-key"`
}

type Nonce

type Nonce struct {
	Nonce string `json:"nonce"`
}

type Payload

type Payload struct {
	Sections []Section `json:"clickindex:sections"`
}

type SearchV2Results

type SearchV2Results struct {
	Results   []StoreSearchResult `json:"results"`
	ErrorList []struct {
		Code    string `json:"code"`
		Message string `json:"message"`
	} `json:"error-list"`
}

type Section

type Section struct {
	Name string
}

type SectionResults

type SectionResults struct {
	Payload Payload `json:"_embedded"`
}

type Session

type Session struct {
	Macaroon string `json:"macaroon"`
}

type SnapActionExtra

type SnapActionExtra struct {
	Releases []SnapRelease `json:"releases"`
}

type SnapActionResult

type SnapActionResult struct {
	Result string `json:"result"`
	// For snap
	InstanceKey      string                `json:"instance-key"`
	SnapID           string                `json:"snap-id,omitempty"`
	Name             string                `json:"name,omitempty"`
	Snap             *StoreSnap            `json:"snap"`
	EffectiveChannel string                `json:"effective-channel,omitempty"`
	RedirectChannel  string                `json:"redirect-channel,omitempty"`
	Error            SnapActionResultError `json:"error"`
	// For assertions
	Key                 string           `json:"key"`
	AssertionStreamURLs []string         `json:"assertion-stream-urls"`
	ErrorList           []ErrorListEntry `json:"error-list"`
}

type SnapActionResultError

type SnapActionResultError struct {
	Code    string          `json:"code"`
	Message string          `json:"message"`
	Extra   SnapActionExtra `json:"extra"`
}

type SnapActionResultList

type SnapActionResultList struct {
	Results   []*SnapActionResult `json:"results"`
	ErrorList []ErrorListEntry    `json:"error-list"`
}

type SnapActionResultListRedux

type SnapActionResultListRedux struct {
	Results   []*store2.SnapActionResult `json:"results"`
	ErrorList []ErrorListEntry           `json:"error-list"`
}

type SnapRelease

type SnapRelease struct {
	Architecture string `json:"architecture"`
	Channel      string `json:"channel"`
}

type StoreSearchChannelSnap

type StoreSearchChannelSnap struct {
	StoreSnap
	Channel string `json:"channel"`
}

storeSearchChannelSnap is the snap revision plus a channel name

type StoreSearchResult

type StoreSearchResult struct {
	Revision StoreSearchChannelSnap `json:"revision"`
	Snap     StoreSnap              `json:"snap"`
	Name     string                 `json:"name"`
	SnapID   string                 `json:"snap-id"`
}

storeSearchResult is the result of v2/find calls

type StoreSnap

type StoreSnap struct {
	Architectures []string          `json:"architectures"`
	Base          *string           `json:"base"`
	Confinement   string            `json:"confinement"`
	Contact       string            `json:"contact"`
	CreatedAt     string            `json:"created-at"` // revision timestamp
	Description   string            `json:"description"`
	Download      StoreSnapDownload `json:"download"`
	Epoch         snap.Epoch        `json:"epoch"`
	License       string            `json:"license"`
	Name          string            `json:"name"`
	Prices        map[string]string `json:"prices"` // currency->price,  free: {"USD": "0"}
	Private       bool              `json:"private"`
	Publisher     snap.StoreAccount `json:"publisher"`
	Revision      int               `json:"revision"` // store revisions are ints starting at 1
	SnapID        string            `json:"snap-id"`
	SnapYAML      string            `json:"snap-yaml"` // optional
	Summary       string            `json:"summary"`
	Title         string            `json:"title"`
	Type          snap.Type         `json:"type"`
	Version       string            `json:"version"`
	Website       string            `json:"website"`
	StoreURL      string            `json:"store-url"`

	// media
	Media []StoreSnapMedia `json:"media"`

	CommonIDs []string `json:"common-ids"`
}

storeSnap holds the information sent as JSON by the store for a snap.

type StoreSnapDelta

type StoreSnapDelta struct {
	Format   string `json:"format"`
	Sha3_384 string `json:"sha3-384"`
	Size     int64  `json:"size"`
	Source   int    `json:"source"`
	Target   int    `json:"target"`
	URL      string `json:"url"`
}

type StoreSnapDownload

type StoreSnapDownload struct {
	Sha3_384 string           `json:"sha3-384"`
	Size     int64            `json:"size"`
	URL      string           `json:"url"`
	Deltas   []StoreSnapDelta `json:"deltas"`
}

type StoreSnapMedia

type StoreSnapMedia struct {
	Type   string `json:"type"` // icon/screenshot
	URL    string `json:"url"`
	Width  int64  `json:"width"`
	Height int64  `json:"height"`
}

type Unscanned

type Unscanned struct {
	UploadId string `json:"upload_id"`
}

type Upload

type Upload struct {
	Success          bool
	StatusDetailsURL string `json:"status_details_url"`
}

Jump to

Keyboard shortcuts

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