flypkgs

package
v0.5.16 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: Apache-2.0 Imports: 11 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsConflictError

func IsConflictError(err error) bool

func IsNotFoundErr

func IsNotFoundErr(err error) bool

Types

type Asset

type Asset struct {
	ID          uint64 `json:"id"`
	Name        string `json:"name"`
	Size        uint64 `json:"size"`
	SHA256      string `json:"sha256"`
	OS          string `json:"os"`
	Arch        string `json:"arch"`
	ContentType string `json:"content_type"`
	InsertedAt  string `json:"inserted_at"`
	UpdatedAt   string `json:"updated_at"`
}

type Channel

type Channel struct {
	ID         uint64    `json:"id"`
	Name       string    `json:"name"`
	Status     string    `json:"status"`
	Stable     bool      `json:"stable"`
	InsertedAt time.Time `json:"inserted_at"`
	UpdatedAt  time.Time `json:"updated_at"`
}

type Client

type Client struct {
	BaseURL string

	HTTPClient *http.Client
	// contains filtered or unexported fields
}

func NewClient

func NewClient(endpoint, apiKey string) *Client

func (*Client) GetReleaseByVersion

func (c *Client) GetReleaseByVersion(ctx context.Context, v version.Version) (*Release, error)

func (*Client) PublishRelease

func (c *Client) PublishRelease(ctx context.Context, v version.Version) (*Release, error)

func (*Client) URL

func (c *Client) URL(path string, params ...any) string

func (*Client) UploadRelease

func (c *Client) UploadRelease(ctx context.Context, v version.Version, r io.Reader) (*Release, error)

type ErrorResponse

type ErrorResponse struct {
	Code     int
	Message  string   `json:"error"`
	Messages []string `json:"errors"`
}

func (ErrorResponse) Error

func (e ErrorResponse) Error() string

type Release

type Release struct {
	ID             uint64          `json:"id"`
	Channel        Channel         `json:"channel"`
	Version        version.Version `json:"version"`
	GitCommit      string          `json:"git_commit"`
	GitBranch      string          `json:"git_branch"`
	GitTag         string          `json:"git_tag"`
	GitPreviousTag string          `json:"git_previous_tag"`
	GitDirty       bool            `json:"git_dirty"`
	Status         string          `json:"status"`
	InsertedAt     time.Time       `json:"inserted_at"`
	UpdatedAt      time.Time       `json:"updated_at"`
	PublishedAt    time.Time       `json:"published_at"`
	Assets         []Asset         `json:"assets"`
}

Jump to

Keyboard shortcuts

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