Documentation
¶
Index ¶
- Constants
- Variables
- func ConfirmPrompt(ctx *cli.Context, msg string) (bool, error)
- func FormatJson(i interface{}) (string, error)
- func GetServerConnection(c *cli.Context, opts ...grpc.DialOption) (context.Context, *grpc.ClientConn, error)
- func IsFeatureEnabled(feature string) bool
- func NewApp(params AppParams) (*cli.App, error)
- func PrintObj(i interface{}) error
- func PrintProto(m proto.Message) error
- func PrintProtoSlice(name string, ms []proto.Message) error
- func ReadCACerts(ctx *cli.Context) (string, error)
- func ReadCACertsRequired(ctx *cli.Context, required bool) (string, error)
- func ReadCertFilters(ctx *cli.Context) ([]byte, error)
- type APIKeyClient
- type AccountClient
- type AppParams
- type BuildInfo
- type CommandOut
- func NewAPIKeyCommand(getAPIKeyClientFn GetAPIKeyClientFn) (CommandOut, error)
- func NewAccountCommand(getAccountClientFn GetAccountClientFn) (CommandOut, error)
- func NewCertificatesCommand() (CommandOut, error)
- func NewFeatureCommand() (CommandOut, error)
- func NewLoginCommand() (CommandOut, error)
- func NewLogoutCommand() (CommandOut, error)
- func NewNamespaceCommand(getNamespaceClientFn GetNamespaceClientFn) (CommandOut, error)
- func NewNexusCommand(getNexusClientFn GetNexusClientFn) (CommandOut, error)
- func NewRequestCommand(getRequestClientFn GetRequestClientFn) (CommandOut, error)
- func NewServiceAccountCommand(getServiceAccountClientFn GetServiceAccountClientFn) (CommandOut, error)
- func NewUserCommand(getUserClientFn GetUserClientFn) (CommandOut, error)
- func NewUserGroupCommand(GetGroupClientFn GetGroupClientFn) (CommandOut, error)
- func NewVersionCommand() (CommandOut, error)
- type FeatureFlag
- type GetAPIKeyClientFn
- type GetAccountClientFn
- type GetGroupClientFn
- type GetNamespaceClientFn
- type GetNexusClientFn
- type GetRequestClientFn
- type GetServiceAccountClientFn
- type GetUserClientFn
- type NamespaceClient
- type NexusClient
- type Release
- type RequestClient
- type ServiceAccountClient
- type TokenConfig
- type UserClient
- type UserGroupClient
Constants ¶
View Source
const ( OwnerTypeUser = "user" OwnerTypeServiceAccount = "service-account" )
View Source
const ( CloudProviderGCP = "gcp" CloudProviderAWS = "aws" )
View Source
const ( VersionHeader = "tcld-version" CommitHeader = "tcld-commit" TemporalCloudAPIVersionHeader = "temporal-cloud-api-version" LegacyTemporalCloudAPIVersion = "2025-01-01-00" TemporalCloudAPIVersion = "v0.4.0" )
View Source
const ( ServerFlagName = "server" ConfigDirFlagName = "config-dir" RetentionDaysFlagName = "retention-days" NamespaceFlagName = "namespace" RequestIDFlagName = "request-id" ResourceVersionFlagName = "resource-version" APIKeyFlagName = "api-key" InsecureConnectionFlagName = "insecure" EnableDebugLogsFlagName = "enable-debug-logs" AuthenticationFlagCategory = "Authentication:" // APIKeyVersionTag indicates the state of API keys. This should be removed when fully released. APIKeyVersionTag = "preview" )
View Source
const ( CaCertificateFlagName = "ca-certificate" CaCertificateFileFlagName = "ca-certificate-file" )
View Source
const ( AuthMethodRestricted = "restricted" AuthMethodMTLS = "mtls" AuthMethodAPIKey = "api_key" AuthMethodAPIKeyOrMTLS = "api_key_or_mtls" )
View Source
const ( // MinSupportedVersion is the minimum tcld version supported by our APIs. // This string must be updated when we deprecate older versions, but should be // done carefully as this will likely break user's current usage of tcld. MinSupportedVersion = "v0.1.3" // DefaultVersionString is the version which is sent over if no version was available. // This can happen if a user builds the latest main branch, as the version string provided // to us from Go tooling is `(devel)`. DefaultVersionString = MinSupportedVersion + "+no-version-available" )
View Source
const (
AutoConfirmFlagName = "auto_confirm"
)
Variables ¶
View Source
var ( ServerFlag = &cli.StringFlag{ Name: ServerFlagName, Aliases: []string{"s"}, Value: "saas-api.tmprl.cloud:443", Usage: "saas-api server endpoint", EnvVars: []string{"TEMPORAL_CLOUD_API_SERVER"}, Hidden: true, Required: false, } ConfigDirFlag = &cli.PathFlag{ Name: ConfigDirFlagName, Value: filepath.Join(os.Getenv("HOME"), ".config", "tcld"), Usage: "The config directory to use", EnvVars: []string{"TEMPORAL_CLOUD_CONFIG_DIR"}, Hidden: true, Required: false, } RetentionDaysFlag = &cli.IntFlag{ Name: RetentionDaysFlagName, Usage: "The retention of the namespace in days", Aliases: []string{"rd"}, EnvVars: []string{"NAMESPACE_RETENTION"}, Required: true, } NamespaceFlag = &cli.StringFlag{ Name: NamespaceFlagName, Usage: "The namespace hosted on temporal cloud", Aliases: []string{"n"}, EnvVars: []string{"TEMPORAL_CLOUD_NAMESPACE"}, Required: true, } RequestIDFlag = &cli.StringFlag{ Name: RequestIDFlagName, Usage: "The request-id to use for the asynchronous operation, if not set the server will assign one (optional)", Aliases: []string{"r"}, } ResourceVersionFlag = &cli.StringFlag{ Name: ResourceVersionFlagName, Usage: "The resource-version (etag) to update from, if not set the cli will use the latest (optional)", Aliases: []string{"v"}, } APIKeyFlag = &cli.StringFlag{ Name: APIKeyFlagName, Usage: "The API Key used for authentication (" + APIKeyVersionTag + ")", EnvVars: []string{"TEMPORAL_CLOUD_API_KEY"}, Category: AuthenticationFlagCategory, } InsecureConnectionFlag = &cli.BoolFlag{ Name: InsecureConnectionFlagName, Usage: "Use an insecure transport for connection, recommended to avoid this option unless necessary", EnvVars: []string{"TEMPORAL_CLOUD_INSECURE_CONNECTION"}, Category: AuthenticationFlagCategory, Hidden: true, } EnableDebugLogsFlag = &cli.BoolFlag{ Name: EnableDebugLogsFlagName, Usage: "A flag to enable debug logs", EnvVars: []string{"TEMPORAL_CLOUD_ENABLE_DEBUG_LOGS"}, } )
View Source
var ( CaCertificateFlag = &cli.StringFlag{ Name: CaCertificateFlagName, Usage: "The base64 encoded ca certificate", Aliases: []string{"c"}, } CaCertificateFileFlag = &cli.PathFlag{ Name: CaCertificateFileFlagName, Usage: "The path to the ca pem file", Aliases: []string{"f"}, } )
View Source
var ( AuthMethods = []string{ AuthMethodRestricted, AuthMethodMTLS, AuthMethodAPIKey, AuthMethodAPIKeyOrMTLS, } )
View Source
var ( AutoConfirmFlag = &cli.BoolFlag{ Name: AutoConfirmFlagName, Usage: "Automatically confirm all prompts", EnvVars: []string{"AUTO_CONFIRM"}, } )
View Source
var (
GCPSinkFeatureFlag = "enable-gcp-sink"
)
View Source
var OwnerTypes = []string{ OwnerTypeUser, OwnerTypeServiceAccount, }
View Source
var (
TemporalCloudAPIMethodRegex = regexp.MustCompile(`^\/temporal\.api\.cloud\.cloudservice\.v1\.CloudService\/[^\/]*$`)
)
Functions ¶
func ConfirmPrompt ¶ added in v0.1.3
func FormatJson ¶
func GetServerConnection ¶
func GetServerConnection(c *cli.Context, opts ...grpc.DialOption) (context.Context, *grpc.ClientConn, error)
func IsFeatureEnabled ¶ added in v0.8.0
func PrintProto ¶
func ReadCACerts ¶ added in v0.1.4
ReadCACerts reads ca certs based on cli flags.
func ReadCACertsRequired ¶ added in v0.22.0
func ReadCertFilters ¶ added in v0.5.0
Types ¶
type APIKeyClient ¶ added in v0.11.0
type APIKeyClient struct {
// contains filtered or unexported fields
}
func GetAPIKeyClient ¶ added in v0.11.0
func GetAPIKeyClient(ctx *cli.Context) (*APIKeyClient, error)
type AccountClient ¶ added in v0.1.5
type AccountClient struct {
// contains filtered or unexported fields
}
func GetAccountClient ¶ added in v0.1.5
func GetAccountClient(ctx *cli.Context) (*AccountClient, error)
func NewAccountClient ¶ added in v0.1.5
func NewAccountClient(ctx context.Context, conn *grpc.ClientConn) *AccountClient
type BuildInfo ¶ added in v0.14.0
func NewBuildInfo ¶ added in v0.14.0
func NewBuildInfo() BuildInfo
NewBuildInfo will populate build info, to make debugging API errors easier, in the three scenarios a user can install tcld:
- Installed via the makefile or via brew.
- Installed via `go install`.
- Compiled on a branch via `go build ./cmd/tcld`
type CommandOut ¶
func NewAPIKeyCommand ¶ added in v0.11.0
func NewAPIKeyCommand(getAPIKeyClientFn GetAPIKeyClientFn) (CommandOut, error)
func NewAccountCommand ¶ added in v0.1.5
func NewAccountCommand(getAccountClientFn GetAccountClientFn) (CommandOut, error)
func NewCertificatesCommand ¶ added in v0.7.0
func NewCertificatesCommand() (CommandOut, error)
func NewFeatureCommand ¶ added in v0.8.0
func NewFeatureCommand() (CommandOut, error)
func NewLoginCommand ¶
func NewLoginCommand() (CommandOut, error)
func NewLogoutCommand ¶ added in v0.1.7
func NewLogoutCommand() (CommandOut, error)
func NewNamespaceCommand ¶
func NewNamespaceCommand(getNamespaceClientFn GetNamespaceClientFn) (CommandOut, error)
func NewNexusCommand ¶ added in v0.24.0
func NewNexusCommand(getNexusClientFn GetNexusClientFn) (CommandOut, error)
func NewRequestCommand ¶
func NewRequestCommand(getRequestClientFn GetRequestClientFn) (CommandOut, error)
func NewServiceAccountCommand ¶ added in v0.18.0
func NewServiceAccountCommand(getServiceAccountClientFn GetServiceAccountClientFn) (CommandOut, error)
func NewUserCommand ¶ added in v0.6.0
func NewUserCommand(getUserClientFn GetUserClientFn) (CommandOut, error)
func NewUserGroupCommand ¶ added in v0.38.0
func NewUserGroupCommand(GetGroupClientFn GetGroupClientFn) (CommandOut, error)
NewUserGroupCommand creates a new command for group management
func NewVersionCommand ¶
func NewVersionCommand() (CommandOut, error)
type FeatureFlag ¶ added in v0.8.0
type GetAPIKeyClientFn ¶ added in v0.11.0
type GetAPIKeyClientFn func(ctx *cli.Context) (*APIKeyClient, error)
type GetAccountClientFn ¶ added in v0.1.5
type GetAccountClientFn func(ctx *cli.Context) (*AccountClient, error)
type GetGroupClientFn ¶ added in v0.38.0
type GetGroupClientFn func(ctx *cli.Context) (*UserGroupClient, error)
type GetNamespaceClientFn ¶
type GetNamespaceClientFn func(ctx *cli.Context) (*NamespaceClient, error)
type GetNexusClientFn ¶ added in v0.24.0
type GetNexusClientFn func(ctx *cli.Context) (*NexusClient, error)
type GetRequestClientFn ¶
type GetRequestClientFn func(ctx *cli.Context) (*RequestClient, error)
type GetServiceAccountClientFn ¶ added in v0.18.0
type GetServiceAccountClientFn func(ctx *cli.Context) (*ServiceAccountClient, error)
type GetUserClientFn ¶ added in v0.6.0
type GetUserClientFn func(ctx *cli.Context) (*UserClient, error)
type NamespaceClient ¶
type NamespaceClient struct {
// contains filtered or unexported fields
}
func GetNamespaceClient ¶
func GetNamespaceClient(ctx *cli.Context) (*NamespaceClient, error)
func NewNamespaceClient ¶ added in v0.1.5
func NewNamespaceClient(ctx context.Context, conn *grpc.ClientConn) *NamespaceClient
type NexusClient ¶ added in v0.24.0
type NexusClient struct {
// contains filtered or unexported fields
}
func GetNexusClient ¶ added in v0.24.0
func GetNexusClient(ctx *cli.Context) (*NexusClient, error)
type RequestClient ¶
type RequestClient struct {
// contains filtered or unexported fields
}
func GetRequestClient ¶
func GetRequestClient(ctx *cli.Context) (*RequestClient, error)
func NewRequestClient ¶ added in v0.1.5
func NewRequestClient(ctx context.Context, conn *grpc.ClientConn) *RequestClient
type ServiceAccountClient ¶ added in v0.18.0
type ServiceAccountClient struct {
// contains filtered or unexported fields
}
func GetServiceAccountClient ¶ added in v0.18.0
func GetServiceAccountClient(ctx *cli.Context) (*ServiceAccountClient, error)
type TokenConfig ¶ added in v0.23.0
type TokenConfig struct { Audience string `json:"audience"` Domain string `json:"domain"` OAuthConfig oauth2.Config `json:"oauth_config"` OAuthToken *oauth2.Token `json:"oauth_token"` // contains filtered or unexported fields }
func LoadTokenConfig ¶ added in v0.23.0
func LoadTokenConfig(ctx *cli.Context) (*TokenConfig, error)
func (*TokenConfig) Store ¶ added in v0.23.0
func (c *TokenConfig) Store() error
func (*TokenConfig) TokenSource ¶ added in v0.23.0
func (c *TokenConfig) TokenSource() oauth2.TokenSource
type UserClient ¶ added in v0.6.0
type UserClient struct {
// contains filtered or unexported fields
}
func GetUserClient ¶ added in v0.6.0
func GetUserClient(ctx *cli.Context) (*UserClient, error)
type UserGroupClient ¶ added in v0.38.0
type UserGroupClient struct {
// contains filtered or unexported fields
}
func GetUserGroupClient ¶ added in v0.38.0
func GetUserGroupClient(ctx *cli.Context) (*UserGroupClient, error)
GetUserGroupClient builds a group client with cloud services connection and auth client
Source Files
¶
Click to show internal directories.
Click to hide internal directories.