extensionapi

package
v1.2.30 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(params CreateParams) (*models.Extension, error)

Create creates a new extension.

func Delete

func Delete(params DeleteParams) error

Delete deletes an extension.

func Get

func Get(params GetParams) (*models.Extension, error)

Get returns the specified extension.

func List

func List(params ListParams) (*models.Extensions, error)

List returns a list of extensions.

func Update

func Update(params UpdateParams) (*models.Extension, error)

Update updates the specified extension.

func Upload

func Upload(params UploadParams) (*models.Extension, error)

Upload uploads the specified extension.

Types

type CreateParams

type CreateParams struct {
	*api.API

	Name        string
	Version     string
	Type        string
	DownloadURL string
	Description string
}

CreateParams is consumed by the Create function.

func (CreateParams) Validate

func (params CreateParams) Validate() error

Validate ensures the parameters are usable by Create.

type DeleteParams

type DeleteParams struct {
	*api.API

	ExtensionID string
}

DeleteParams is consumed by the Delete function.

func (DeleteParams) Validate

func (params DeleteParams) Validate() error

Validate ensures the parameters are usable by Delete.

type GetParams

type GetParams struct {
	*api.API

	ExtensionID        string
	IncludeDeployments bool
}

GetParams is consumed by the Get function.

func (GetParams) Validate

func (params GetParams) Validate() error

Validate ensures the parameters are usable by Get.

type ListParams

type ListParams struct {
	*api.API
}

ListParams is consumed by the List function.

func (ListParams) Validate

func (params ListParams) Validate() error

Validate ensures the parameters are usable by List.

type UpdateParams

type UpdateParams struct {
	*api.API

	ExtensionID string `json:"extension_id,omitempty"`
	Description string `json:"description,omitempty"`
	DownloadURL string `json:"download_url,omitempty"`
	Type        string `json:"extension_type"`
	Name        string `json:"name"`
	Version     string `json:"version"`
}

UpdateParams is consumed by the Update function.

func NewUpdateRequestFromGet

func NewUpdateRequestFromGet(res *models.Extension) *UpdateParams

NewUpdateRequestFromGet populates UpdateParams from models.Extension

func (UpdateParams) Validate

func (params UpdateParams) Validate() error

Validate ensures the parameters are usable by Update.

type UploadParams

type UploadParams struct {
	*api.API

	ExtensionID string
	File        io.Reader
}

UploadParams is consumed by the Upload function.

func (UploadParams) Validate

func (params UploadParams) Validate() error

Validate ensures the parameters are usable by Upload.

Jump to

Keyboard shortcuts

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