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 ReadCertFilters(ctx *cli.Context) ([]byte, error)
- type AccountClient
- type AppParams
- type CommandOut
- func NewAccountCommand(getAccountClientFn GetAccountClientFn) (CommandOut, error)
- func NewCertificatesCommand() (CommandOut, error)
- func NewFeatureCommand() (CommandOut, error)
- func NewLoginCommand(c *LoginClient) (CommandOut, error)
- func NewLogoutCommand(c *LoginClient) (CommandOut, error)
- func NewNamespaceCommand(getNamespaceClientFn GetNamespaceClientFn) (CommandOut, error)
- func NewRequestCommand(getRequestClientFn GetRequestClientFn) (CommandOut, error)
- func NewUserCommand(getUserClientFn GetUserClientFn) (CommandOut, error)
- func NewVersionCommand() (CommandOut, error)
- type FeatureFlag
- type GetAccountClientFn
- type GetNamespaceClientFn
- type GetRequestClientFn
- type GetUserClientFn
- type LoginClient
- type NamespaceClient
- type OAuthDeviceCodeResponse
- type OAuthTokenResponse
- type RequestClient
- type UserClient
Constants ¶
View Source
const ( ServerFlagName = "server" ConfigDirFlagName = "config-dir" RetentionDaysFlagName = "retention-days" NamespaceFlagName = "namespace" RequestIDFlagName = "request-id" ResourceVersionFlagName = "resource-version" )
View Source
const ( CaCertificateFlagName = "ca-certificate" CaCertificateFileFlagName = "ca-certificate-file" )
View Source
const (
AutoConfirmFlagName = "auto_confirm"
)
View Source
const (
DefaultVersion = "v0.6.0"
)
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", 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"}, } )
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 ( BuildDate string Commit string Version string )
View Source
var ( AutoConfirmFlag = &cli.BoolFlag{ Name: AutoConfirmFlagName, Usage: "Automatically confirm all prompts", EnvVars: []string{"AUTO_CONFIRM"}, } )
View Source
var (
ExportFeatureFlag = "enable-export"
)
Functions ¶
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.
Types ¶
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 CommandOut ¶
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(c *LoginClient) (CommandOut, error)
func NewLogoutCommand ¶ added in v0.1.7
func NewLogoutCommand(c *LoginClient) (CommandOut, error)
func NewNamespaceCommand ¶
func NewNamespaceCommand(getNamespaceClientFn GetNamespaceClientFn) (CommandOut, error)
func NewRequestCommand ¶
func NewRequestCommand(getRequestClientFn GetRequestClientFn) (CommandOut, error)
func NewUserCommand ¶ added in v0.6.0
func NewUserCommand(getUserClientFn GetUserClientFn) (CommandOut, error)
func NewVersionCommand ¶
func NewVersionCommand() (CommandOut, error)
type FeatureFlag ¶ added in v0.8.0
type GetAccountClientFn ¶ added in v0.1.5
type GetAccountClientFn func(ctx *cli.Context) (*AccountClient, error)
type GetNamespaceClientFn ¶
type GetNamespaceClientFn func(ctx *cli.Context) (*NamespaceClient, error)
type GetRequestClientFn ¶
type GetRequestClientFn func(ctx *cli.Context) (*RequestClient, error)
type GetUserClientFn ¶ added in v0.6.0
type GetUserClientFn func(ctx *cli.Context) (*UserClient, error)
type LoginClient ¶
type LoginClient struct {
// contains filtered or unexported fields
}
func GetLoginClient ¶
func GetLoginClient() *LoginClient
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 OAuthDeviceCodeResponse ¶ added in v0.8.0
type OAuthTokenResponse ¶ added in v0.8.0
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 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)
Click to show internal directories.
Click to hide internal directories.