template

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

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 (o Policy) MarshalJSON() ([]byte, error)

func (*Policy) SetTtlConfig

func (o *Policy) SetTtlConfig(v *TtlConfig) *Policy

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.

func New

func New(sess *session.Session, cfgs ...*controlmonkey.Config) Service

type ServiceOp

type ServiceOp struct {
	Client *client.Client
}

func (*ServiceOp) CreateTemplate

func (s *ServiceOp) CreateTemplate(ctx context.Context, input *Template) (*Template, error)

func (*ServiceOp) CreateTemplateNamespaceMapping added in v1.7.0

func (s *ServiceOp) CreateTemplateNamespaceMapping(ctx context.Context, input *TemplateNamespaceMapping) (*TemplateNamespaceMapping, error)

func (*ServiceOp) DeleteTemplate

func (s *ServiceOp) DeleteTemplate(ctx context.Context, templateId string) (*commons.EmptyResponse, error)

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 (s *ServiceOp) ListTemplateNamespaceMappings(ctx context.Context, templateId string) ([]*TemplateNamespaceMapping, error)

func (*ServiceOp) ReadTemplate

func (s *ServiceOp) ReadTemplate(ctx context.Context, templateId string) (*Template, error)

func (*ServiceOp) UpdateTemplate

func (s *ServiceOp) UpdateTemplate(ctx context.Context, templateId string, input *Template) (*Template, error)

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 (o Template) MarshalJSON() ([]byte, error)

func (*Template) SetDescription

func (o *Template) SetDescription(v *string) *Template

func (*Template) SetIacType

func (o *Template) SetIacType(v *string) *Template

func (*Template) SetName

func (o *Template) SetName(v *string) *Template

func (*Template) SetPolicy

func (o *Template) SetPolicy(v *Policy) *Template

func (*Template) SetSkipStateRefreshOnDestroy added in v1.6.0

func (o *Template) SetSkipStateRefreshOnDestroy(v *bool) *Template

func (*Template) SetVcsInfo

func (o *Template) SetVcsInfo(v *VcsInfo) *Template

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 (*TemplateNamespaceMapping) SetTemplateId added in v1.7.0

type TtlConfig

type TtlConfig struct {
	MaxTtl     *TtlDefinition `json:"maxTtl,omitempty"`
	DefaultTtl *TtlDefinition `json:"defaultTtl,omitempty"`
	// contains filtered or unexported fields
}

func (TtlConfig) MarshalJSON

func (o TtlConfig) MarshalJSON() ([]byte, error)

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 (o VcsInfo) MarshalJSON() ([]byte, error)

func (*VcsInfo) SetBranch

func (o *VcsInfo) SetBranch(v *string) *VcsInfo

func (*VcsInfo) SetPath

func (o *VcsInfo) SetPath(v *string) *VcsInfo

func (*VcsInfo) SetProviderId

func (o *VcsInfo) SetProviderId(v *string) *VcsInfo

func (*VcsInfo) SetRepoName

func (o *VcsInfo) SetRepoName(v *string) *VcsInfo

Jump to

Keyboard shortcuts

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