marketplace

package
v0.12.2 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrItemNotFound          = errors.New("item not found")
	ErrVersionNameNotAString = errors.New(`the field "version.name" must be a string`)
	ErrMissingCompanyID      = errors.New("missing company id, please set one with the flag company-id or in the context")
)

Functions

This section is empty.

Types

type ApplyRequest

type ApplyRequest struct {
	Resources []*Item `json:"resources"`
}

type ApplyResponse

type ApplyResponse struct {
	Done  bool                `json:"done"`
	Items []ApplyResponseItem `json:"items"`
}

type ApplyResponseItem

type ApplyResponseItem struct {
	ID     string `json:"_id,omitempty"` //nolint: tagliatelle
	ItemID string `json:"itemId,omitempty"`

	Done     bool `json:"done"`
	Inserted bool `json:"inserted"`
	Updated  bool `json:"updated"`

	ValidationErrors []ApplyResponseItemValidationError `json:"validationErrors"`
}

type ApplyResponseItemValidationError

type ApplyResponseItemValidationError struct {
	Message string `json:"message"`
}

type Item

type Item map[string]interface{}

Item is a Marketplace item we use a map[string]interface{} to represent the item this allows to avoid changes in the code in case of a change in the resource structure

func (*Item) Del

func (i *Item) Del(key string)

func (*Item) Get

func (i *Item) Get(key string) interface{}

func (*Item) GetVersionName added in v0.10.0

func (i *Item) GetVersionName() (versionName string, err error)

func (*Item) Marshal added in v0.10.0

func (i *Item) Marshal(encodingFormat string) ([]byte, error)

func (*Item) Set

func (i *Item) Set(key string, val interface{})

type Release added in v0.10.0

type Release struct {
	Version     string `json:"version"`
	Name        string `json:"name"`
	Description string `json:"description"`
}

type UploadImageResponse

type UploadImageResponse struct {
	ID       string `json:"_id"` //nolint: tagliatelle
	Name     string `json:"name"`
	File     string `json:"file"`
	Size     int64  `json:"size"`
	Location string `json:"location"`
}

Jump to

Keyboard shortcuts

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