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 flowError
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 {
// CreateErrorContainer adds an error to the manager and returns a
// unique identifier or an error if insertion fails.
CreateErrorContainer(ctx context.Context, csrfToken string, err error) (uuid.UUID, error)
// ReadErrorContainer 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.
ReadErrorContainer(ctx context.Context, id uuid.UUID) (*ErrorContainer, error)
// ClearErrorContainers 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.
ClearErrorContainers(ctx context.Context, olderThan time.Duration, force bool) error
}
Click to show internal directories.
Click to hide internal directories.