Enumerations

The following enumerations are available globally.

  • Copyright © 2020 by Paul Schmiedmayer

    The Authorization class represents three different authorization methods, none for no authentication, credentials for a basic authentication, and over the bearer token, or a custom token.

    See more

    Declaration

    Swift

    public enum Authorization
  • PasswordType implements the Base64 encoding of the credentials.

    See more

    Declaration

    Swift

    public enum PasswordType : CustomStringConvertible
  • TokenType is used for token authentication over a bearer token or a custom defined token.

    See more

    Declaration

    Swift

    public enum TokenType : CustomStringConvertible

FilterStrategy

  • represents the filter strategy with the different options client, server and none filter

    How to define a FilterStrategy:

    FilterStrategy example:

    basic structure:

        .strategy(FilterStrategy.Filter(operations: operation1, operation2, ...)))
    

    client example:

       let clientStrategy = .client(FilterStrategy.Filter(operations: [.lte(\Account.id!, 100), .gte(\Account.id!, )])))
    

    defines a filter strategy where a fictional account class is filtered for 1 <= ID <= 100

    Attention

    You can only define the operations array where all KeyPaths are from the same data type
    See more

    Declaration

    Swift

    public enum FilterStrategy<K, V> where K : Reflectable, K : Comparable, K : Decodable, K : Encodable, K : Hashable, K : Identifiable, V : Reflectable, V : ReflectionDecodable, V : Comparable, V : CustomStringConvertible, V : Decodable, V : Encodable

Imports

  • represents possible sorting strategies on the server, client or none strategy How to define a FilterStrategy:

    SortStrategy example: basic structure:

        .strategy(SortStrategy.Sorter(direction: .direction, property: KeyPath))
    

    server example:

       let serverStrategy = .server(SortStrategy.Sorter(direction: .asc, property: \Account.name))
    

    defines a sort strategy where a fictional account class is sorted ascending by the name

    See more

    Declaration

    Swift

    public enum SortStrategy<K, V> where K : Reflectable, K : Comparable, K : Decodable, K : Encodable, K : Hashable, K : Identifiable, V : Reflectable, V : ReflectionDecodable, V : Comparable, V : CustomStringConvertible, V : Decodable, V : Encodable