Documentation ¶
Index ¶
- func APIErrorMsg(r io.Reader) string
- func CACerts(t *testing.T) (string, string)
- func Deref[T dereferencable](v *T) (r T)
- func Describe(component string) (string, map[string]string, error)
- func DiagnosticsToErr(diagnostics diag.Diagnostics) error
- func FixAttestationAuthority(t *testing.T, catalog string) *v20230301.AttestationAuthority
- func IsDurationEqual(a, b string) bool
- func IsJSONEqual(a, b string) bool
- func NewAgentConfiguration(t *testing.T, authorityID, provisionerName, attestSlug string) *v20230301.AgentConfiguration
- func NewAuthority(t *testing.T) *v20230301.Authority
- func NewCollection(t *testing.T) *v20230301.Collection
- func NewCollectionInstance(t *testing.T, slug string) *v20230301.CollectionInstance
- func NewEndpointConfiguration(t *testing.T, authorityID, provisionerName string) *v20230301.EndpointConfiguration
- func NewJWK(t *testing.T, pass string) (string, string)
- func NewManagedConfiguration(t *testing.T, agentConfigID string, endpointConfigID string) *v20230301.ManagedConfiguration
- func NewOIDCProvisioner(t *testing.T, authorityID string) (*v20230301.Provisioner, *v20230301.OidcProvisioner)
- func NewWebhook(t *testing.T, provisionerID, authorityID string) *v20230301.ProvisionerWebhook
- func Slug(t *testing.T) string
- func SmallstepAPIClientFromEnv() (*v20230301.Client, error)
- func SweepAttestationAuthorities() error
- func ToEqualString(ctx context.Context, remote *string, state AttributeGetter, p path.Path, ...) (types.String, diag.Diagnostics)
- func ToIntPointer(i64 *int64) *int
- func ToOptionalBool(ctx context.Context, remote *bool, priorState AttributeGetter, p path.Path) (types.Bool, diag.Diagnostics)
- func ToOptionalInt(ctx context.Context, remote *int, priorState AttributeGetter, p path.Path) (types.Int64, diag.Diagnostics)
- func ToOptionalList(ctx context.Context, remote *[]string, priorState AttributeGetter, p path.Path) (types.List, diag.Diagnostics)
- func ToOptionalSet(ctx context.Context, remote *[]string, priorState AttributeGetter, p path.Path) (types.Set, diag.Diagnostics)
- func ToOptionalString[S Str](ctx context.Context, remote *S, priorState AttributeGetter, p path.Path) (types.String, diag.Diagnostics)
- func ToStringPointer[In Str, Out Str](str *In) *Out
- type AttributeGetter
- type IsStringEqual
- type Str
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func APIErrorMsg ¶
APIErrorMsg attempts to parse .Message from the API JSON response. Otherwise it returns the full response body.
func Deref ¶
func Deref[T dereferencable](v *T) (r T)
Deref gets the default value for a pointer type. This makes it easier to work with the generated API client code, which uses pointers for optional fields.
func Describe ¶
Describe parses descriptions for a component from its schema in Smallstep's OpenAPI spec. This ensures the terraform attribute documentation is kept in sync with the API spec.
func DiagnosticsToErr ¶ added in v0.2.0
func DiagnosticsToErr(diagnostics diag.Diagnostics) error
func FixAttestationAuthority ¶ added in v0.2.0
func FixAttestationAuthority(t *testing.T, catalog string) *v20230301.AttestationAuthority
There can only be 1 per team - don't try to create a new one if one exists
func IsDurationEqual ¶ added in v0.2.0
func IsJSONEqual ¶ added in v0.2.0
func NewAgentConfiguration ¶ added in v0.2.0
func NewAgentConfiguration(t *testing.T, authorityID, provisionerName, attestSlug string) *v20230301.AgentConfiguration
func NewCollection ¶ added in v0.2.0
func NewCollection(t *testing.T) *v20230301.Collection
func NewCollectionInstance ¶ added in v0.2.0
func NewCollectionInstance(t *testing.T, slug string) *v20230301.CollectionInstance
func NewEndpointConfiguration ¶ added in v0.2.0
func NewEndpointConfiguration(t *testing.T, authorityID, provisionerName string) *v20230301.EndpointConfiguration
func NewManagedConfiguration ¶ added in v0.2.0
func NewOIDCProvisioner ¶ added in v0.2.0
func NewOIDCProvisioner(t *testing.T, authorityID string) (*v20230301.Provisioner, *v20230301.OidcProvisioner)
func NewWebhook ¶ added in v0.2.0
func NewWebhook(t *testing.T, provisionerID, authorityID string) *v20230301.ProvisionerWebhook
func SweepAttestationAuthorities ¶ added in v0.2.0
func SweepAttestationAuthorities() error
func ToEqualString ¶ added in v0.2.0
func ToEqualString(ctx context.Context, remote *string, state AttributeGetter, p path.Path, isEqual IsStringEqual) (types.String, diag.Diagnostics)
ToEqualString checks if a remote string is equivalent to a string in state and if so uses the string from state. This is used to avoid "inconsistent result after apply" errors for JSON and duration strings.
func ToIntPointer ¶ added in v0.2.0
func ToOptionalBool ¶ added in v0.2.0
func ToOptionalBool(ctx context.Context, remote *bool, priorState AttributeGetter, p path.Path) (types.Bool, diag.Diagnostics)
func ToOptionalInt ¶ added in v0.2.0
func ToOptionalInt(ctx context.Context, remote *int, priorState AttributeGetter, p path.Path) (types.Int64, diag.Diagnostics)
func ToOptionalList ¶ added in v0.2.0
func ToOptionalList(ctx context.Context, remote *[]string, priorState AttributeGetter, p path.Path) (types.List, diag.Diagnostics)
func ToOptionalSet ¶ added in v0.2.0
func ToOptionalSet(ctx context.Context, remote *[]string, priorState AttributeGetter, p path.Path) (types.Set, diag.Diagnostics)
func ToOptionalString ¶ added in v0.2.0
func ToOptionalString[S Str](ctx context.Context, remote *S, priorState AttributeGetter, p path.Path) (types.String, diag.Diagnostics)
func ToStringPointer ¶ added in v0.2.0
Types ¶
type AttributeGetter ¶ added in v0.2.0
type IsStringEqual ¶ added in v0.2.0
type Str ¶ added in v0.2.0
type Str interface { string | v20230301.EndpointKeyInfoFormat | v20230301.EndpointKeyInfoType }