registries

package
v0.20230918.1102428 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2023 License: MPL-2.0 Imports: 14 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview/registries Documentation

The registries SDK allows for interaction with the Azure Resource Manager Service containerregistry (API Version 2019-06-01-preview).

This readme covers example usages, but further information on using this SDK can be found in the project root.

Import Path

import "github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview/registries"

Client Initialization

client := registries.NewRegistriesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: RegistriesClient.GetBuildSourceUploadUrl

ctx := context.TODO()
id := registries.NewRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue")

read, err := client.GetBuildSourceUploadUrl(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: RegistriesClient.ScheduleRun

ctx := context.TODO()
id := registries.NewRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue")

payload := registries.RunRequest{
	// ...
}


if err := client.ScheduleRunThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForArchitecture

func PossibleValuesForArchitecture() []string

func PossibleValuesForOS

func PossibleValuesForOS() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func PossibleValuesForRunStatus

func PossibleValuesForRunStatus() []string

func PossibleValuesForRunType

func PossibleValuesForRunType() []string

func PossibleValuesForSecretObjectType

func PossibleValuesForSecretObjectType() []string

func PossibleValuesForSourceRegistryLoginMode

func PossibleValuesForSourceRegistryLoginMode() []string

func PossibleValuesForVariant

func PossibleValuesForVariant() []string

func ValidateRegistryID

func ValidateRegistryID(input interface{}, key string) (warnings []string, errors []error)

ValidateRegistryID checks that 'input' can be parsed as a Registry ID

Types

type AgentProperties

type AgentProperties struct {
	Cpu *int64 `json:"cpu,omitempty"`
}

type Architecture

type Architecture string
const (
	ArchitectureAmdSixFour    Architecture = "amd64"
	ArchitectureArm           Architecture = "arm"
	ArchitectureArmSixFour    Architecture = "arm64"
	ArchitectureThreeEightSix Architecture = "386"
	ArchitectureXEightSix     Architecture = "x86"
)

func (*Architecture) UnmarshalJSON added in v0.20230406.1124617

func (s *Architecture) UnmarshalJSON(bytes []byte) error

type Argument

type Argument struct {
	IsSecret *bool  `json:"isSecret,omitempty"`
	Name     string `json:"name"`
	Value    string `json:"value"`
}

type Credentials

type Credentials struct {
	CustomRegistries *map[string]CustomRegistryCredentials `json:"customRegistries,omitempty"`
	SourceRegistry   *SourceRegistryCredentials            `json:"sourceRegistry,omitempty"`
}

type CustomRegistryCredentials

type CustomRegistryCredentials struct {
	Identity *string       `json:"identity,omitempty"`
	Password *SecretObject `json:"password,omitempty"`
	UserName *SecretObject `json:"userName,omitempty"`
}

type DockerBuildRequest

type DockerBuildRequest struct {
	AgentConfiguration *AgentProperties   `json:"agentConfiguration,omitempty"`
	Arguments          *[]Argument        `json:"arguments,omitempty"`
	Credentials        *Credentials       `json:"credentials,omitempty"`
	DockerFilePath     string             `json:"dockerFilePath"`
	ImageNames         *[]string          `json:"imageNames,omitempty"`
	IsPushEnabled      *bool              `json:"isPushEnabled,omitempty"`
	NoCache            *bool              `json:"noCache,omitempty"`
	Platform           PlatformProperties `json:"platform"`
	SourceLocation     *string            `json:"sourceLocation,omitempty"`
	Target             *string            `json:"target,omitempty"`
	Timeout            *int64             `json:"timeout,omitempty"`

	// Fields inherited from RunRequest
	AgentPoolName    *string `json:"agentPoolName,omitempty"`
	IsArchiveEnabled *bool   `json:"isArchiveEnabled,omitempty"`
	LogTemplate      *string `json:"logTemplate,omitempty"`
}

func (DockerBuildRequest) MarshalJSON

func (s DockerBuildRequest) MarshalJSON() ([]byte, error)

type EncodedTaskRunRequest

type EncodedTaskRunRequest struct {
	AgentConfiguration   *AgentProperties   `json:"agentConfiguration,omitempty"`
	Credentials          *Credentials       `json:"credentials,omitempty"`
	EncodedTaskContent   string             `json:"encodedTaskContent"`
	EncodedValuesContent *string            `json:"encodedValuesContent,omitempty"`
	Platform             PlatformProperties `json:"platform"`
	SourceLocation       *string            `json:"sourceLocation,omitempty"`
	Timeout              *int64             `json:"timeout,omitempty"`
	Values               *[]SetValue        `json:"values,omitempty"`

	// Fields inherited from RunRequest
	AgentPoolName    *string `json:"agentPoolName,omitempty"`
	IsArchiveEnabled *bool   `json:"isArchiveEnabled,omitempty"`
	LogTemplate      *string `json:"logTemplate,omitempty"`
}

func (EncodedTaskRunRequest) MarshalJSON

func (s EncodedTaskRunRequest) MarshalJSON() ([]byte, error)

type FileTaskRunRequest

type FileTaskRunRequest struct {
	AgentConfiguration *AgentProperties   `json:"agentConfiguration,omitempty"`
	Credentials        *Credentials       `json:"credentials,omitempty"`
	Platform           PlatformProperties `json:"platform"`
	SourceLocation     *string            `json:"sourceLocation,omitempty"`
	TaskFilePath       string             `json:"taskFilePath"`
	Timeout            *int64             `json:"timeout,omitempty"`
	Values             *[]SetValue        `json:"values,omitempty"`
	ValuesFilePath     *string            `json:"valuesFilePath,omitempty"`

	// Fields inherited from RunRequest
	AgentPoolName    *string `json:"agentPoolName,omitempty"`
	IsArchiveEnabled *bool   `json:"isArchiveEnabled,omitempty"`
	LogTemplate      *string `json:"logTemplate,omitempty"`
}

func (FileTaskRunRequest) MarshalJSON

func (s FileTaskRunRequest) MarshalJSON() ([]byte, error)

type GetBuildSourceUploadUrlOperationResponse

type GetBuildSourceUploadUrlOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *SourceUploadDefinition
}

type ImageDescriptor

type ImageDescriptor struct {
	Digest     *string `json:"digest,omitempty"`
	Registry   *string `json:"registry,omitempty"`
	Repository *string `json:"repository,omitempty"`
	Tag        *string `json:"tag,omitempty"`
}

type ImageUpdateTrigger

type ImageUpdateTrigger struct {
	Id        *string            `json:"id,omitempty"`
	Images    *[]ImageDescriptor `json:"images,omitempty"`
	Timestamp *string            `json:"timestamp,omitempty"`
}

func (*ImageUpdateTrigger) GetTimestampAsTime

func (o *ImageUpdateTrigger) GetTimestampAsTime() (*time.Time, error)

func (*ImageUpdateTrigger) SetTimestampAsTime

func (o *ImageUpdateTrigger) SetTimestampAsTime(input time.Time)

type OS

type OS string
const (
	OSLinux   OS = "Linux"
	OSWindows OS = "Windows"
)

func (*OS) UnmarshalJSON added in v0.20230406.1124617

func (s *OS) UnmarshalJSON(bytes []byte) error

type OverrideTaskStepProperties

type OverrideTaskStepProperties struct {
	Arguments          *[]Argument `json:"arguments,omitempty"`
	ContextPath        *string     `json:"contextPath,omitempty"`
	File               *string     `json:"file,omitempty"`
	Target             *string     `json:"target,omitempty"`
	UpdateTriggerToken *string     `json:"updateTriggerToken,omitempty"`
	Values             *[]SetValue `json:"values,omitempty"`
}

type PlatformProperties

type PlatformProperties struct {
	Architecture *Architecture `json:"architecture,omitempty"`
	Os           OS            `json:"os"`
	Variant      *Variant      `json:"variant,omitempty"`
}

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateCanceled  ProvisioningState = "Canceled"
	ProvisioningStateCreating  ProvisioningState = "Creating"
	ProvisioningStateDeleting  ProvisioningState = "Deleting"
	ProvisioningStateFailed    ProvisioningState = "Failed"
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
	ProvisioningStateUpdating  ProvisioningState = "Updating"
)

func (*ProvisioningState) UnmarshalJSON added in v0.20230406.1124617

func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error

type RawRunRequestImpl added in v0.20230807.1063129

type RawRunRequestImpl struct {
	Type   string
	Values map[string]interface{}
}

RawModeOfTransitImpl is returned when the Discriminated Value doesn't match any of the defined types NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) and is used only for Deserialization (e.g. this cannot be used as a Request Payload).

type RegistriesClient

type RegistriesClient struct {
	Client *resourcemanager.Client
}

func NewRegistriesClientWithBaseURI

func NewRegistriesClientWithBaseURI(sdkApi sdkEnv.Api) (*RegistriesClient, error)

func (RegistriesClient) GetBuildSourceUploadUrl

func (c RegistriesClient) GetBuildSourceUploadUrl(ctx context.Context, id RegistryId) (result GetBuildSourceUploadUrlOperationResponse, err error)

GetBuildSourceUploadUrl ...

func (RegistriesClient) ScheduleRun

func (c RegistriesClient) ScheduleRun(ctx context.Context, id RegistryId, input RunRequest) (result ScheduleRunOperationResponse, err error)

ScheduleRun ...

func (RegistriesClient) ScheduleRunThenPoll

func (c RegistriesClient) ScheduleRunThenPoll(ctx context.Context, id RegistryId, input RunRequest) error

ScheduleRunThenPoll performs ScheduleRun then polls until it's completed

type RegistryId

type RegistryId struct {
	SubscriptionId    string
	ResourceGroupName string
	RegistryName      string
}

RegistryId is a struct representing the Resource ID for a Registry

func NewRegistryID

func NewRegistryID(subscriptionId string, resourceGroupName string, registryName string) RegistryId

NewRegistryID returns a new RegistryId struct

func ParseRegistryID

func ParseRegistryID(input string) (*RegistryId, error)

ParseRegistryID parses 'input' into a RegistryId

func ParseRegistryIDInsensitively

func ParseRegistryIDInsensitively(input string) (*RegistryId, error)

ParseRegistryIDInsensitively parses 'input' case-insensitively into a RegistryId note: this method should only be used for API response data and not user input

func (RegistryId) ID

func (id RegistryId) ID() string

ID returns the formatted Registry ID

func (RegistryId) Segments

func (id RegistryId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Registry ID

func (RegistryId) String

func (id RegistryId) String() string

String returns a human-readable description of this Registry ID

type Run

type Run struct {
	Id         *string                `json:"id,omitempty"`
	Name       *string                `json:"name,omitempty"`
	Properties *RunProperties         `json:"properties,omitempty"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type RunProperties

type RunProperties struct {
	AgentConfiguration *AgentProperties         `json:"agentConfiguration,omitempty"`
	AgentPoolName      *string                  `json:"agentPoolName,omitempty"`
	CreateTime         *string                  `json:"createTime,omitempty"`
	CustomRegistries   *[]string                `json:"customRegistries,omitempty"`
	FinishTime         *string                  `json:"finishTime,omitempty"`
	ImageUpdateTrigger *ImageUpdateTrigger      `json:"imageUpdateTrigger,omitempty"`
	IsArchiveEnabled   *bool                    `json:"isArchiveEnabled,omitempty"`
	LastUpdatedTime    *string                  `json:"lastUpdatedTime,omitempty"`
	LogArtifact        *ImageDescriptor         `json:"logArtifact,omitempty"`
	OutputImages       *[]ImageDescriptor       `json:"outputImages,omitempty"`
	Platform           *PlatformProperties      `json:"platform,omitempty"`
	ProvisioningState  *ProvisioningState       `json:"provisioningState,omitempty"`
	RunErrorMessage    *string                  `json:"runErrorMessage,omitempty"`
	RunId              *string                  `json:"runId,omitempty"`
	RunType            *RunType                 `json:"runType,omitempty"`
	SourceRegistryAuth *string                  `json:"sourceRegistryAuth,omitempty"`
	SourceTrigger      *SourceTriggerDescriptor `json:"sourceTrigger,omitempty"`
	StartTime          *string                  `json:"startTime,omitempty"`
	Status             *RunStatus               `json:"status,omitempty"`
	Task               *string                  `json:"task,omitempty"`
	TimerTrigger       *TimerTriggerDescriptor  `json:"timerTrigger,omitempty"`
	UpdateTriggerToken *string                  `json:"updateTriggerToken,omitempty"`
}

func (*RunProperties) GetCreateTimeAsTime

func (o *RunProperties) GetCreateTimeAsTime() (*time.Time, error)

func (*RunProperties) GetFinishTimeAsTime

func (o *RunProperties) GetFinishTimeAsTime() (*time.Time, error)

func (*RunProperties) GetLastUpdatedTimeAsTime

func (o *RunProperties) GetLastUpdatedTimeAsTime() (*time.Time, error)

func (*RunProperties) GetStartTimeAsTime

func (o *RunProperties) GetStartTimeAsTime() (*time.Time, error)

func (*RunProperties) SetCreateTimeAsTime

func (o *RunProperties) SetCreateTimeAsTime(input time.Time)

func (*RunProperties) SetFinishTimeAsTime

func (o *RunProperties) SetFinishTimeAsTime(input time.Time)

func (*RunProperties) SetLastUpdatedTimeAsTime

func (o *RunProperties) SetLastUpdatedTimeAsTime(input time.Time)

func (*RunProperties) SetStartTimeAsTime

func (o *RunProperties) SetStartTimeAsTime(input time.Time)

type RunRequest

type RunRequest interface {
}

type RunStatus

type RunStatus string
const (
	RunStatusCanceled  RunStatus = "Canceled"
	RunStatusError     RunStatus = "Error"
	RunStatusFailed    RunStatus = "Failed"
	RunStatusQueued    RunStatus = "Queued"
	RunStatusRunning   RunStatus = "Running"
	RunStatusStarted   RunStatus = "Started"
	RunStatusSucceeded RunStatus = "Succeeded"
	RunStatusTimeout   RunStatus = "Timeout"
)

func (*RunStatus) UnmarshalJSON added in v0.20230406.1124617

func (s *RunStatus) UnmarshalJSON(bytes []byte) error

type RunType

type RunType string
const (
	RunTypeAutoBuild  RunType = "AutoBuild"
	RunTypeAutoRun    RunType = "AutoRun"
	RunTypeQuickBuild RunType = "QuickBuild"
	RunTypeQuickRun   RunType = "QuickRun"
)

func (*RunType) UnmarshalJSON added in v0.20230406.1124617

func (s *RunType) UnmarshalJSON(bytes []byte) error

type ScheduleRunOperationResponse

type ScheduleRunOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type SecretObject

type SecretObject struct {
	Type  *SecretObjectType `json:"type,omitempty"`
	Value *string           `json:"value,omitempty"`
}

type SecretObjectType

type SecretObjectType string
const (
	SecretObjectTypeOpaque      SecretObjectType = "Opaque"
	SecretObjectTypeVaultsecret SecretObjectType = "Vaultsecret"
)

func (*SecretObjectType) UnmarshalJSON added in v0.20230406.1124617

func (s *SecretObjectType) UnmarshalJSON(bytes []byte) error

type SetValue

type SetValue struct {
	IsSecret *bool  `json:"isSecret,omitempty"`
	Name     string `json:"name"`
	Value    string `json:"value"`
}

type SourceRegistryCredentials

type SourceRegistryCredentials struct {
	LoginMode *SourceRegistryLoginMode `json:"loginMode,omitempty"`
}

type SourceRegistryLoginMode

type SourceRegistryLoginMode string
const (
	SourceRegistryLoginModeDefault SourceRegistryLoginMode = "Default"
	SourceRegistryLoginModeNone    SourceRegistryLoginMode = "None"
)

func (*SourceRegistryLoginMode) UnmarshalJSON added in v0.20230406.1124617

func (s *SourceRegistryLoginMode) UnmarshalJSON(bytes []byte) error

type SourceTriggerDescriptor

type SourceTriggerDescriptor struct {
	BranchName    *string `json:"branchName,omitempty"`
	CommitId      *string `json:"commitId,omitempty"`
	EventType     *string `json:"eventType,omitempty"`
	Id            *string `json:"id,omitempty"`
	ProviderType  *string `json:"providerType,omitempty"`
	PullRequestId *string `json:"pullRequestId,omitempty"`
	RepositoryUrl *string `json:"repositoryUrl,omitempty"`
}

type SourceUploadDefinition

type SourceUploadDefinition struct {
	RelativePath *string `json:"relativePath,omitempty"`
	UploadUrl    *string `json:"uploadUrl,omitempty"`
}

type TaskRunRequest

type TaskRunRequest struct {
	OverrideTaskStepProperties *OverrideTaskStepProperties `json:"overrideTaskStepProperties,omitempty"`
	TaskId                     string                      `json:"taskId"`

	// Fields inherited from RunRequest
	AgentPoolName    *string `json:"agentPoolName,omitempty"`
	IsArchiveEnabled *bool   `json:"isArchiveEnabled,omitempty"`
	LogTemplate      *string `json:"logTemplate,omitempty"`
}

func (TaskRunRequest) MarshalJSON

func (s TaskRunRequest) MarshalJSON() ([]byte, error)

type TimerTriggerDescriptor

type TimerTriggerDescriptor struct {
	ScheduleOccurrence *string `json:"scheduleOccurrence,omitempty"`
	TimerTriggerName   *string `json:"timerTriggerName,omitempty"`
}

type Variant

type Variant string
const (
	VariantVEight Variant = "v8"
	VariantVSeven Variant = "v7"
	VariantVSix   Variant = "v6"
)

func (*Variant) UnmarshalJSON added in v0.20230406.1124617

func (s *Variant) UnmarshalJSON(bytes []byte) error

Jump to

Keyboard shortcuts

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