config

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2023 License: Apache-2.0 Imports: 13 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 ContainsLabel

func ContainsLabel(arr []string, searchFor string) bool

ContainsLabel check if string array contains given node label.

func IsUUIDv4

func IsUUIDv4(key string, id []byte) error

IsUUIDv4 checks if id is valid RFC4122 varian UUID.

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 lenght 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)
	}
	defer func() {
		_ = 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)
	}
	defer func() {
		_ = 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) DeleteTenant

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

func (*Client) ReadApplication

func (*Client) ReadApplicationAgent

func (*Client) ReadApplicationSpace

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) ReadOAuth2Provider

func (*Client) ReadServiceAccount

func (*Client) ReadTenant

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

func (*Client) UpdateApplication

func (*Client) UpdateConfigNode

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

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)

type NodeRequest

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

NodeRequest is a request builder. nolint:golint

func NewCreate

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

func NewDelete

func NewDelete(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(v string) *NodeRequest

EmptyDescription removes the current description value.

func (*NodeRequest) EmptyDisplayName

func (x *NodeRequest) EmptyDisplayName(v string) *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) WithAuthFlowConfig

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

func (*NodeRequest) WithAuthorizationPolicyConfig

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

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) WithIngestMappingConfig

func (x *NodeRequest) WithIngestMappingConfig(v *configpb.IngestMappingConfig) *NodeRequest

func (*NodeRequest) WithKnowledgeGraphSchemaConfig

func (x *NodeRequest) WithKnowledgeGraphSchemaConfig(v *configpb.KnowledgeGraphSchemaConfig) *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.

Jump to

Keyboard shortcuts

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