Documentation
¶
Index ¶
- Constants
- func ClientIP(r *http.Request) string
- func WithClientIP(trustedHeader string, next http.Handler) http.Handler
- type AuthFailure
- type Logger
- func (l *Logger) AccountAction(ctx context.Context, action, account string)
- func (l *Logger) AccountRetention(ctx context.Context, account, retention string)
- func (l *Logger) AuthFailure(ctx context.Context, e AuthFailure)
- func (l *Logger) OAuth(ctx context.Context, e OAuthEvent)
- func (l *Logger) OwnerAction(ctx context.Context, e OwnerAction)
- func (l *Logger) PasswordShown(ctx context.Context)
- func (l *Logger) ToolCall(ctx context.Context, e ToolCall)
- func (l *Logger) Upload(ctx context.Context, e Upload)
- func (l *Logger) WebhookAction(ctx context.Context, action, webhook string)
- func (l *Logger) WebhookDelivery(ctx context.Context, e WebhookDelivery)
- func (l *Logger) WebhookRedeliver(ctx context.Context, webhook string, deliveries int)
- func (l *Logger) WebhookTest(ctx context.Context, webhook string, status int, result string)
- type OAuthEvent
- type OwnerAction
- type ToolCall
- type Upload
- type WebhookDelivery
Constants ¶
View Source
const ( ClientIPHeader = "X-Zapgate-Client-Ip" ResultOK = "ok" ResultError = "error" ResultInputRequired = "input_required" ResultDeclined = "declined" ReasonMissing = "missing" ReasonInvalid = "invalid" ActionTokenCreate = "token_create" ActionAccessRevoke = "access_revoke" ActionAccessSet = "access_set" ActionAccountAdd = "account_add" ActionAccountDescribe = "account_describe" ActionAccountRemove = "account_remove" ActionAccountRetention = "account_retention" ActionWebhookAdd = "webhook_add" ActionWebhookSet = "webhook_set" ActionWebhookRemove = "webhook_remove" ActionWebhookTest = "webhook_test" ActionWebhookRotate = "webhook_rotate_secret" ActionWebhookEnable = "webhook_enable" ActionWebhookRedeliver = "webhook_redeliver" RetentionDefault = "default" )
View Source
const ( EventClientRegister = "client_register" EventAuthorize = "authorize" EventTokenIssue = "token_issue" EventTokenRefresh = "token_refresh" EventTokenRevoke = "token_revoke" ResultDenied = "denied" ResultBlocked = "blocked" ReasonWrongPassword = "wrong_password" ReasonOwnerDeclined = "owner_declined" ReasonCodeReused = "code_reused" ReasonRefreshReused = "refresh_reused" ActionPasswordShow = "password_show" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthFailure ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func (*Logger) AccountAction ¶
func (*Logger) AccountRetention ¶
func (*Logger) AuthFailure ¶
func (l *Logger) AuthFailure(ctx context.Context, e AuthFailure)
func (*Logger) OwnerAction ¶
func (l *Logger) OwnerAction(ctx context.Context, e OwnerAction)
func (*Logger) PasswordShown ¶
func (*Logger) WebhookAction ¶ added in v0.2.0
func (*Logger) WebhookDelivery ¶ added in v0.2.0
func (l *Logger) WebhookDelivery(ctx context.Context, e WebhookDelivery)
func (*Logger) WebhookRedeliver ¶ added in v0.2.0
type OAuthEvent ¶
type OwnerAction ¶
Click to show internal directories.
Click to hide internal directories.