Documentation ¶
Index ¶
- func New() resource.Resource
- type Resource
- func (r *Resource) Configure(_ context.Context, req resource.ConfigureRequest, ...)
- func (r *Resource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *Resource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *Resource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *Resource) Metadata(_ context.Context, req resource.MetadataRequest, ...)
- func (r *Resource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *Resource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *Resource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type ResourceDestinationCommandModel
- func (m *ResourceDestinationCommandModel) AsAPIModel() mittwaldv2.DeMittwaldV1CronjobCronjobCommand
- func (m *ResourceDestinationCommandModel) AsDestinationModel(ctx context.Context, diag *diag.Diagnostics) *ResourceDestinationModel
- func (m *ResourceDestinationCommandModel) FromAPIModel(ctx context.Context, apiModel *mittwaldv2.DeMittwaldV1CronjobCronjobCommand) (res diag.Diagnostics)
- func (m *ResourceDestinationCommandModel) ParametersAsStr() *string
- func (m *ResourceDestinationCommandModel) ParametersAsStrSlice() []string
- type ResourceDestinationModel
- func (m *ResourceDestinationModel) AsObject(ctx context.Context, d *diag.Diagnostics) types.Object
- func (m *ResourceDestinationModel) GetCommand(ctx context.Context, d *diag.Diagnostics) (*ResourceDestinationCommandModel, bool)
- func (m *ResourceDestinationModel) GetURL(ctx context.Context, d *diag.Diagnostics) (ResourceDestinationURLModel, bool)
- type ResourceDestinationURLModel
- type ResourceModel
- func (m *ResourceModel) FromAPIModel(ctx context.Context, apiModel *mittwaldv2.DeMittwaldV1CronjobCronjob) (res diag.Diagnostics)
- func (m *ResourceModel) GetDestination(ctx context.Context, d *diag.Diagnostics) *ResourceDestinationModel
- func (m *ResourceModel) ToCreateRequest(ctx context.Context, d *diag.Diagnostics) mittwaldv2.CronjobCreateCronjobJSONRequestBody
- func (m *ResourceModel) ToUpdateRequest(ctx context.Context, d *diag.Diagnostics, current *ResourceModel) mittwaldv2.CronjobUpdateCronjobJSONRequestBody
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Resource ¶
type Resource struct {
// contains filtered or unexported fields
}
func (*Resource) Configure ¶
func (r *Resource) Configure(_ context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
func (*Resource) Create ¶
func (r *Resource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*Resource) Delete ¶
func (r *Resource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*Resource) ImportState ¶
func (r *Resource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (*Resource) Metadata ¶
func (r *Resource) Metadata(_ context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (*Resource) Read ¶
func (r *Resource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*Resource) Schema ¶
func (r *Resource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse)
func (*Resource) Update ¶
func (r *Resource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
type ResourceDestinationCommandModel ¶
type ResourceDestinationCommandModel struct { Interpreter types.String `tfsdk:"interpreter"` Path types.String `tfsdk:"path"` Parameters types.List `tfsdk:"parameters"` }
func (*ResourceDestinationCommandModel) AsAPIModel ¶
func (m *ResourceDestinationCommandModel) AsAPIModel() mittwaldv2.DeMittwaldV1CronjobCronjobCommand
func (*ResourceDestinationCommandModel) AsDestinationModel ¶
func (m *ResourceDestinationCommandModel) AsDestinationModel(ctx context.Context, diag *diag.Diagnostics) *ResourceDestinationModel
func (*ResourceDestinationCommandModel) FromAPIModel ¶
func (m *ResourceDestinationCommandModel) FromAPIModel(ctx context.Context, apiModel *mittwaldv2.DeMittwaldV1CronjobCronjobCommand) (res diag.Diagnostics)
func (*ResourceDestinationCommandModel) ParametersAsStr ¶
func (m *ResourceDestinationCommandModel) ParametersAsStr() *string
func (*ResourceDestinationCommandModel) ParametersAsStrSlice ¶
func (m *ResourceDestinationCommandModel) ParametersAsStrSlice() []string
type ResourceDestinationModel ¶
type ResourceDestinationModel struct { URL types.String `tfsdk:"url"` Command types.Object `tfsdk:"command"` }
func (*ResourceDestinationModel) AsObject ¶
func (m *ResourceDestinationModel) AsObject(ctx context.Context, d *diag.Diagnostics) types.Object
func (*ResourceDestinationModel) GetCommand ¶
func (m *ResourceDestinationModel) GetCommand(ctx context.Context, d *diag.Diagnostics) (*ResourceDestinationCommandModel, bool)
func (*ResourceDestinationModel) GetURL ¶
func (m *ResourceDestinationModel) GetURL(ctx context.Context, d *diag.Diagnostics) (ResourceDestinationURLModel, bool)
type ResourceDestinationURLModel ¶
type ResourceDestinationURLModel string
func (ResourceDestinationURLModel) AsAPIModel ¶
func (m ResourceDestinationURLModel) AsAPIModel() mittwaldv2.DeMittwaldV1CronjobCronjobUrl
func (ResourceDestinationURLModel) AsDestinationModel ¶
func (m ResourceDestinationURLModel) AsDestinationModel() *ResourceDestinationModel
type ResourceModel ¶
type ResourceModel struct { ID types.String `tfsdk:"id"` ProjectID types.String `tfsdk:"project_id"` AppID types.String `tfsdk:"app_id"` Description types.String `tfsdk:"description"` Interval types.String `tfsdk:"interval"` Destination types.Object `tfsdk:"destination"` Email types.String `tfsdk:"email"` }
func (*ResourceModel) FromAPIModel ¶
func (m *ResourceModel) FromAPIModel(ctx context.Context, apiModel *mittwaldv2.DeMittwaldV1CronjobCronjob) (res diag.Diagnostics)
func (*ResourceModel) GetDestination ¶
func (m *ResourceModel) GetDestination(ctx context.Context, d *diag.Diagnostics) *ResourceDestinationModel
func (*ResourceModel) ToCreateRequest ¶
func (m *ResourceModel) ToCreateRequest(ctx context.Context, d *diag.Diagnostics) mittwaldv2.CronjobCreateCronjobJSONRequestBody
func (*ResourceModel) ToUpdateRequest ¶
func (m *ResourceModel) ToUpdateRequest(ctx context.Context, d *diag.Diagnostics, current *ResourceModel) mittwaldv2.CronjobUpdateCronjobJSONRequestBody
Click to show internal directories.
Click to hide internal directories.