client

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package client contains the configuration for the minder cli

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterGRPCClientConfigFlags added in v0.0.86

func RegisterGRPCClientConfigFlags(v *viper.Viper, flags *pflag.FlagSet) error

RegisterGRPCClientConfigFlags registers the flags for the gRPC client

func RegisterMinderClientFlags

func RegisterMinderClientFlags(v *viper.Viper, flags *pflag.FlagSet) error

RegisterMinderClientFlags registers the flags for the minder cli

Types

type Config

type Config struct {
	GRPCClientConfig GRPCClientConfig      `mapstructure:"grpc_server" yaml:"grpc_server" json:"grpc_server"`
	Identity         IdentityConfigWrapper `mapstructure:"identity" yaml:"identity" json:"identity"`
	// Project is the current project
	Project string `mapstructure:"project" yaml:"project" json:"project"`
}

Config is the configuration for the minder cli

type GRPCClientConfig added in v0.0.86

type GRPCClientConfig struct {
	// Host is the host to connect to
	Host string `mapstructure:"host" yaml:"host" json:"host" default:"api.custcodian.dev"`

	// Port is the port to connect to
	Port int `mapstructure:"port" yaml:"port" json:"port" default:"443"`

	// Insecure is whether to allow establishing insecure connections
	Insecure bool `mapstructure:"insecure" yaml:"insecure" json:"insecure" default:"false"`
}

GRPCClientConfig is the configuration for a service to connect to minder gRPC server

func (GRPCClientConfig) GetGRPCAddress added in v0.0.86

func (c GRPCClientConfig) GetGRPCAddress() string

GetGRPCAddress returns the formatted GRPC address of the server.

func (GRPCClientConfig) TransportCredentialsOption added in v0.0.86

func (c GRPCClientConfig) TransportCredentialsOption() grpc.DialOption

TransportCredentialsOption returns a gRPC dial option appropriate to the configuration (either TLS with correct hostname, or without verification).

type IdentityConfig

type IdentityConfig struct {
	// IssuerUrl is the base URL where the identity server is running
	IssuerUrl string `mapstructure:"issuer_url" default:"https://auth.custcodian.dev" yaml:"issuer_url" json:"issuer_url"`
	// Realm is the Keycloak realm used by the identity server
	Realm string `mapstructure:"realm" default:"login" yaml:"realm" json:"realm"`

	// ClientId is the client ID that identifies the server client ID
	ClientId string `mapstructure:"client_id" default:"minder-cli" yaml:"client_id" json:"client_id"`
}

IdentityConfig is the configuration for the identity provider used by minder-cli. This should now use the WWW-Authenticate header, and these values should be ignored. TODO: remove this bit of configuration

type IdentityConfigWrapper

type IdentityConfigWrapper struct {
	CLI IdentityConfig `mapstructure:"cli" yaml:"cli" json:"cli"`
}

IdentityConfigWrapper is the configuration wrapper for the identity provider used by minder-cli

Jump to

Keyboard shortcuts

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