Documentation ¶
Index ¶
- func CreateAction(ctx *pkg.AppContext, operator string) ([]payload, error)
- func Execute(ctx *pkg.AppContext) *cobra.Command
- func GenerateConfig(ctx *pkg.AppContext, opts *GenerateConfigOptions) error
- func NamespaceCreateCmd(ctx *pkg.AppContext) *cobra.Command
- func NamespaceCurrentCmd(ctx *pkg.AppContext) *cobra.Command
- func NamespaceDestroyCmd(ctx *pkg.AppContext) *cobra.Command
- func NamespaceListCmd(ctx *pkg.AppContext) *cobra.Command
- func NewApplyCmd(ctx *pkg.AppContext) *cobra.Command
- func NewConfigCmd(ctx *pkg.AppContext) *cobra.Command
- func NewConfigGetCmd(_ *pkg.AppContext) *cobra.Command
- func NewConfigSetCmd(_ *pkg.AppContext) *cobra.Command
- func NewGenerateConfigCmd(ctx *pkg.AppContext) *cobra.Command
- func NewGetCmd(ctx *pkg.AppContext, buf *bytes.Buffer) *cobra.Command
- func NewInit(ctx *pkg.AppContext) *cobra.Command
- func NewLoginCmd(ctx *pkg.AppContext) *cobra.Command
- func NewNamespaceCmd(ctx *pkg.AppContext) *cobra.Command
- func NewPublishCmd(ctx *pkg.AppContext) *cobra.Command
- func NewPublishGatewayCmd(ctx *pkg.AppContext) *cobra.Command
- func NewRootCommand(ctx *pkg.AppContext) *cobra.Command
- func NewStatusCmd(ctx *pkg.AppContext, buf *bytes.Buffer) *cobra.Command
- func Publish(ctx *pkg.AppContext, body []byte, arg string) error
- func PublishGatewayService(ctx *pkg.AppContext, doc parsedConfig) error
- func PublishResource(ctx *pkg.AppContext, doc parsedConfig, arg string) (string, error)
- type ApplyOptions
- type GenerateConfigOptions
- type LoginFlags
- type NamespaceDestroyOptions
- type NamespaceFormData
- type NamespaceResult
- type OutputFlags
- type PublishCounter
- type PublishGatewayOptions
- type PublishGatewayResponse
- type PublishOptions
- type PublishResponse
- type PutResponse
- type ResourceConfig
- type StatusJson
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateAction ¶
func CreateAction(ctx *pkg.AppContext, operator string) ([]payload, error)
func GenerateConfig ¶
func GenerateConfig(ctx *pkg.AppContext, opts *GenerateConfigOptions) error
func NamespaceCreateCmd ¶
func NamespaceCreateCmd(ctx *pkg.AppContext) *cobra.Command
func NamespaceCurrentCmd ¶
func NamespaceCurrentCmd(ctx *pkg.AppContext) *cobra.Command
func NamespaceDestroyCmd ¶
func NamespaceDestroyCmd(ctx *pkg.AppContext) *cobra.Command
func NamespaceListCmd ¶
func NamespaceListCmd(ctx *pkg.AppContext) *cobra.Command
func NewApplyCmd ¶
func NewApplyCmd(ctx *pkg.AppContext) *cobra.Command
func NewConfigCmd ¶
func NewConfigCmd(ctx *pkg.AppContext) *cobra.Command
func NewConfigGetCmd ¶
func NewConfigGetCmd(_ *pkg.AppContext) *cobra.Command
func NewConfigSetCmd ¶
func NewConfigSetCmd(_ *pkg.AppContext) *cobra.Command
func NewGenerateConfigCmd ¶
func NewGenerateConfigCmd(ctx *pkg.AppContext) *cobra.Command
func NewLoginCmd ¶
func NewLoginCmd(ctx *pkg.AppContext) *cobra.Command
TODO: Instead of printing from the auth service's methods, use a goroutine and post back status updates to this function to keep in line with other methods
func NewNamespaceCmd ¶
func NewNamespaceCmd(ctx *pkg.AppContext) *cobra.Command
func NewPublishCmd ¶
func NewPublishCmd(ctx *pkg.AppContext) *cobra.Command
func NewPublishGatewayCmd ¶
func NewPublishGatewayCmd(ctx *pkg.AppContext) *cobra.Command
func NewRootCommand ¶
func NewRootCommand(ctx *pkg.AppContext) *cobra.Command
func NewStatusCmd ¶
func PublishGatewayService ¶
func PublishGatewayService(ctx *pkg.AppContext, doc parsedConfig) error
func PublishResource ¶
func PublishResource(ctx *pkg.AppContext, doc parsedConfig, arg string) (string, error)
Types ¶
type ApplyOptions ¶
type ApplyOptions struct {
// contains filtered or unexported fields
}
type GenerateConfigOptions ¶
type GenerateConfigOptions struct { Namespace string Template string Service string Upstream string UpstreamUrl *url.URL UpstreamPort string Organization string OrganizationUnit string Out string }
func (*GenerateConfigOptions) Exec ¶
func (o *GenerateConfigOptions) Exec() error
func (*GenerateConfigOptions) ParseUpstream ¶
func (o *GenerateConfigOptions) ParseUpstream() error
func (*GenerateConfigOptions) ValidateTemplate ¶
func (o *GenerateConfigOptions) ValidateTemplate() error
type LoginFlags ¶
type LoginFlags struct {
// contains filtered or unexported fields
}
func (*LoginFlags) IsClientCredential ¶
func (l *LoginFlags) IsClientCredential() bool
type NamespaceDestroyOptions ¶
type NamespaceDestroyOptions struct {
Force bool `url:"force"`
}
type NamespaceFormData ¶
type NamespaceResult ¶
type OutputFlags ¶
type PublishCounter ¶
func (*PublishCounter) AddFailed ¶
func (p *PublishCounter) AddFailed()
func (*PublishCounter) AddSkipped ¶
func (p *PublishCounter) AddSkipped()
func (*PublishCounter) AddSuccess ¶
func (p *PublishCounter) AddSuccess()
func (*PublishCounter) Print ¶
func (p *PublishCounter) Print() string
type PublishGatewayOptions ¶
type PublishGatewayOptions struct {
// contains filtered or unexported fields
}
type PublishGatewayResponse ¶
type PublishGatewayResponse struct { Message string `json:"message"` Results string `json:"results"` Error string `json:"error"` }
func PublishGateway ¶
func PublishGateway(ctx *pkg.AppContext, opts *PublishGatewayOptions) (PublishGatewayResponse, error)
func PublishToGateway ¶
func PublishToGateway(ctx *pkg.AppContext, opts *PublishGatewayOptions, configFile io.Reader) (PublishGatewayResponse, error)
type PublishOptions ¶ added in v1.6.0
type PublishOptions struct {
// contains filtered or unexported fields
}
func (*PublishOptions) ParseInput ¶ added in v1.6.0
func (o *PublishOptions) ParseInput(ctx *pkg.AppContext) ([]byte, error)
type PublishResponse ¶ added in v1.6.0
type PutResponse ¶
type ResourceConfig ¶
func ExtractResourceConfig ¶
func ExtractResourceConfig(doc []byte) (*ResourceConfig, error)
doc is a single yaml document
func (*ResourceConfig) Action ¶
func (r *ResourceConfig) Action() string
type StatusJson ¶
type StatusJson struct { Name string `json:"name"` Upstream string `json:"upstream"` Status string `json:"status"` Reason string `json:"reason"` Host string `json:"host"` EnvHost string `json:"env_host"` }
func FetchStatus ¶
func FetchStatus(ctx *pkg.AppContext) ([]StatusJson, error)
Click to show internal directories.
Click to hide internal directories.