indykite

package
v0.4.2 Latest Latest
Warning

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

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

Documentation

Overview

Package indykite implements terraform data and resource provider.

Index

Constants

This section is empty.

Variables

AuthorizationPolicyStatusTypes defines all supported StatusTypes and its mapping.

OAuth2ClientSubjectTypes defines all supported Client Subjects and its mapping.

View Source
var OAuth2ClientSubjectTypesReverse = ReverseProtoEnumMap(OAuth2ClientSubjectTypes)

OAuth2ClientSubjectTypesReverse defines all supported Client Subjects and its reversed mapping.

OAuth2GrantTypes defines all supported GrantTypes and its mapping.

OAuth2ResponseTypes defines all supported ResponseTypes and its mapping.

OAuth2TokenEndpointAuthMethods defines all supported Token Endpoint Auth Methods and its mapping.

View Source
var OAuth2TokenEndpointAuthMethodsReverse = ReverseProtoEnumMap(OAuth2TokenEndpointAuthMethods)

OAuth2TokenEndpointAuthMethodsReverse defines all supported Token Endpoint Auth Methods and its reversed mapping.

Functions

func DisplayNameCredentialDiffSuppress

func DisplayNameCredentialDiffSuppress(k, old, newVal string, d *schema.ResourceData) bool

DisplayNameCredentialDiffSuppress suppress Terraform changes when it contains KID returned from API.

func DisplayNameDiffSuppress

func DisplayNameDiffSuppress(k, old, newVal string, d *schema.ResourceData) bool

DisplayNameDiffSuppress suppress Terraform changes when it contains name returned from API.

func HasFailed added in v0.4.1

func HasFailed(d *diag.Diagnostics, err error) bool

HasFailed checks if error is not nil and if it is, it will add it to diagnostics.

func Provider

func Provider() *schema.Provider

Provider returns a terraform.ResourceProvider.

func ReverseProtoEnumMap

func ReverseProtoEnumMap[Key, Value comparable](in map[Key]Value) map[Value]Key

ReverseProtoEnumMap create reverse map, where value is key and key is value of Proto Enum.

func SuppressDurationDiff added in v0.2.1

func SuppressDurationDiff(_, oldValue, newValue string, _ *schema.ResourceData) bool

SuppressDurationDiff compares duration written as string and compare if value is the same or not. So values like 1h or 60m is the same.

func SuppressYamlDiff

func SuppressYamlDiff(_, old, newVal string, _ *schema.ResourceData) bool

SuppressYamlDiff verify that 2 YAML strings are the same in value and suppress Terraform changes.

func ValidateEmail

func ValidateEmail(i any, path cty.Path) diag.Diagnostics

ValidateEmail is Terraform validation helper to verify value is valid email.

func ValidateGID

func ValidateGID(i any, path cty.Path) diag.Diagnostics

ValidateGID is Terraform validation helper to verify value is valid gid.

func ValidateName

func ValidateName(i any, path cty.Path) diag.Diagnostics

ValidateName is Terraform validation helper to verify value is valid name.

func ValidateYaml

func ValidateYaml(i any, path cty.Path) diag.Diagnostics

ValidateYaml is Terraform validation helper to verify value is valid YAML.

func WithClient added in v0.2.0

func WithClient(ctx context.Context, c *config.Client) context.Context

WithClient stores the config client into the context.

Types

type ClientContext

type ClientContext struct {
	// contains filtered or unexported fields
}

ClientContext defines structure returned by ConfigureContextFunc, which is passed into resources as meta arguemnt.

func (*ClientContext) AddBookmarks added in v0.2.0

func (x *ClientContext) AddBookmarks(bookmarks ...string)

AddBookmarks adds new bookmarks to round queue. Calling repeatedly will add more and more bookmarks while remove old ones. Size of queue should reflect Terraform parallelism and API restrictions.

func (*ClientContext) GetBookmarks added in v0.2.0

func (x *ClientContext) GetBookmarks() []string

GetBookmarks returns all stored bookmarks in the round queue. Size of queue, and thus amount of bookmarks returned, should reflect Terraform parallelism and API restrictions.

func (*ClientContext) GetClient added in v0.2.0

func (x *ClientContext) GetClient() *config.Client

GetClient returns Config client, which exposes the whole config API.

type ProtoValidateError

type ProtoValidateError interface {
	Field() string
	Reason() string
	Cause() error
	Key() bool
	ErrorName() string
}

ProtoValidateError tries to define interface for all Proto Validation errors, so we can generate better errors back to user.

Directories

Path Synopsis
Package test contains helper functions for unit testing.
Package test contains helper functions for unit testing.

Jump to

Keyboard shortcuts

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