Protocols

The following protocols are available globally.

  • A protocol that defines bearer authentication tokens, similar to ModelAuthenticatable.

    See more

    Declaration

    Swift

    public protocol CorvusModelAuthenticatable : CorvusModel, Authenticatable
  • A protocol that defines bearer authentication tokens, similar to ModelTokenAuthenticatable.

    See more

    Declaration

    Swift

    public protocol CorvusModelTokenAuthenticatable : CorvusModel, Authenticatable
  • A special RestEndpoint used to provide a common interface for endpoints which provide access to the .auth() modifier.

    See more

    Declaration

    Swift

    public protocol AuthEndpoint : RestEndpoint
  • A special AuthEndpoint used to provide a common interface for Create components so they can access their own .auth modifier.

    See more

    Declaration

    Swift

    public protocol CreateEndpoint : AuthEndpoint
  • A special AuthEndpoint used to provide a common interface for Update components so they can access their own .auth modifier.

    See more

    Declaration

    Swift

    public protocol UpdateEndpoint : AuthEndpoint
  • Defines a generic type for RESTful endpoints.

    See more

    Declaration

    Swift

    public protocol RestEndpoint : Endpoint
  • A special AuthEndpoint used to provide a common interface for endpoints which provide access to modifiers that are applcable for Database read requests

    See more

    Declaration

    Swift

    public protocol ReadEndpoint : AuthEndpoint
  • A protocol most Corvus components in a hierarchy conform to, so that they may be treated as the same type interchangeably.

    See more

    Declaration

    Swift

    public protocol Endpoint
  • A protocol that wraps both Model and Content for convenience and is used to define all models that are used in database persistency and in network communication.

    See more

    Declaration

    Swift

    public protocol CorvusModel: Model, Content
    where IDValue: LosslessStringConvertible
  • A component that is used at the root of each API and can get registered to a Vapor Application by conforming to RouteCollection. It also conforms to Endpoint to remain composable itself.

    See more

    Declaration

    Swift

    public protocol RestApi : Endpoint, RouteCollection
  • CorvusResponse is a wrapper type for the result ofQueryEndpoints. Can be used to add metadata to a response.

    See more

    Declaration

    Swift

    public protocol CorvusResponse : Content