Documentation ¶
Index ¶
- Constants
- Variables
- func AliasNormalizeFunc(f *pflag.FlagSet, name string) pflag.NormalizedName
- func ApplyReSimStyle(cmd *cobra.Command)
- func Execute() error
- func GetConfigDir() (string, error)
- func OutputJson(data interface{})
- func RegisterViperFlags(cmd *cobra.Command, args []string)
- func RegisterViperFlagsAndSetClient(cmd *cobra.Command, args []string)
- func SetClient(cmd *cobra.Command, args []string)
- func ValidateResponse(expectedStatusCode int, message string, response *http.Response, body []byte)
- type CredentialCache
- type FlagSets
Constants ¶
View Source
const ( //Defaults: DefaultCPUs = 4 DefaultGPUs = 0 DefaultMemoryMiB = 16384 )
View Source
const ConfigPath = "$HOME/.resim"
View Source
const CredentialCacheFilename = "cache.json"
Variables ¶
View Source
var Client api.ClientWithResponsesInterface
View Source
var FlagSetUsageTemplate string = `` /* 163-byte string literal not displayed */
View Source
var ReSimUsageTemplate string = `` /* 1503-byte string literal not displayed */
Functions ¶
func AliasNormalizeFunc ¶ added in v0.1.20
func AliasNormalizeFunc(f *pflag.FlagSet, name string) pflag.NormalizedName
func ApplyReSimStyle ¶ added in v0.1.20
func GetConfigDir ¶ added in v0.1.31
func OutputJson ¶ added in v0.1.20
func OutputJson(data interface{})
func RegisterViperFlags ¶ added in v0.1.10
func RegisterViperFlagsAndSetClient ¶ added in v0.1.19
Types ¶
type CredentialCache ¶ added in v0.1.18
type CredentialCache struct { Tokens map[string]oauth2.Token `json:"tokens"` TokenSource oauth2.TokenSource ClientID string }
func GetClient ¶
func GetClient(ctx context.Context) (*api.ClientWithResponses, *CredentialCache, error)
func (*CredentialCache) SaveCredentialCache ¶ added in v0.1.18
func (c *CredentialCache) SaveCredentialCache()
type FlagSets ¶ added in v0.1.20
type FlagSets struct {
// contains filtered or unexported fields
}
func (FlagSets) HasOptional ¶ added in v0.1.20
func (FlagSets) HasRequired ¶ added in v0.1.20
func (FlagSets) OptionalUsages ¶ added in v0.1.20
func (FlagSets) RequiredUsages ¶ added in v0.1.20
Click to show internal directories.
Click to hide internal directories.