Documentation
¶
Index ¶
- type ListTemplatesParams
- type Policy
- type Service
- type ServiceOp
- func (s *ServiceOp) CreateTemplate(ctx context.Context, input *Template) (*Template, error)
- func (s *ServiceOp) CreateTemplateNamespaceMapping(ctx context.Context, input *TemplateNamespaceMapping) (*TemplateNamespaceMapping, error)
- func (s *ServiceOp) DeleteTemplate(ctx context.Context, templateId string) (*commons.EmptyResponse, error)
- func (s *ServiceOp) DeleteTemplateNamespaceMapping(ctx context.Context, input *TemplateNamespaceMapping) (*commons.EmptyResponse, error)
- func (s *ServiceOp) ListTemplateNamespaceMappings(ctx context.Context, templateId string) ([]*TemplateNamespaceMapping, error)
- func (s *ServiceOp) ReadTemplate(ctx context.Context, templateId string) (*Template, error)
- func (s *ServiceOp) UpdateTemplate(ctx context.Context, templateId string, input *Template) (*Template, error)
- type Template
- func (o Template) MarshalJSON() ([]byte, error)
- func (o *Template) SetDescription(v *string) *Template
- func (o *Template) SetIacType(v *string) *Template
- func (o *Template) SetName(v *string) *Template
- func (o *Template) SetPolicy(v *Policy) *Template
- func (o *Template) SetSkipStateRefreshOnDestroy(v *bool) *Template
- func (o *Template) SetVcsInfo(v *VcsInfo) *Template
- type TemplateNamespaceMapping
- type TtlConfig
- type TtlDefinition
- type VcsInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ListTemplatesParams ¶
type ListTemplatesParams struct {
NamespaceId *string
}
type Policy ¶
type Policy struct {
TtlConfig *TtlConfig `json:"ttlConfig,omitempty"`
// contains filtered or unexported fields
}
func (Policy) MarshalJSON ¶
func (*Policy) SetTtlConfig ¶
type Service ¶
type Service interface {
CreateTemplate(context.Context, *Template) (*Template, error)
ReadTemplate(context.Context, string) (*Template, error)
UpdateTemplate(context.Context, string, *Template) (*Template, error)
DeleteTemplate(context.Context, string) (*commons.EmptyResponse, error)
ListTemplateNamespaceMappings(context.Context, string) ([]*TemplateNamespaceMapping, error)
CreateTemplateNamespaceMapping(context.Context, *TemplateNamespaceMapping) (*TemplateNamespaceMapping, error)
DeleteTemplateNamespaceMapping(context.Context, *TemplateNamespaceMapping) (*commons.EmptyResponse, error)
}
Service provides the API operation methods for making requests to endpoints of the ControlMonkey API. See this package's package overview docs for details on the service.
type ServiceOp ¶
func (*ServiceOp) CreateTemplate ¶
func (*ServiceOp) CreateTemplateNamespaceMapping ¶ added in v1.7.0
func (s *ServiceOp) CreateTemplateNamespaceMapping(ctx context.Context, input *TemplateNamespaceMapping) (*TemplateNamespaceMapping, error)
func (*ServiceOp) DeleteTemplate ¶
func (*ServiceOp) DeleteTemplateNamespaceMapping ¶ added in v1.7.0
func (s *ServiceOp) DeleteTemplateNamespaceMapping(ctx context.Context, input *TemplateNamespaceMapping) (*commons.EmptyResponse, error)
func (*ServiceOp) ListTemplateNamespaceMappings ¶ added in v1.7.0
func (*ServiceOp) ReadTemplate ¶
type Template ¶
type Template struct {
ID *string `json:"id,omitempty"` // read-only
Name *string `json:"name,omitempty"`
IacType *string `json:"iacType,omitempty"` //commons.IacTypes
Description *string `json:"description,omitempty"`
VcsInfo *VcsInfo `json:"vcsInfo,omitempty"`
Policy *Policy `json:"policy,omitempty"`
SkipStateRefreshOnDestroy *bool `json:"skipStateRefreshOnDestroy,omitempty"`
// contains filtered or unexported fields
}
func (Template) MarshalJSON ¶
func (*Template) SetDescription ¶
func (*Template) SetIacType ¶
func (*Template) SetSkipStateRefreshOnDestroy ¶ added in v1.6.0
func (*Template) SetVcsInfo ¶
type TemplateNamespaceMapping ¶ added in v1.7.0
type TemplateNamespaceMapping struct {
TemplateId *string `json:"templateId,omitempty"`
NamespaceId *string `json:"namespaceId,omitempty"`
// contains filtered or unexported fields
}
func (TemplateNamespaceMapping) MarshalJSON ¶ added in v1.7.0
func (o TemplateNamespaceMapping) MarshalJSON() ([]byte, error)
func (*TemplateNamespaceMapping) SetNamespaceId ¶ added in v1.7.0
func (o *TemplateNamespaceMapping) SetNamespaceId(v *string) *TemplateNamespaceMapping
func (*TemplateNamespaceMapping) SetTemplateId ¶ added in v1.7.0
func (o *TemplateNamespaceMapping) SetTemplateId(v *string) *TemplateNamespaceMapping
type TtlConfig ¶
type TtlConfig struct {
MaxTtl *TtlDefinition `json:"maxTtl,omitempty"`
DefaultTtl *TtlDefinition `json:"defaultTtl,omitempty"`
// contains filtered or unexported fields
}
func (TtlConfig) MarshalJSON ¶
func (*TtlConfig) SetDefaultTtl ¶
func (o *TtlConfig) SetDefaultTtl(v *TtlDefinition) *TtlConfig
func (*TtlConfig) SetMaxTtl ¶
func (o *TtlConfig) SetMaxTtl(v *TtlDefinition) *TtlConfig
type TtlDefinition ¶
type TtlDefinition struct {
Type *string `json:"type,omitempty"` //commons.TtlTypes
Value *int `json:"value,omitempty"`
// contains filtered or unexported fields
}
func (TtlDefinition) MarshalJSON ¶
func (o TtlDefinition) MarshalJSON() ([]byte, error)
func (*TtlDefinition) SetType ¶
func (o *TtlDefinition) SetType(v *string) *TtlDefinition
func (*TtlDefinition) SetValue ¶
func (o *TtlDefinition) SetValue(v *int) *TtlDefinition
type VcsInfo ¶
type VcsInfo struct {
ProviderId *string `json:"providerId,omitempty"`
RepoName *string `json:"repoName,omitempty"`
Path *string `json:"path,omitempty"`
Branch *string `json:"branch,omitempty"`
// contains filtered or unexported fields
}
func (VcsInfo) MarshalJSON ¶
func (*VcsInfo) SetProviderId ¶
func (*VcsInfo) SetRepoName ¶
Click to show internal directories.
Click to hide internal directories.