provider

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: MPL-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(version string) func() provider.Provider

func NewLoggingTransport added in v0.0.7

func NewLoggingTransport(baseTransport http.RoundTripper) http.RoundTripper

NewLoggingTransport wraps an http.RoundTripper with logging using tflog.

func NewUserResource

func NewUserResource() resource.Resource

Types

type Client

type Client struct {
	ClientId     string
	ClientSecret string
	HTTPClient   *http.Client
	BaseURL      string
	Realm        string
	Token        string
	// contains filtered or unexported fields
}

func NewClient

func NewClient(clientId string, clientSecret string, baseURL string, realm string, httpClient *http.Client) *Client

func (*Client) GetToken

func (c *Client) GetToken(ctx context.Context) (string, error)

func (*Client) GetUser added in v0.0.7

func (c *Client) GetUser(ctx context.Context, id string) (User, error)

func (*Client) GetUserId

func (c *Client) GetUserId(ctx context.Context, username string) (string, error)

type KeycloakUserCacheProvider

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

KeycloakUserCacheProvider defines the provider implementation.

func (*KeycloakUserCacheProvider) Configure

func (*KeycloakUserCacheProvider) DataSources

func (p *KeycloakUserCacheProvider) DataSources(ctx context.Context) []func() datasource.DataSource

func (*KeycloakUserCacheProvider) Metadata

func (*KeycloakUserCacheProvider) Resources

func (p *KeycloakUserCacheProvider) Resources(ctx context.Context) []func() resource.Resource

func (*KeycloakUserCacheProvider) Schema

type KeycloakUserCacheProviderModel

type KeycloakUserCacheProviderModel struct {
	ClientID     types.String `tfsdk:"client_id"`
	ClientSecret types.String `tfsdk:"client_secret"`
	Realm        types.String `tfsdk:"realm"`
	URL          types.String `tfsdk:"url"`
}

KeycloakUserCacheProviderModel describes the provider schema.

type TokenResponse

type TokenResponse struct {
	AccessToken string `json:"access_token"`
	TokenType   string `json:"token_type"`
}

type User

type User struct {
	Username string `json:"username"`
	ID       string `json:"id"`
}

type UserResource

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

UserResource defines the resource implementation.

func (*UserResource) Configure

func (*UserResource) Create

func (*UserResource) Delete

func (*UserResource) ImportState

func (*UserResource) Metadata

func (*UserResource) Read

func (*UserResource) Schema

func (*UserResource) Update

type UserResourceModel

type UserResourceModel struct {
	Username types.String `tfsdk:"username"`
	ID       types.String `tfsdk:"id"`
}

UserResourceModel describes the resource data model.

Jump to

Keyboard shortcuts

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