Documentation
¶
Index ¶
- Constants
- Variables
- func APISpecLintingJobGVK() apiv1.GroupVersionKind
- func APISpecLintingRulesetGVK() apiv1.GroupVersionKind
- func BatchJobGVK() apiv1.GroupVersionKind
- type APISpecLintingJob
- func (res *APISpecLintingJob) AsInstance() (*apiv1.ResourceInstance, error)
- func (res *APISpecLintingJob) FromInstance(ri *apiv1.ResourceInstance) error
- func (res *APISpecLintingJob) MarshalJSON() ([]byte, error)
- func (res *APISpecLintingJob) PluralName() string
- func (res *APISpecLintingJob) UnmarshalJSON(data []byte) error
- type APISpecLintingRuleset
- func (res *APISpecLintingRuleset) AsInstance() (*apiv1.ResourceInstance, error)
- func (res *APISpecLintingRuleset) FromInstance(ri *apiv1.ResourceInstance) error
- func (res *APISpecLintingRuleset) MarshalJSON() ([]byte, error)
- func (res *APISpecLintingRuleset) PluralName() string
- func (res *APISpecLintingRuleset) UnmarshalJSON(data []byte) error
- type ApiSpecLintingJobResult
- type ApiSpecLintingJobResultDetails
- type ApiSpecLintingJobResultLocation
- type ApiSpecLintingJobResultSummary
- type ApiSpecLintingJobSpec
- type ApiSpecLintingJobState
- type ApiSpecLintingRulesetSpec
- type ApiSpecLintingRulesetSpecDefinition
- type BatchJob
- type BatchJobProgress
- type BatchJobSpec
- type BatchJobSpecReferences
Constants ¶
const ( APISpecLintingJobResourceName = "apispeclintingjobs" ApiSpecLintingJobArchivedSubResourceName = "archived" ApiSpecLintingJobResultSubResourceName = "result" ApiSpecLintingJobStateSubResourceName = "state" )
const ( APISpecLintingRulesetResourceName = "apispeclintingrulesets" ApiSpecLintingRulesetRevisionSubResourceName = "revision" )
const ( BatchJobResourceName = "batchjobs" BatchJobProgressSubResourceName = "progress" )
Variables ¶
var ( APISpecLintingJobCtx log.ContextField = "apiSpecLintingJob" APISpecLintingJobScopes = []string{"Environment"} )
var ( APISpecLintingRulesetCtx log.ContextField = "apiSpecLintingRuleset" APISpecLintingRulesetScopes = []string{""} )
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"`
// Set the value to true if the linting result details count has reached the threshold
DetailsThresholdExceeded bool `json:"detailsThresholdExceeded,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 ¶
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 ¶
MarshalJSON custom marshaller to handle sub resources
func (*BatchJob) PluralName ¶
PluralName returns the plural name of the resource
func (*BatchJob) UnmarshalJSON ¶
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)
Source Files
¶
- APISpecLintingJob.go
- APISpecLintingRuleset.go
- BatchJob.go
- model_api_spec_linting_job_result.go
- model_api_spec_linting_job_result_details.go
- model_api_spec_linting_job_result_location.go
- model_api_spec_linting_job_result_summary.go
- model_api_spec_linting_job_spec.go
- model_api_spec_linting_job_state.go
- model_api_spec_linting_ruleset_spec.go
- model_api_spec_linting_ruleset_spec_definition.go
- model_batch_job_progress.go
- model_batch_job_spec.go
- model_batch_job_spec_references.go