config

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Overview

Package config implement the Configuration Management Client.

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsValidName

func IsValidName(name string) error

IsValidName checks if name is valid RFC1035 string.

Value can have lowercase letters, digits, or hyphens. It must start with a lowercase letter and end with a letter or number. The minimum length is 2 and the max is 254.

Types

type Client

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

func NewClient

func NewClient(ctx context.Context, opts ...api.ClientOption) (*Client, error)

NewClient creates a new Config Management gRPC Client.

Example (Default)

This example demonstrates how to create a new Config Client.

package main

import (
	"context"
	"log"

	"github.com/indykite/indykite-sdk-go/config"
)

func main() {
	client, err := config.NewClient(context.Background())
	if err != nil {
		log.Fatalf("failed to create client %v", err)
	}
	_ = client.Close()
}
Output:

Example (Options)

This example demonstrates how to create a new Config Client.

package main

import (
	"context"
	"log"

	"github.com/indykite/indykite-sdk-go/config"
	api "github.com/indykite/indykite-sdk-go/grpc"
)

func main() {
	client, err := config.NewClient(context.Background(),
		api.WithCredentialsJSON([]byte(`{}`)))
	if err != nil {
		log.Fatalf("failed to create client %v", err)
	}
	_ = client.Close()
}
Output:

func NewTestClient

func NewTestClient(_ context.Context, client configpb.ConfigManagementAPIClient) (*Client, error)

NewTestClient creates a new Config Management gRPC Client for Testing.

func (*Client) Close

func (c *Client) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*Client) CreateApplication

func (*Client) CreateConfigNode

func (c *Client) CreateConfigNode(ctx context.Context, request *NodeRequest, opts ...grpc.CallOption) (
	*configpb.CreateConfigNodeResponse, error)

func (*Client) CreateOAuth2Provider

func (*Client) CreateServiceAccount

func (*Client) CreateTenant

func (c *Client) CreateTenant(
	ctx context.Context,
	request *configpb.CreateTenantRequest,
	opts ...grpc.CallOption) (*configpb.CreateTenantResponse, error)

func (*Client) DeleteApplication

func (*Client) DeleteConfigNode

func (c *Client) DeleteConfigNode(ctx context.Context, req *NodeRequest, opts ...grpc.CallOption) (
	*configpb.DeleteConfigNodeResponse, error)

func (*Client) DeleteOAuth2Provider

func (*Client) DeleteServiceAccount

func (*Client) DeleteServiceAccountCredential added in v0.15.0

func (*Client) DeleteTenant

func (c *Client) DeleteTenant(
	ctx context.Context,
	request *configpb.DeleteTenantRequest,
	opts ...grpc.CallOption) (*configpb.DeleteTenantResponse, error)

func (*Client) ListConfigNodeVersions added in v0.16.0

func (c *Client) ListConfigNodeVersions(ctx context.Context, req *NodeRequest, opts ...grpc.CallOption) (
	*configpb.ListConfigNodeVersionsResponse, error)

func (*Client) ReadApplication

func (*Client) ReadApplicationAgent

func (*Client) ReadApplicationSpace

func (*Client) ReadApplicationSpaceConfig added in v0.14.0

func (*Client) ReadConfigNode

func (c *Client) ReadConfigNode(ctx context.Context, req *NodeRequest, opts ...grpc.CallOption) (
	*configpb.ReadConfigNodeResponse, error)

func (*Client) ReadCustomer

func (c *Client) ReadCustomer(
	ctx context.Context,
	request *configpb.ReadCustomerRequest,
	opts ...grpc.CallOption) (*configpb.ReadCustomerResponse, error)

func (*Client) ReadCustomerConfig added in v0.14.0

func (c *Client) ReadCustomerConfig(
	ctx context.Context,
	request *configpb.ReadCustomerConfigRequest,
	opts ...grpc.CallOption,
) (*configpb.ReadCustomerConfigResponse, error)

func (*Client) ReadOAuth2Provider

func (*Client) ReadServiceAccount

func (*Client) ReadServiceAccountCredential added in v0.15.0

func (*Client) ReadTenant

func (c *Client) ReadTenant(
	ctx context.Context,
	request *configpb.ReadTenantRequest,
	opts ...grpc.CallOption) (*configpb.ReadTenantResponse, error)

func (*Client) ReadTenantConfig added in v0.14.0

func (c *Client) ReadTenantConfig(
	ctx context.Context,
	request *configpb.ReadTenantConfigRequest,
	opts ...grpc.CallOption,
) (*configpb.ReadTenantConfigResponse, error)

func (*Client) RegisterServiceAccountCredential added in v0.15.0

func (*Client) UpdateApplication

func (*Client) UpdateApplicationSpaceConfig added in v0.14.0

func (*Client) UpdateConfigNode

func (c *Client) UpdateConfigNode(ctx context.Context, req *NodeRequest, opts ...grpc.CallOption) (
	*configpb.UpdateConfigNodeResponse, error)

func (*Client) UpdateCustomerConfig added in v0.14.0

func (*Client) UpdateOAuth2Provider

func (*Client) UpdateServiceAccount

func (*Client) UpdateTenant

func (c *Client) UpdateTenant(
	ctx context.Context,
	request *configpb.UpdateTenantRequest,
	opts ...grpc.CallOption) (*configpb.UpdateTenantResponse, error)

func (*Client) UpdateTenantConfig added in v0.14.0

func (c *Client) UpdateTenantConfig(
	ctx context.Context,
	request *configpb.UpdateTenantConfigRequest,
	opts ...grpc.CallOption,
) (*configpb.UpdateTenantConfigResponse, error)

type NodeRequest

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

NodeRequest is a request builder.

func NewCreate

func NewCreate(name string) (*NodeRequest, error)

func NewDelete

func NewDelete(id string) (*NodeRequest, error)

func NewListVersions added in v0.16.0

func NewListVersions(id string) (*NodeRequest, error)

func NewRead

func NewRead(id string) (*NodeRequest, error)

func NewReadWithName

func NewReadWithName(name string) (*NodeRequest, error)

func NewUpdate

func NewUpdate(id string) (*NodeRequest, error)

func (*NodeRequest) EmptyDescription

func (x *NodeRequest) EmptyDescription() *NodeRequest

EmptyDescription removes the current description value.

func (*NodeRequest) EmptyDisplayName

func (x *NodeRequest) EmptyDisplayName() *NodeRequest

EmptyDisplayName removes the current displayName value.

func (*NodeRequest) ForLocation

func (x *NodeRequest) ForLocation(id string) *NodeRequest

func (*NodeRequest) String

func (x *NodeRequest) String() string

func (*NodeRequest) WithAuditSinkConfig added in v0.16.0

func (x *NodeRequest) WithAuditSinkConfig(v *configpb.AuditSinkConfig) *NodeRequest

func (*NodeRequest) WithAuthFlowConfig

func (x *NodeRequest) WithAuthFlowConfig(v *configpb.AuthFlowConfig) *NodeRequest

func (*NodeRequest) WithAuthorizationPolicyConfig

func (x *NodeRequest) WithAuthorizationPolicyConfig(v *configpb.AuthorizationPolicyConfig) *NodeRequest

func (*NodeRequest) WithBookmarks added in v0.14.3

func (x *NodeRequest) WithBookmarks(bookmarks []string) *NodeRequest

WithBookmarks adds received bookmarks from previous requests. Overwriting previous value if calling multiple times.

func (*NodeRequest) WithDescription

func (x *NodeRequest) WithDescription(v string) *NodeRequest

WithDescription sets the new description value.

func (*NodeRequest) WithDisplayName

func (x *NodeRequest) WithDisplayName(v string) *NodeRequest

WithDisplayName sets the new displayName value.

func (*NodeRequest) WithEmailNotificationConfig

func (x *NodeRequest) WithEmailNotificationConfig(v *configpb.EmailServiceConfig) *NodeRequest

func (*NodeRequest) WithOAuth2ClientConfig

func (x *NodeRequest) WithOAuth2ClientConfig(v *configpb.OAuth2ClientConfig) *NodeRequest

WithOAuth2ClientConfig sets the new OAuth2ClientConfig changes which will be merged.

func (*NodeRequest) WithPreCondition

func (x *NodeRequest) WithPreCondition(etag string) *NodeRequest

WithPreCondition sets the expected etag to check before modify or delete.

func (*NodeRequest) WithVersion added in v0.16.0

func (x *NodeRequest) WithVersion(version int64) *NodeRequest

func (*NodeRequest) WithWebauthnProviderConfig added in v0.16.0

func (x *NodeRequest) WithWebauthnProviderConfig(v *configpb.WebAuthnProviderConfig) *NodeRequest

Jump to

Keyboard shortcuts

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