request

package
v0.0.0-...-37118a4 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DependencyTypeRuntime DependencyType = "runtime"
	DependencyTypeBuild                  = "build"
	DependencyTypeTest                   = "test"
)

Variables

This section is empty.

Functions

func CheckpointByCommit

func CheckpointByCommit(commitID strfmt.UUID) *checkpointByCommit

func CommitByID

func CommitByID(commitID strfmt.UUID) *commitByID

New request type for commit details

func OrganizationsByIDs

func OrganizationsByIDs(orgIDs []strfmt.UUID) *organizationByIDs

OrganizationsByIDs returns the query for retrieving orgs by ids

func OrganizationsByName

func OrganizationsByName(name string) *organizationByName

OrganizationsByName returns the query for retrieving org by name

func ProjectByOrgAndName

func ProjectByOrgAndName(org string, project string) *projectByOrgAndName

Types

type Dependency

type Dependency struct {
	Name                string         `yaml:"name" json:"name"`
	Namespace           string         `yaml:"namespace" json:"namespace"`
	VersionRequirements string         `yaml:"versionRequirements,omitempty" json:"versionRequirements,omitempty"`
	Type                DependencyType `yaml:"type,omitempty" json:"type,omitempty"`
}

type DependencyType

type DependencyType string

type ExampleAuthorVariables

type ExampleAuthorVariables struct {
	Authors []PublishVariableAuthor `yaml:"authors,omitempty"`
}

ExampleAuthorVariables is used for presenting sample data to the user, it's not used for graphql input

type ExampleDepVariables

type ExampleDepVariables struct {
	Dependencies []PublishVariableDep `yaml:"dependencies,omitempty"`
}

ExampleDepVariables is used for presenting sample data to the user, it's not used for graphql input

type PublishInput

type PublishInput struct {
	Variables PublishVariables
	// contains filtered or unexported fields
}

func Publish

func Publish(vars PublishVariables, filepath string) (*PublishInput, error)

func (*PublishInput) Close

func (p *PublishInput) Close() error

func (*PublishInput) Files

func (p *PublishInput) Files() []gqlclient.File

func (*PublishInput) Query

func (p *PublishInput) Query() string

func (*PublishInput) Vars

func (p *PublishInput) Vars() (map[string]interface{}, error)

type PublishVariableAuthor

type PublishVariableAuthor struct {
	Name     string   `yaml:"name,omitempty" json:"name,omitempty"`
	Email    string   `yaml:"email,omitempty" json:"email,omitempty"`
	Websites []string `yaml:"websites,omitempty" json:"websites,omitempty"`
}

type PublishVariableDep

type PublishVariableDep struct {
	Dependency
	Conditions []Dependency `yaml:"conditions,omitempty" json:"conditions,omitempty"`
}

type PublishVariableFeature

type PublishVariableFeature struct {
	Name      string `yaml:"name" json:"name"`
	Namespace string `yaml:"namespace" json:"namespace"`
	Version   string `yaml:"version" json:"version"`
}

type PublishVariables

type PublishVariables struct {
	Name      string `yaml:"name" json:"-" hc:"The name of the ingredient"` // User representation only
	Namespace string ``                                                     // User representation only
	/* 158-byte string literal not displayed */
	Version     string `` /* 134-byte string literal not displayed */
	Description string `yaml:"description" json:"description" hc:"The description field should be a short description of the ingredient."`

	// Optional
	Authors      []PublishVariableAuthor  `yaml:"authors,omitempty" json:"authors,omitempty" hc:"A list of authors who contributed to the ingredient."`
	Dependencies []PublishVariableDep     `yaml:"dependencies,omitempty" json:"dependencies,omitempty" hc:"A list of dependencies that the ingredient requires."`
	Features     []PublishVariableFeature `yaml:"features,omitempty" json:"features,omitempty" hc:"A list of features that the ingredient provides."`

	// GraphQL input only
	Path         string  `yaml:"-" json:"path"`
	File         *string `yaml:"-" json:"file"` // Intentionally a pointer that never gets set as the server expects this to always be nil
	FileChecksum string  `yaml:"-" json:"file_checksum"`
}

PublishVariables holds the input variables It is ultimately used as the input for the graphql query, but before that we may want to present the data to the user which is done with yaml. As such the yaml tags are used for representing data to the user, and the json is used for inputs to graphql.

func (PublishVariables) MarshalJSON

func (p PublishVariables) MarshalJSON() ([]byte, error)

MarshalJSON automatically takes the name and namespace and turns it into the path argument that the API expects

func (PublishVariables) MarshalYaml

func (p PublishVariables) MarshalYaml(includeExample bool) ([]byte, error)

func (*PublishVariables) UnmarshalYaml

func (p *PublishVariables) UnmarshalYaml(b []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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