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 NewGetProjectCmd() *cobra.Command
- func NewListCmd() *cobra.Command
- func NewListProjectsCmd() *cobra.Command
- func NewPatchCmd() *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 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) 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 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 NewGetProjectCmd ¶
func NewListCmd ¶
func NewListProjectsCmd ¶
func NewPatchCmd ¶
func NewProjectsPatchCmd ¶
func NewProjectsUpdateCmd ¶
func NewUpdateCmd ¶
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) 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
¶
Click to show internal directories.
Click to hide internal directories.