challenge

package
v0.1.14 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FunctionLinear      = types.StringValue("linear")
	FunctionLogarithmic = types.StringValue("logarithmic")
)
View Source
var (
	BehaviorHidden     = types.StringValue("hidden")
	BehaviorAnonymized = types.StringValue("anonymized")
)

Functions

func FileSubdatasourceAttributes

func FileSubdatasourceAttributes() map[string]schema.Attribute

func FileSubresourceAttributes

func FileSubresourceAttributes() map[string]schema.Attribute

func FlagSubdatasourceAttributes

func FlagSubdatasourceAttributes() map[string]schema.Attribute

func FlagSubresourceAttributes

func FlagSubresourceAttributes() map[string]schema.Attribute

func FromAnon

func FromAnon(b *bool) types.String

func GetAnon

func GetAnon(str types.String) *bool

func HintSubdatasourceAttributes

func HintSubdatasourceAttributes() map[string]schema.Attribute

func HintSubresourceAttributes

func HintSubresourceAttributes() map[string]schema.Attribute

Types

type FileSubresourceModel

type FileSubresourceModel struct {
	ID         types.String `tfsdk:"id"`
	Name       types.String `tfsdk:"name"`
	Location   types.String `tfsdk:"location"`
	SHA1Sum    types.String `tfsdk:"sha1sum"`
	Content    types.String `tfsdk:"content"`
	ContentB64 types.String `tfsdk:"contentb64"`
}

func (*FileSubresourceModel) Create

func (data *FileSubresourceModel) Create(ctx context.Context, diags diag.Diagnostics, client *api.Client, challengeID int)

func (*FileSubresourceModel) Delete

func (data *FileSubresourceModel) Delete(ctx context.Context, diags diag.Diagnostics, client *api.Client)

func (*FileSubresourceModel) PropagateContent

func (data *FileSubresourceModel) PropagateContent(ctx context.Context, diags diag.Diagnostics)

func (*FileSubresourceModel) Read

func (file *FileSubresourceModel) Read(ctx context.Context, diags diag.Diagnostics, client *api.Client)

Read fetches all the file's information, only requiring the ID to be set.

type FlagSubresourceModel

type FlagSubresourceModel struct {
	ID      types.String `tfsdk:"id"`
	Content types.String `tfsdk:"content"`
	Data    types.String `tfsdk:"data"`
	Type    types.String `tfsdk:"type"`
}

func (*FlagSubresourceModel) Create

func (data *FlagSubresourceModel) Create(ctx context.Context, diags diag.Diagnostics, client *api.Client, challengeID int)

func (*FlagSubresourceModel) Delete

func (data *FlagSubresourceModel) Delete(ctx context.Context, diags diag.Diagnostics, client *api.Client)

func (*FlagSubresourceModel) Update

func (data *FlagSubresourceModel) Update(ctx context.Context, diags diag.Diagnostics, client *api.Client)

type HintSubresourceModel

type HintSubresourceModel struct {
	ID           types.String `tfsdk:"id"`
	Content      types.String `tfsdk:"content"`
	Cost         types.Int64  `tfsdk:"cost"`
	Requirements types.List   `tfsdk:"requirements"`
}

func (*HintSubresourceModel) Create

func (data *HintSubresourceModel) Create(ctx context.Context, diags diag.Diagnostics, client *api.Client, challengeID int)

func (*HintSubresourceModel) Delete

func (data *HintSubresourceModel) Delete(ctx context.Context, diags diag.Diagnostics, client *api.Client)

func (*HintSubresourceModel) Update

func (data *HintSubresourceModel) Update(ctx context.Context, diags diag.Diagnostics, client *api.Client)

type RequirementsSubresourceModel

type RequirementsSubresourceModel struct {
	Behavior      types.String   `tfsdk:"behavior"`
	Prerequisites []types.String `tfsdk:"prerequisites"`
}

Jump to

Keyboard shortcuts

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