publish

package
v0.40.2 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2024 License: MPL-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateNewAddonDraftVersion

func CreateNewAddonDraftVersion(ctx context.Context, c *cloudquery_api.ClientWithResponses, manifest ManifestJSONV1, version, manifestDir, zipPath string) error

func CreateNewPluginDraftVersion

func CreateNewPluginDraftVersion(ctx context.Context, c *cloudquery_api.ClientWithResponses, teamName, pluginName string, pkgJSON PackageJSONV1, specJsonSchema *string) error

func DownloadAddonFromResponse

func DownloadAddonFromResponse(res *http.Response, expectedChecksum, targetDir string) (retErr error)

func GetAddonMetadata

func GetAddonMetadata(ctx context.Context, c *cloudquery_api.ClientWithResponses, currentTeam, addonTeam, addonType, addonName, addonVersion string) (location, checksum string, retErr error)

func GetSpecJsonScheme

func GetSpecJsonScheme(distDir string) (*string, error)

func PublishNativeBinaries

func PublishNativeBinaries(ctx context.Context, c *cloudquery_api.ClientWithResponses, distDir string, pkgJSON PackageJSONV1) error

func PublishToDockerRegistry

func PublishToDockerRegistry(ctx context.Context, token, distDir string, pkgJSON PackageJSONV1, popts Opts) error

func UploadAddon

func UploadAddon(ctx context.Context, c *cloudquery_api.ClientWithResponses, manifest ManifestJSONV1, version, localPath string) error

func UploadPluginBinary

func UploadPluginBinary(ctx context.Context, c *cloudquery_api.ClientWithResponses, goos, goarch, localPath string, pkgJSON PackageJSONV1) error

func UploadPluginDocs

func UploadPluginDocs(ctx context.Context, c *cloudquery_api.ClientWithResponses, teamName, pluginKind, pluginName, version, docsDir string, replace bool) error

func UploadPluginUIAssets

func UploadPluginUIAssets(ctx context.Context, c *cloudquery_api.ClientWithResponses, teamName, pluginKind, pluginName, version, uiDir string) error

func UploadTableSchemas

func UploadTableSchemas(ctx context.Context, c *cloudquery_api.ClientWithResponses, teamName, pluginName, tablesJSONPath string, pkgJSON PackageJSONV1) error

Types

type LoadResponse

type LoadResponse struct {
	Stream string `json:"stream"`
}

type ManifestJSONV1

type ManifestJSONV1 struct {
	Type        string `json:"type"` // always "addon"
	TeamName    string `json:"team_name"`
	AddonName   string `json:"addon_name"`
	AddonType   string `json:"addon_type"`
	AddonFormat string `json:"addon_format"` // unused

	Message   string `json:"message"`
	PathToZip string `json:"path"`
	PathToDoc string `json:"doc"`

	PluginDeps []string `json:"plugin_deps"`
	AddonDeps  []string `json:"addon_deps"`
}

func ReadManifestJSON

func ReadManifestJSON(manifestPath string) (ManifestJSONV1, error)

type Opts

type Opts struct {
	NoProgress bool
}

type PackageJSONV1

type PackageJSONV1 struct {
	Team             string                    `json:"team"`
	Name             string                    `json:"name"`
	Message          string                    `json:"message"`
	Version          string                    `json:"version"`
	Kind             cloudquery_api.PluginKind `json:"kind"`
	Protocols        []int                     `json:"protocols"`
	SupportedTargets []TargetBuild             `json:"supported_targets"`
	PackageType      string                    `json:"package_type"`
}

func ReadPackageJSON

func ReadPackageJSON(distDir string) (PackageJSONV1, error)

type SchemaVersion

type SchemaVersion struct {
	SchemaVersion int `json:"schema_version"`
}

type TargetBuild

type TargetBuild struct {
	OS             string `json:"os"`
	Arch           string `json:"arch"`
	Path           string `json:"path"`
	Checksum       string `json:"checksum"`
	DockerImageTag string `json:"docker_image_tag"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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