Documentation ¶
Index ¶
- Constants
- func AddFailIfError(cmd *cobra.Command)
- func AddFailIfNotFoundFlag(cmd *cobra.Command)
- func AddModeFlag(cmd *cobra.Command)
- func Build(rts sdkservices.Runtimes, srcFS fs.FS, paths []string, syms []sdktypes.Symbol) (*sdkbuildfile.BuildFile, error)
- func BuildProject(project string, dirPaths, filePaths []string) (sdktypes.BuildID, error)
- func Client() sdkservices.Services
- func Config() *svc.Config
- func ConfigYAMLFilePath() string
- func Consume(args []string) (data []byte, path string, err error)
- func FailIfError(cmd *cobra.Command, err error, whats ...string) error
- func FailIfNotFound(cmd *cobra.Command, what string, found bool) error
- func FailNotFound(cmd *cobra.Command, what string) error
- func GetMode() (m configset.Mode, err error)
- func GetToken() (string, error)
- func InitConfig(confmap map[string]any) (err error)
- func InitRPCClient(authToken string) (err error)
- func JSONRenderer(o any)
- func LimitedContext() (context.Context, context.CancelFunc)
- func NewDevSvc(silent bool) (svc.Service, error)
- func NewSvc(silent bool) (svc.Service, error)
- func NiceJSONRenderer(o any)
- func OpenURL(cmd *cobra.Command, link string) error
- func Render(o any)
- func RenderKV(k string, v any)
- func RenderKVIfV[T any](k string, v T)
- func RenderList[T fmt.Stringer](ts []T)
- func ServerURL() *url.URL
- func SetRenderer(r Renderer)
- func StandardCommand(cmd *cobra.Command) *cobra.Command
- func StoreToken(token string) error
- func TextRenderer(o any)
- func ToExitCodeError(err error, whats ...string) error
- func WithLimitedContext(ctx context.Context) (context.Context, context.CancelFunc)
- type ExitCodeError
- type KV
- type KVIfV
- type Renderer
- type Texter
Constants ¶
View Source
const ( EnvVarPrefix = "AK_" ConfigYAMLFileName = "config.yaml" )
View Source
const ( NotFoundExitCode = 10 NotAMemberExitCode = NotFoundExitCode FailedPrecondition = 64 GenericFailure = 1 )
Variables ¶
This section is empty.
Functions ¶
func AddFailIfError ¶ added in v0.3.0
func AddFailIfNotFoundFlag ¶
func AddModeFlag ¶ added in v0.5.0
func Build ¶ added in v0.3.2
func Build(rts sdkservices.Runtimes, srcFS fs.FS, paths []string, syms []sdktypes.Symbol) (*sdkbuildfile.BuildFile, error)
func BuildProject ¶ added in v0.4.0
func Client ¶
func Client() sdkservices.Services
func ConfigYAMLFilePath ¶
func ConfigYAMLFilePath() string
func FailIfError ¶ added in v0.3.0
func InitConfig ¶
func InitRPCClient ¶
func JSONRenderer ¶
func JSONRenderer(o any)
func LimitedContext ¶
func LimitedContext() (context.Context, context.CancelFunc)
func NiceJSONRenderer ¶
func NiceJSONRenderer(o any)
func RenderKVIfV ¶
func RenderList ¶
func SetRenderer ¶
func SetRenderer(r Renderer)
func StoreToken ¶ added in v0.5.1
func TextRenderer ¶
func TextRenderer(o any)
func ToExitCodeError ¶ added in v0.3.0
func WithLimitedContext ¶ added in v0.4.0
TODO(ENG-320): Configuration to disable timeout for debugging.
Types ¶
type ExitCodeError ¶
func NewExitCodeError ¶
func NewExitCodeError(code int, err error) ExitCodeError
func (ExitCodeError) Error ¶
func (e ExitCodeError) Error() string
type KV ¶
func (KV) MarshalJSON ¶
type KVIfV ¶
This will not print anything if V is nil for text rendering. Should make output parsing easier for get operations. TODO: should we even care for non-json output parsing?
func (KVIfV[T]) MarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.