components

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: MIT Imports: 41 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultApiFactory = ApiFactoryFn(func(referencer AuthServerReferencer) API {
	configuration := authclient.NewConfiguration()
	configuration.Servers = []authclient.ServerConfiguration{{
		URL: fmt.Sprintf("http://%s-%s.%s.svc.cluster.local:8080",
			referencer.GetNamespace(),
			referencer.AuthServerReference(),
			referencer.GetNamespace()),
	}}
	return NewDefaultServerApi(authclient.NewAPIClient(configuration))
})
View Source
var ErrNotFound = errors.New("not found")

Functions

func ConvertError

func ConvertError(err error) error

Types

type API

type API interface {
	DeleteScope(ctx context.Context, id string) error
	ReadScope(ctx context.Context, id string) (*authclient.Scope, error)
	CreateScope(ctx context.Context, label string, metadata map[string]string) (*authclient.Scope, error)
	UpdateScope(ctx context.Context, id string, label string, metadata map[string]string) error
	ListScopes(ctx context.Context) (typeutils.Array[authclient.Scope], error)
	ReadScopeByMetadata(ctx context.Context, metadata map[string]string) (*authclient.Scope, error)
	AddTransientScope(ctx context.Context, scope, transientScope string) error
	RemoveTransientScope(ctx context.Context, scope, transientScope string) error
	CreateClient(ctx context.Context, options authclient.ClientOptions) (*authclient.Client, error)
	UpdateClient(ctx context.Context, id string, options authclient.ClientOptions) error
	DeleteClient(ctx context.Context, id string) error
	ReadClient(ctx context.Context, id string) (*authclient.Client, error)
	ReadClientByMetadata(ctx context.Context, metadata map[string]string) (*authclient.Client, error)
	AddScopeToClient(ctx context.Context, clientId, scopeId string) error
	DeleteScopeFromClient(ctx context.Context, clientId, scopeId string) error
}

type APIFactory

type APIFactory interface {
	Create(referencer AuthServerReferencer) API
}

type ApiFactoryFn

type ApiFactoryFn func(referencer AuthServerReferencer) API

func (ApiFactoryFn) Create

func (fn ApiFactoryFn) Create(referencer AuthServerReferencer) API

type AuthServerReferencer

type AuthServerReferencer interface {
	client.Object
	AuthServerReference() string
}

type ControlMutator

type ControlMutator struct {
	Client client.Client
	Scheme *runtime.Scheme
}

func (*ControlMutator) Mutate

func (m *ControlMutator) Mutate(ctx context.Context, control *componentsv1beta2.Control) (*ctrl.Result, error)

func (*ControlMutator) SetupWithBuilder

func (m *ControlMutator) SetupWithBuilder(mgr ctrl.Manager, builder *ctrl.Builder) error

type CounterpartiesMutator

type CounterpartiesMutator struct {
	client.Client
	Scheme *runtime.Scheme
}

CounterpartiesMutator reconciles a Auth object

func (*CounterpartiesMutator) Mutate

func (*CounterpartiesMutator) SetupWithBuilder

func (r *CounterpartiesMutator) SetupWithBuilder(mgr ctrl.Manager, builder *ctrl.Builder) error

SetupWithBuilder SetupWithManager sets up the controller with the Manager.

type DefaultApi

type DefaultApi struct {
	API *authclient.APIClient
}

func NewDefaultServerApi

func NewDefaultServerApi(api *authclient.APIClient) *DefaultApi

func (*DefaultApi) AddScopeToClient

func (d *DefaultApi) AddScopeToClient(ctx context.Context, clientId, scopeId string) error

func (*DefaultApi) AddTransientScope

func (d *DefaultApi) AddTransientScope(ctx context.Context, scope, transientScope string) error

func (*DefaultApi) CreateClient

func (d *DefaultApi) CreateClient(ctx context.Context, options authclient.ClientOptions) (*authclient.Client, error)

func (*DefaultApi) CreateScope

func (d *DefaultApi) CreateScope(ctx context.Context, label string, metadata map[string]string) (*authclient.Scope, error)

func (*DefaultApi) DeleteClient

func (d *DefaultApi) DeleteClient(ctx context.Context, id string) error

func (*DefaultApi) DeleteScope

func (d *DefaultApi) DeleteScope(ctx context.Context, id string) error

func (*DefaultApi) DeleteScopeFromClient

func (d *DefaultApi) DeleteScopeFromClient(ctx context.Context, clientId, scopeId string) error

func (*DefaultApi) ListScopes

func (d *DefaultApi) ListScopes(ctx context.Context) (typeutils.Array[authclient.Scope], error)

func (*DefaultApi) ReadClient

func (d *DefaultApi) ReadClient(ctx context.Context, id string) (*authclient.Client, error)

func (*DefaultApi) ReadClientByMetadata

func (d *DefaultApi) ReadClientByMetadata(ctx context.Context, metadata map[string]string) (*authclient.Client, error)

func (*DefaultApi) ReadScope

func (d *DefaultApi) ReadScope(ctx context.Context, id string) (*authclient.Scope, error)

func (*DefaultApi) ReadScopeByMetadata

func (d *DefaultApi) ReadScopeByMetadata(ctx context.Context, metadata map[string]string) (*authclient.Scope, error)

func (*DefaultApi) RemoveTransientScope

func (d *DefaultApi) RemoveTransientScope(ctx context.Context, scope, transientScope string) error

func (*DefaultApi) UpdateClient

func (d *DefaultApi) UpdateClient(ctx context.Context, id string, options authclient.ClientOptions) error

func (*DefaultApi) UpdateScope

func (d *DefaultApi) UpdateScope(ctx context.Context, id string, label string, metadata map[string]string) error

type DynamicTemplate

type DynamicTemplate map[string]interface{}

type InMemoryApi

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

func NewInMemoryAPI

func NewInMemoryAPI() *InMemoryApi

func (*InMemoryApi) AddScopeToClient

func (i *InMemoryApi) AddScopeToClient(ctx context.Context, clientId, scopeId string) error

func (*InMemoryApi) AddTransientScope

func (i *InMemoryApi) AddTransientScope(ctx context.Context, scope, transientScope string) error

func (*InMemoryApi) Client

func (i *InMemoryApi) Client(name string) *authclient.Client

func (*InMemoryApi) Clients

func (i *InMemoryApi) Clients() map[string]*authclient.Client

func (*InMemoryApi) CreateClient

func (i *InMemoryApi) CreateClient(ctx context.Context, options authclient.ClientOptions) (*authclient.Client, error)

func (*InMemoryApi) CreateScope

func (i *InMemoryApi) CreateScope(ctx context.Context, label string, metadata map[string]string) (*authclient.Scope, error)

func (*InMemoryApi) DeleteClient

func (i *InMemoryApi) DeleteClient(ctx context.Context, id string) error

func (*InMemoryApi) DeleteScope

func (i *InMemoryApi) DeleteScope(ctx context.Context, id string) error

func (*InMemoryApi) DeleteScopeFromClient

func (i *InMemoryApi) DeleteScopeFromClient(ctx context.Context, clientId, scopeId string) error

func (*InMemoryApi) ListScopes

func (*InMemoryApi) ReadClient

func (i *InMemoryApi) ReadClient(ctx context.Context, id string) (*authclient.Client, error)

func (*InMemoryApi) ReadClientByMetadata

func (i *InMemoryApi) ReadClientByMetadata(ctx context.Context, metadata map[string]string) (*authclient.Client, error)

func (*InMemoryApi) ReadScope

func (i *InMemoryApi) ReadScope(ctx context.Context, id string) (*authclient.Scope, error)

func (*InMemoryApi) ReadScopeByMetadata

func (i *InMemoryApi) ReadScopeByMetadata(ctx context.Context, metadata map[string]string) (*authclient.Scope, error)

func (*InMemoryApi) RemoveTransientScope

func (i *InMemoryApi) RemoveTransientScope(ctx context.Context, scope, transientScope string) error

func (*InMemoryApi) Reset

func (i *InMemoryApi) Reset()

func (*InMemoryApi) Scope

func (i *InMemoryApi) Scope(name string) *authclient.Scope

func (*InMemoryApi) Scopes

func (i *InMemoryApi) Scopes() map[string]*authclient.Scope

func (*InMemoryApi) UpdateClient

func (i *InMemoryApi) UpdateClient(ctx context.Context, id string, options authclient.ClientOptions) error

func (*InMemoryApi) UpdateScope

func (i *InMemoryApi) UpdateScope(ctx context.Context, id string, label string, metadata map[string]string) error

type LedgerMutator

type LedgerMutator struct {
	client.Client
	Scheme *runtime.Scheme
}

Mutator reconciles a Auth object

func (*LedgerMutator) Mutate

func (r *LedgerMutator) Mutate(ctx context.Context, ledger *componentsv1beta2.Ledger) (*ctrl.Result, error)

func (*LedgerMutator) SetupWithBuilder

func (r *LedgerMutator) SetupWithBuilder(mgr ctrl.Manager, builder *ctrl.Builder) error

SetupWithManager sets up the controller with the Manager.

type Mappings

type Mappings struct {
	DynamicTemplates []DynamicTemplate   `json:"dynamic_templates,omitempty"`
	Properties       map[string]Property `json:"properties,omitempty"`
}

func GetMapping

func GetMapping() Mappings

type Mutator

type Mutator struct {
	client.Client
	Scheme *runtime.Scheme
}

Mutator reconciles a Auth object

func (*Mutator) Mutate

func (r *Mutator) Mutate(ctx context.Context, auth *componentsv1beta2.Auth) (*ctrl.Result, error)

func (*Mutator) SetupWithBuilder

func (r *Mutator) SetupWithBuilder(mgr ctrl.Manager, builder *ctrl.Builder) error

SetupWithBuilder sets up the controller with the Manager.

type PaymentsMutator

type PaymentsMutator struct {
	client.Client
	Scheme *runtime.Scheme
}

Mutator reconciles a Auth object

func (*PaymentsMutator) Mutate

func (r *PaymentsMutator) Mutate(ctx context.Context, payments *componentsv1beta2.Payments) (*ctrl.Result, error)

func (*PaymentsMutator) SetupWithBuilder

func (r *PaymentsMutator) SetupWithBuilder(mgr ctrl.Manager, builder *ctrl.Builder) error

SetupWithManager sets up the controller with the Manager.

type Property

type Property struct {
	Mappings
	Type       string              `json:"type,omitempty"`
	Store      bool                `json:"store,omitempty"`
	CopyTo     string              `json:"copy_to,omitempty"`
	Enabled    *bool               `json:"enabled,omitempty"`
	Properties map[string]Property `json:"properties,omitempty"`
}

type SearchMutator

type SearchMutator struct {
	client.Client
	Scheme *runtime.Scheme
}

Mutator reconciles a Auth object

func (*SearchMutator) Mutate

func (r *SearchMutator) Mutate(ctx context.Context, search *componentsv1beta2.Search) (*ctrl.Result, error)

func (*SearchMutator) SetupWithBuilder

func (r *SearchMutator) SetupWithBuilder(mgr ctrl.Manager, builder *ctrl.Builder) error

SetupWithManager sets up the controller with the Manager.

type WalletsMutator

type WalletsMutator struct {
	client.Client
	Scheme *runtime.Scheme
}

WalletsMutator reconciles a Auth object

func (*WalletsMutator) Mutate

func (r *WalletsMutator) Mutate(ctx context.Context, wallets *componentsv1beta2.Wallets) (*ctrl.Result, error)

func (*WalletsMutator) SetupWithBuilder

func (r *WalletsMutator) SetupWithBuilder(mgr ctrl.Manager, builder *ctrl.Builder) error

SetupWithBuilder SetupWithManager sets up the controller with the Manager.

type WebhooksMutator

type WebhooksMutator struct {
	client.Client
	Scheme *runtime.Scheme
}

WebhooksMutator reconciles a Auth object

func (*WebhooksMutator) Mutate

func (r *WebhooksMutator) Mutate(ctx context.Context, webhooks *componentsv1beta2.Webhooks) (*ctrl.Result, error)

func (*WebhooksMutator) SetupWithBuilder

func (r *WebhooksMutator) SetupWithBuilder(mgr ctrl.Manager, builder *ctrl.Builder) error

SetupWithBuilder SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

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