Documentation ¶
Index ¶
Constants ¶
View Source
const RouteGet = "/self-service/errors"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorContainer ¶
type ErrorContainer struct { // ID of the error container. // // required: true ID uuid.UUID `db:"id" json:"id"` NID uuid.UUID `json:"-" db:"nid"` // The error Errors json.RawMessage `json:"error" db:"errors"` // CreatedAt is a helper struct field for gobuffalo.pop. CreatedAt time.Time `json:"created_at" db:"created_at"` // UpdatedAt is a helper struct field for gobuffalo.pop. UpdatedAt time.Time `json:"updated_at" db:"updated_at"` SeenAt sql.NullTime `json:"-" db:"seen_at"` WasSeen bool `json:"-" db:"was_seen"` CSRFToken string `db:"csrf_token" json:"-"` }
swagger:model selfServiceError
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler( r handlerDependencies, ) *Handler
func (*Handler) RegisterAdminRoutes ¶
func (h *Handler) RegisterAdminRoutes(public *x.RouterAdmin)
func (*Handler) RegisterPublicRoutes ¶
func (h *Handler) RegisterPublicRoutes(public *x.RouterPublic)
type HandlerProvider ¶
type HandlerProvider interface {
SelfServiceErrorHandler() *Handler
}
type ManagementProvider ¶
type ManagementProvider interface { // SelfServiceErrorManager returns the errorx.Manager. SelfServiceErrorManager() *Manager }
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager(d managerDependencies) *Manager
type PersistenceProvider ¶
type PersistenceProvider interface {
SelfServiceErrorPersister() Persister
}
type Persister ¶
type Persister interface { // Add adds an error to the manager and returns a unique identifier or an error if insertion fails. Add(ctx context.Context, csrfToken string, err error) (uuid.UUID, error) // Read returns an error by its unique identifier and marks the error as read. If an error occurs during retrieval // the second return parameter is an error. Read(ctx context.Context, id uuid.UUID) (*ErrorContainer, error) // Clear clears read containers that are older than a certain amount of time. If force is set to true, unread // errors will be cleared as well. Clear(ctx context.Context, olderThan time.Duration, force bool) error }
Click to show internal directories.
Click to hide internal directories.