Documentation
¶
Index ¶
- Constants
- func AsServerError(err error) *servererror.ServerError
- func IsServerError(err error) bool
- func NewLoggingClientOption() api.ClientOption
- type Config
- type Impl
- func (i *Impl) AuthTokens() authtoken.AuthToken
- func (i *Impl) EmailMagicLinks() emailmagiclink.EmailMagicLink
- func (i *Impl) EmailOTPs() emailotp.EmailOTP
- func (i *Impl) Passkeys() passkey.Passkey
- func (i *Impl) Projects() project.Project
- func (i *Impl) Sessions() session.Session
- func (i *Impl) SmsOTPs() smsotp.SmsOTP
- func (i *Impl) Templates() template.Template
- func (i *Impl) Users() user.User
- func (i *Impl) Validations() validation.Validation
- type SDK
Constants ¶
View Source
const Version = "1.0.4"
Variables ¶
This section is empty.
Functions ¶
func AsServerError ¶
func AsServerError(err error) *servererror.ServerError
AsServerError casts given error into a ServerError, if possible
func IsServerError ¶
IsServerError checks if given error is a ServerError
func NewLoggingClientOption ¶
func NewLoggingClientOption() api.ClientOption
NewLoggingClientOption enhances HTTP client to log requests/responses
Types ¶
type Config ¶
type Config struct {
ProjectID string
APISecret string
FrontendAPI string
BackendAPI string
ShortSessionCookieName string
CacheMaxAge time.Duration
JWKSRefreshInterval time.Duration
JWKSRefreshRateLimit time.Duration
JWKSRefreshTimeout time.Duration
HTTPClient *http.Client
ExtraClientOptions []api.ClientOption
}
func MustNewConfig ¶
MustNewConfig returns new config and panics if projectID or apiSecret are not specified/empty
func NewConfigFromEnv ¶ added in v1.0.0
NewConfigFromEnv returns new config with values from env variables (CORBADO_PROJECT_ID and CORBADO_API_SECRET)
type Impl ¶
func (*Impl) AuthTokens ¶
AuthTokens returns auth tokens client
func (*Impl) EmailMagicLinks ¶ added in v1.0.0
func (i *Impl) EmailMagicLinks() emailmagiclink.EmailMagicLink
EmailMagicLinks returns email magic links client
func (*Impl) Validations ¶
func (i *Impl) Validations() validation.Validation
Validations returns validation client
type SDK ¶
type SDK interface {
AuthTokens() authtoken.AuthToken
EmailMagicLinks() emailmagiclink.EmailMagicLink
EmailOTPs() emailotp.EmailOTP
Passkeys() passkey.Passkey
Projects() project.Project
Sessions() session.Session
SmsOTPs() smsotp.SmsOTP
Templates() template.Template
Users() user.User
Validations() validation.Validation
}
Directories
¶
| Path | Synopsis |
|---|---|
|
examples
|
|
|
basic
command
|
|
|
stdlib/authtokens
command
|
|
|
stdlib/session
command
|
|
|
internal
|
|
|
pkg
|
|
|
generated/api
Package api provides primitives to interact with the openapi HTTP API.
|
Package api provides primitives to interact with the openapi HTTP API. |
|
generated/common
Package common provides primitives to interact with the openapi HTTP API.
|
Package common provides primitives to interact with the openapi HTTP API. |
Click to show internal directories.
Click to hide internal directories.