Documentation
¶
Index ¶
- Constants
- Variables
- func NewAuthCmd() *cobra.Command
- func NewAuthLogoutCmd() *cobra.Command
- func NewCloudHTTPClient(token string) *http.Client
- func NewCreateCmd() *cobra.Command
- func NewCreateProjectCmd() *cobra.Command
- func NewGetCmd() *cobra.Command
- func NewGetKratosConfigCmd() *cobra.Command
- func NewGetProjectCmd() *cobra.Command
- func NewListCmd() *cobra.Command
- func NewListProjectsCmd() *cobra.Command
- func NewPatchCmd() *cobra.Command
- func NewPatchKratosConfigCmd() *cobra.Command
- func NewProjectsPatchCmd() *cobra.Command
- func NewProjectsUpdateCmd() *cobra.Command
- func NewProxyCommand(self string, version string) *cobra.Command
- func NewRootCommand(project string, version string) *cobra.Command
- func NewTunnelCommand(self string, version string) *cobra.Command
- func NewUpdateCmd() *cobra.Command
- func NewUpdateIdentityConfigCmd() *cobra.Command
- func PrintOpenAPIError(cmd *cobra.Command, err error) error
- func ReadConfigFile(source string) (json.RawMessage, error)
- func ReadConfigFiles(files []string) ([]json.RawMessage, error)
- func RegisterConfigFlag(f *pflag.FlagSet)
- func RegisterYesFlag(f *pflag.FlagSet)
- type AuthContext
- type AuthIdentity
- type AuthProject
- type SnakeCharmer
- func (h *SnakeCharmer) Authenticate() (*AuthContext, error)
- func (h *SnakeCharmer) CreateProject(name string) (*cloud.Project, error)
- func (h *SnakeCharmer) EnsureContext() (*AuthContext, error)
- func (h *SnakeCharmer) GetProject(id string) (*cloud.Project, error)
- func (h *SnakeCharmer) ListProjects() ([]cloud.Project, error)
- func (h *SnakeCharmer) PatchProject(id string, raw []json.RawMessage, add, replace, del []string) (*cloud.SuccessfulProjectUpdate, error)
- func (h *SnakeCharmer) PrintUpdateProjectWarnings(p *client.SuccessfulProjectUpdate) error
- func (h *SnakeCharmer) SetDefaultProject(id string) error
- func (h *SnakeCharmer) SignOut() error
- func (h *SnakeCharmer) Stdin() *bufio.Reader
- func (h *SnakeCharmer) UpdateProject(id string, name string, configs []json.RawMessage) (*cloud.SuccessfulProjectUpdate, error)
- func (h *SnakeCharmer) WriteConfig(c *AuthContext) error
Constants ¶
View Source
const ( PortFlag = "port" OpenFlag = "open" WithoutJWTFlag = "no-jwt" CookieDomainFlag = "cookie-domain" DefaultRedirectURLFlag = "default-redirect-url" ServiceURL = "sdk-url" )
View Source
const (
FormatKratosConfig = "kratos-config"
)
View Source
const PasswordReader = "password_reader"
Variables ¶
View Source
var ErrNoConfig = errors.New("no ory configuration file present")
View Source
var ErrNoConfigQuiet = errors.New("please run `ory auth` to initialize your configuration or remove the `--quiet` flag")
Functions ¶
func NewAuthCmd ¶
func NewAuthLogoutCmd ¶
func NewCloudHTTPClient ¶
func NewCreateCmd ¶
func NewCreateProjectCmd ¶
func NewGetKratosConfigCmd ¶ added in v0.0.362
func NewGetProjectCmd ¶
func NewListCmd ¶
func NewListProjectsCmd ¶
func NewPatchCmd ¶
func NewPatchKratosConfigCmd ¶ added in v0.0.362
func NewProjectsPatchCmd ¶
func NewProjectsUpdateCmd ¶
func NewUpdateCmd ¶
func NewUpdateIdentityConfigCmd ¶ added in v0.0.362
func ReadConfigFile ¶
func ReadConfigFile(source string) (json.RawMessage, error)
func ReadConfigFiles ¶
func ReadConfigFiles(files []string) ([]json.RawMessage, error)
func RegisterConfigFlag ¶
func RegisterYesFlag ¶
Types ¶
type AuthContext ¶
type AuthContext struct {
Version string `json:"version"`
SessionToken string `json:"session_token"`
SelectedProject uuid.UUID `json:"selected_project"`
IdentityTraits AuthIdentity `json:"session_identity_traits"`
}
func (*AuthContext) Columns ¶
func (i *AuthContext) Columns() []string
func (*AuthContext) Header ¶
func (*AuthContext) Header() []string
func (*AuthContext) ID ¶
func (i *AuthContext) ID() string
func (*AuthContext) Interface ¶
func (i *AuthContext) Interface() interface{}
type AuthIdentity ¶
type AuthProject ¶
type SnakeCharmer ¶
type SnakeCharmer struct {
// contains filtered or unexported fields
}
func NewSnakeCharmer ¶
func NewSnakeCharmer(cmd *cobra.Command) (*SnakeCharmer, error)
NewSnakeCharmer creates a new SnakeCharmer instance which handles cobra CLI commands.
func (*SnakeCharmer) Authenticate ¶
func (h *SnakeCharmer) Authenticate() (*AuthContext, error)
func (*SnakeCharmer) CreateProject ¶
func (h *SnakeCharmer) CreateProject(name string) (*cloud.Project, error)
func (*SnakeCharmer) EnsureContext ¶
func (h *SnakeCharmer) EnsureContext() (*AuthContext, error)
func (*SnakeCharmer) GetProject ¶
func (h *SnakeCharmer) GetProject(id string) (*cloud.Project, error)
func (*SnakeCharmer) ListProjects ¶
func (h *SnakeCharmer) ListProjects() ([]cloud.Project, error)
func (*SnakeCharmer) PatchProject ¶
func (h *SnakeCharmer) PatchProject(id string, raw []json.RawMessage, add, replace, del []string) (*cloud.SuccessfulProjectUpdate, error)
func (*SnakeCharmer) PrintUpdateProjectWarnings ¶ added in v0.0.362
func (h *SnakeCharmer) PrintUpdateProjectWarnings(p *client.SuccessfulProjectUpdate) error
func (*SnakeCharmer) SetDefaultProject ¶
func (h *SnakeCharmer) SetDefaultProject(id string) error
func (*SnakeCharmer) SignOut ¶
func (h *SnakeCharmer) SignOut() error
func (*SnakeCharmer) Stdin ¶
func (h *SnakeCharmer) Stdin() *bufio.Reader
func (*SnakeCharmer) UpdateProject ¶
func (h *SnakeCharmer) UpdateProject(id string, name string, configs []json.RawMessage) (*cloud.SuccessfulProjectUpdate, error)
func (*SnakeCharmer) WriteConfig ¶
func (h *SnakeCharmer) WriteConfig(c *AuthContext) error
Source Files
¶
- cmd.go
- cmd_auth.go
- cmd_auth_logout.go
- cmd_create.go
- cmd_create_project.go
- cmd_get.go
- cmd_get_kratos_config.go
- cmd_get_project.go
- cmd_list.go
- cmd_list_project.go
- cmd_patch.go
- cmd_patch_kratos_config.go
- cmd_patch_project.go
- cmd_proxy.go
- cmd_tunnel.go
- cmd_update.go
- cmd_update_identity_config.go
- cmd_update_project.go
- form.go
- handler.go
- http_client.go
- output_project.go
- prefix.go
- print.go
- proxy.go
- read.go
- sdks.go
Click to show internal directories.
Click to hide internal directories.