Documentation ¶
Index ¶
- func CreateKojiTransport(relaxTimeout uint) http.RoundTripper
- func CreateRetryableTransport() *rh.RoundTripper
- type BuildRoot
- type CGImportResult
- type CGInitBuildResult
- type Container
- type ContentGenerator
- type GSSAPICredentials
- type Host
- type Image
- type ImageBuild
- type ImageBuildExtra
- type ImageExtra
- type ImageExtraInfo
- type Koji
- func (k *Koji) CGCancelBuild(buildID int, token string) error
- func (k *Koji) CGFailBuild(buildID int, token string) error
- func (k *Koji) CGImport(build ImageBuild, buildRoots []BuildRoot, images []Image, ...) (*CGImportResult, error)
- func (k *Koji) CGInitBuild(name, version, release string) (*CGInitBuildResult, error)
- func (k *Koji) GetAPIVersion() (int, error)
- func (k *Koji) Logout() error
- func (k *Koji) Upload(file io.Reader, filepath, filename string) (string, uint64, error)
- type LeveledLogrus
- type Metadata
- type Tool
- type Transport
- type TypeInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateKojiTransport ¶
func CreateKojiTransport(relaxTimeout uint) http.RoundTripper
func CreateRetryableTransport ¶
func CreateRetryableTransport() *rh.RoundTripper
Types ¶
type CGImportResult ¶
type CGImportResult struct {
BuildID int `xmlrpc:"build_id"`
}
type CGInitBuildResult ¶
type ContentGenerator ¶
type GSSAPICredentials ¶
func GSSAPICredentialsFromEnv ¶
func GSSAPICredentialsFromEnv() (*GSSAPICredentials, error)
type Image ¶
type Image struct { BuildRootID uint64 `json:"buildroot_id"` Filename string `json:"filename"` FileSize uint64 `json:"filesize"` Arch string `json:"arch"` ChecksumType string `json:"checksum_type"` // must be 'md5' MD5 string `json:"checksum"` Type string `json:"type"` RPMs []rpmmd.RPM `json:"components"` Extra ImageExtra `json:"extra"` }
type ImageBuild ¶
type ImageBuild struct { BuildID uint64 `json:"build_id"` TaskID uint64 `json:"task_id"` Name string `json:"name"` Version string `json:"version"` Release string `json:"release"` Source string `json:"source"` StartTime int64 `json:"start_time"` EndTime int64 `json:"end_time"` Extra ImageBuildExtra `json:"extra"` }
type ImageBuildExtra ¶
type ImageBuildExtra struct {
TypeInfo TypeInfo `json:"typeinfo"`
}
type ImageExtra ¶
type ImageExtra struct {
Info ImageExtraInfo `json:"image"`
}
type ImageExtraInfo ¶
type ImageExtraInfo struct { // TODO: Ideally this is where the pipeline would be passed. Arch string `json:"arch"` // TODO: why? }
type Koji ¶
type Koji struct {
// contains filtered or unexported fields
}
func NewFromGSSAPI ¶
func NewFromGSSAPI(server string, credentials *GSSAPICredentials, transport http.RoundTripper) (*Koji, error)
NewFromGSSAPI creates a new Koji session authenticated using GSSAPI. Principal and keytab used for the session is passed using credentials parameter.
func NewFromPlain ¶
func NewFromPlain(server, user, password string, transport http.RoundTripper) (*Koji, error)
NewFromPlain creates a new Koji sessions =authenticated using the plain username/password method. If you want to speak to a public koji instance, you probably cannot use this method.
func (*Koji) CGCancelBuild ¶
CGCancelBuild marks an in-progress build as cancelled, and
func (*Koji) CGFailBuild ¶
CGFailBuild marks an in-progress build as failed
func (*Koji) CGImport ¶
func (k *Koji) CGImport(build ImageBuild, buildRoots []BuildRoot, images []Image, directory, token string) (*CGImportResult, error)
CGImport imports previously uploaded content, by specifying its metadata, and the temporary directory where it is located.
func (*Koji) CGInitBuild ¶
func (k *Koji) CGInitBuild(name, version, release string) (*CGInitBuildResult, error)
CGInitBuild reserves a build ID and initializes a build
func (*Koji) GetAPIVersion ¶
GetAPIVersion gets the version of the API of the remote Koji instance
type LeveledLogrus ¶
func (*LeveledLogrus) Debug ¶
func (l *LeveledLogrus) Debug(msg string, keysAndValues ...interface{})
func (*LeveledLogrus) Error ¶
func (l *LeveledLogrus) Error(msg string, keysAndValues ...interface{})
func (*LeveledLogrus) Info ¶
func (l *LeveledLogrus) Info(msg string, keysAndValues ...interface{})
func (*LeveledLogrus) Warn ¶
func (l *LeveledLogrus) Warn(msg string, keysAndValues ...interface{})
type Metadata ¶
type Metadata struct { MetadataVersion int `json:"metadata_version"` // must be '0' ImageBuild ImageBuild `json:"build"` BuildRoots []BuildRoot `json:"buildroots"` Images []Image `json:"output"` }
type Transport ¶
type Transport struct {
// contains filtered or unexported fields
}
func (*Transport) RoundTrip ¶
RoundTrip implements the RoundTripper interface, using the default transport. When a session has been established, also pass along the session credentials. This may not be how the RoundTripper interface is meant to be used, but the underlying XML-RPC helpers don't allow us to adjust the URL per-call (these arguments should really be in the body).