management

package
v1.1.53 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APISpecLintingJobResourceName            = "apispeclintingjobs"
	ApiSpecLintingJobArchivedSubResourceName = "archived"
	ApiSpecLintingJobResultSubResourceName   = "result"
	ApiSpecLintingJobStateSubResourceName    = "state"
)
View Source
const (
	APISpecLintingRulesetResourceName            = "apispeclintingrulesets"
	ApiSpecLintingRulesetRevisionSubResourceName = "revision"
)
View Source
const (
	BatchJobResourceName            = "batchjobs"
	BatchJobProgressSubResourceName = "progress"
)

Variables

View Source
var (
	APISpecLintingJobCtx log.ContextField = "apiSpecLintingJob"

	APISpecLintingJobScopes = []string{"Environment"}
)
View Source
var (
	APISpecLintingRulesetCtx log.ContextField = "apiSpecLintingRuleset"

	APISpecLintingRulesetScopes = []string{""}
)
View Source
var (
	BatchJobCtx log.ContextField = "batchJob"

	BatchJobScopes = []string{"Environment"}
)

Functions

func APISpecLintingJobGVK

func APISpecLintingJobGVK() apiv1.GroupVersionKind

func APISpecLintingRulesetGVK

func APISpecLintingRulesetGVK() apiv1.GroupVersionKind

func BatchJobGVK

func BatchJobGVK() apiv1.GroupVersionKind

Types

type APISpecLintingJob

type APISpecLintingJob struct {
	apiv1.ResourceMeta
	Archived interface{}             `json:"archived"`
	Owner    *apiv1.Owner            `json:"owner"`
	Result   ApiSpecLintingJobResult `json:"result"`
	Spec     ApiSpecLintingJobSpec   `json:"spec"`
	State    ApiSpecLintingJobState  `json:"state"`
}

APISpecLintingJob Resource

func APISpecLintingJobFromInstanceArray

func APISpecLintingJobFromInstanceArray(fromArray []*apiv1.ResourceInstance) ([]*APISpecLintingJob, error)

APISpecLintingJobFromInstanceArray converts a []*ResourceInstance to a []*APISpecLintingJob

func NewAPISpecLintingJob

func NewAPISpecLintingJob(name, scopeName string) *APISpecLintingJob

NewAPISpecLintingJob creates an empty *APISpecLintingJob

func (*APISpecLintingJob) AsInstance

func (res *APISpecLintingJob) AsInstance() (*apiv1.ResourceInstance, error)

AsInstance converts a APISpecLintingJob to a ResourceInstance

func (*APISpecLintingJob) FromInstance

func (res *APISpecLintingJob) FromInstance(ri *apiv1.ResourceInstance) error

FromInstance converts a ResourceInstance to a APISpecLintingJob

func (*APISpecLintingJob) MarshalJSON

func (res *APISpecLintingJob) MarshalJSON() ([]byte, error)

MarshalJSON custom marshaller to handle sub resources

func (*APISpecLintingJob) PluralName

func (res *APISpecLintingJob) PluralName() string

PluralName returns the plural name of the resource

func (*APISpecLintingJob) UnmarshalJSON

func (res *APISpecLintingJob) UnmarshalJSON(data []byte) error

UnmarshalJSON custom unmarshaller to handle sub resources

type APISpecLintingRuleset

type APISpecLintingRuleset struct {
	apiv1.ResourceMeta
	Owner    *apiv1.Owner              `json:"owner"`
	Revision interface{}               `json:"revision"`
	Spec     ApiSpecLintingRulesetSpec `json:"spec"`
}

APISpecLintingRuleset Resource

func APISpecLintingRulesetFromInstanceArray

func APISpecLintingRulesetFromInstanceArray(fromArray []*apiv1.ResourceInstance) ([]*APISpecLintingRuleset, error)

APISpecLintingRulesetFromInstanceArray converts a []*ResourceInstance to a []*APISpecLintingRuleset

func NewAPISpecLintingRuleset

func NewAPISpecLintingRuleset(name string) *APISpecLintingRuleset

NewAPISpecLintingRuleset creates an empty *APISpecLintingRuleset

func (*APISpecLintingRuleset) AsInstance

func (res *APISpecLintingRuleset) AsInstance() (*apiv1.ResourceInstance, error)

AsInstance converts a APISpecLintingRuleset to a ResourceInstance

func (*APISpecLintingRuleset) FromInstance

func (res *APISpecLintingRuleset) FromInstance(ri *apiv1.ResourceInstance) error

FromInstance converts a ResourceInstance to a APISpecLintingRuleset

func (*APISpecLintingRuleset) MarshalJSON

func (res *APISpecLintingRuleset) MarshalJSON() ([]byte, error)

MarshalJSON custom marshaller to handle sub resources

func (*APISpecLintingRuleset) PluralName

func (res *APISpecLintingRuleset) PluralName() string

PluralName returns the plural name of the resource

func (*APISpecLintingRuleset) UnmarshalJSON

func (res *APISpecLintingRuleset) UnmarshalJSON(data []byte) error

UnmarshalJSON custom unmarshaller to handle sub resources

type ApiSpecLintingJobResult

type ApiSpecLintingJobResult struct {
	// The API Specification Linting Result details.
	Details []ApiSpecLintingJobResultDetails `json:"details"`
	Summary ApiSpecLintingJobResultSummary   `json:"summary"`
	// Reference to the APISpecLintingRuleset revision
	ApiSpecLintingRulesetRevision int32 `json:"apiSpecLintingRulesetRevision,omitempty"`
}

ApiSpecLintingJobResult (management.v1.APISpecLintingJob)

type ApiSpecLintingJobResultDetails

type ApiSpecLintingJobResultDetails struct {
	// Name of the validation rule.
	Rule string `json:"rule,omitempty"`
	// Description of the linting result.
	Message string `json:"message,omitempty"`
	// Level of severity of the linting result.
	Severity string `json:"severity,omitempty"`
	// Path to the result.
	Path     string                          `json:"path,omitempty"`
	Location ApiSpecLintingJobResultLocation `json:"location,omitempty"`
}

ApiSpecLintingJobResultDetails (management.v1.APISpecLintingJob)

type ApiSpecLintingJobResultLocation

type ApiSpecLintingJobResultLocation struct {
	// The 1-based line number in the API Specification File.
	Line int32 `json:"line"`
	// The 1-based character number in the API Specification File.
	Character int32 `json:"character"`
}

ApiSpecLintingJobResultLocation The location of the linting result. (management.v1.APISpecLintingJob)

type ApiSpecLintingJobResultSummary

type ApiSpecLintingJobResultSummary struct {
	// The total number of errors in the linting result.
	ErrorCount int32 `json:"errorCount,omitempty"`
	// The total number of warnings in the linting result.
	WarningCount int32 `json:"warningCount,omitempty"`
	// The total number of hints in the linting result.
	HintCount int32 `json:"hintCount,omitempty"`
	// The total number of infos in the linting result.
	InfoCount int32 `json:"infoCount,omitempty"`
	// Grade result from the results summary.
	Grade string `json:"grade,omitempty"`
}

ApiSpecLintingJobResultSummary Summary of the linting results. (management.v1.APISpecLintingJob)

type ApiSpecLintingJobSpec

type ApiSpecLintingJobSpec struct {
	// Reference to Amplify Central APIServiceRevision
	ApiServiceRevision string `json:"apiServiceRevision"`
	// Reference to Amplify Central APISpecLintingRuleset
	ApiSpecLintingRuleset string `json:"apiSpecLintingRuleset"`
}

ApiSpecLintingJobSpec (management.v1.APISpecLintingJob)

type ApiSpecLintingJobState

type ApiSpecLintingJobState struct {
	// The current state, indicating progress towards consistency.
	Name string `json:"name"`
	// Details of the state.
	Message string `json:"message,omitempty"`
	// Time when the update occurred.
	Timestamp time.Time `json:"timestamp,omitempty"`
}

ApiSpecLintingJobState (management.v1.APISpecLintingJob)

type ApiSpecLintingRulesetSpec

type ApiSpecLintingRulesetSpec struct {
	Definition ApiSpecLintingRulesetSpecDefinition `json:"definition,omitempty"`
	// Description of the API spec linting ruleset.
	Description string `json:"description,omitempty"`
}

ApiSpecLintingRulesetSpec (management.v1.APISpecLintingRuleset)

type ApiSpecLintingRulesetSpecDefinition

type ApiSpecLintingRulesetSpecDefinition struct {
	// The type of the API Specification Linting Ruleset.
	LintingType string `json:"lintingType"`
	// Base64 encoded value of the API Specification Linting Ruleset.
	Value string `json:"value"`
	// The MIME type of property \"value\" such as \"application/json\" or \"application/yaml\".
	ContentType string `json:"contentType"`
	// File name and extension of the APISpecLintingRuleset such as \"my-file.json\".
	FileName string `json:"fileName,omitempty"`
	// Defines if the APISpecLintingRuleset is default.
	IsDefault bool `json:"isDefault,omitempty"`
	// Indicates which API specification types can be linted by this ruleset.
	ApiTypes []string `json:"apiTypes"`
}

ApiSpecLintingRulesetSpecDefinition The API Specification Ruleset details. (management.v1.APISpecLintingRuleset)

type BatchJob

type BatchJob struct {
	apiv1.ResourceMeta
	Owner    *apiv1.Owner     `json:"owner"`
	Progress BatchJobProgress `json:"progress"`
	Spec     BatchJobSpec     `json:"spec"`
}

BatchJob Resource

func BatchJobFromInstanceArray

func BatchJobFromInstanceArray(fromArray []*apiv1.ResourceInstance) ([]*BatchJob, error)

BatchJobFromInstanceArray converts a []*ResourceInstance to a []*BatchJob

func NewBatchJob

func NewBatchJob(name, scopeName string) *BatchJob

NewBatchJob creates an empty *BatchJob

func (*BatchJob) AsInstance

func (res *BatchJob) AsInstance() (*apiv1.ResourceInstance, error)

AsInstance converts a BatchJob to a ResourceInstance

func (*BatchJob) FromInstance

func (res *BatchJob) FromInstance(ri *apiv1.ResourceInstance) error

FromInstance converts a ResourceInstance to a BatchJob

func (*BatchJob) MarshalJSON

func (res *BatchJob) MarshalJSON() ([]byte, error)

MarshalJSON custom marshaller to handle sub resources

func (*BatchJob) PluralName

func (res *BatchJob) PluralName() string

PluralName returns the plural name of the resource

func (*BatchJob) UnmarshalJSON

func (res *BatchJob) UnmarshalJSON(data []byte) error

UnmarshalJSON custom unmarshaller to handle sub resources

type BatchJobProgress

type BatchJobProgress struct {
	// The last 1-based page number requested from API Server.
	PageNumber int32 `json:"pageNumber,omitempty"`
	// The number of resources requested per page from API Server.
	PageSize int32 `json:"pageSize,omitempty"`
	// The query parameters used in the request.
	QueryParams string `json:"queryParams,omitempty"`
	// Name of scoped resource the job fetches resources from. Undefined for unscoped searches.
	ScopeName string `json:"scopeName,omitempty"`
}

BatchJobProgress (management.v1.BatchJob)

type BatchJobSpec

type BatchJobSpec struct {
	// Unique string ID assigned by a controller indicating what action this job is performing.
	Action     string                   `json:"action"`
	References []BatchJobSpecReferences `json:"references,omitempty"`
}

BatchJobSpec (management.v1.BatchJob)

type BatchJobSpecReferences

type BatchJobSpecReferences struct {
	Kind string `json:"kind,omitempty"`
	Name string `json:"name,omitempty"`
}

BatchJobSpecReferences (management.v1.BatchJob)

Jump to

Keyboard shortcuts

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