INNER CODE UNIT · Go
NewBytesEphemeralResource
hashicorp/terraform-provider-random · internal/provider/ephemeral_bytes.go:25
func NewBytesEphemeralResource() ephemeral.EphemeralResource {
return &bytesEphemeralResource{}
}
type bytesEphemeralResource struct{}
type ephemeralBytesModel struct {
Length types.Int64 `tfsdk:"length"`
Base64 types.String `tfsdk:"base64"`
Hex types.String `tfsdk:"hex"`
}
func (e *bytesEphemeralResource) Metadata(ctx context.Context, req ephemeral.MetadataRequest, resp *ephemeral.MetadataResponse) {
resp.TypeName = req.ProviderTypeName + "_bytes"
}
func (e *bytesEphemeralResource) Schema(ctx context.Context, req ephemeral.SchemaRequest, resp *ephemeral.SchemaResponse) {
resp.Schema = schema.Schema{