Skip to content

sessionservice: Introduce a well know "not exists" to sessionservice #85

@rakyll

Description

@rakyll

Most of the methods in the Service interface can fail if the session doesn't already exist:

type Service interface {
	Get(context.Context, *GetRequest) (StoredSession, error)
	Delete(context.Context, *DeleteRequest) error
	AppendEvent(context.Context, StoredSession, *session.Event) error
}

Introduce a well known error from the package, e.g.ErrSessionNotFound, to let the clients handle this case easily.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions