Documentation
¶
Overview ¶
Package api provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.13.4 DO NOT EDIT.
Index ¶
- func CreateMiddleware(v jwx.JWSValidator) ([]echo.MiddlewareFunc, error)
- func GetSwagger() (swagger *openapi3.T, err error)
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- func RegisterHandlers(router EchoRouter, si ServerInterface)
- func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)
- type EchoRouter
- type Server
- func (m *Server) CreateAccount(ctx echo.Context) error
- func (m *Server) CreateAddressAlias(ctx echo.Context) error
- func (m *Server) CreateDomain(ctx echo.Context) error
- func (m *Server) CreateDomainAlias(ctx echo.Context) error
- func (m *Server) DeleteAccount(ctx echo.Context, emailAddress model.EmailAddress) error
- func (m *Server) DeleteAddressAlias(ctx echo.Context, alias string) error
- func (m *Server) DeleteDomain(ctx echo.Context, domain string) error
- func (m *Server) DeleteDomainAlias(ctx echo.Context, domainAlias string) error
- func (m *Server) GetAccount(ctx echo.Context, emailAddress model.EmailAddress) error
- func (m *Server) GetAccounts(ctx echo.Context) error
- func (m *Server) GetAccountsByDomain(ctx echo.Context, addressDomain string) error
- func (m *Server) GetAddressAliases(ctx echo.Context) error
- func (m *Server) GetAddressAliasesByDomain(ctx echo.Context, domain string) error
- func (m *Server) GetDomains(ctx echo.Context) error
- func (m *Server) GetDomainsAliases(ctx echo.Context) error
- func (m *Server) GetDomainsAliasesByDomain(ctx echo.Context, domain string) error
- func (m *Server) GetToken(ctx echo.Context) error
- func (m *Server) UpdateAccountPassword(ctx echo.Context) error
- func (m *Server) UpdateAddressAlias(ctx echo.Context, alias string) error
- type ServerInterface
- type ServerInterfaceWrapper
- func (w *ServerInterfaceWrapper) CreateAccount(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) CreateAddressAlias(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) CreateDomain(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) CreateDomainAlias(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) DeleteAccount(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) DeleteAddressAlias(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) DeleteDomain(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) DeleteDomainAlias(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GetAccount(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GetAccounts(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GetAccountsByDomain(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GetAddressAliases(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GetAddressAliasesByDomain(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GetDomains(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GetDomainsAliases(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GetDomainsAliasesByDomain(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GetToken(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) UpdateAccountPassword(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) UpdateAddressAlias(ctx echo.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateMiddleware ¶
func CreateMiddleware(v jwx.JWSValidator) ([]echo.MiddlewareFunc, error)
func GetSwagger ¶
GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.
func PathToRawSpec ¶
Constructs a synthetic filesystem for resolving external references when loading openapi specifications.
func RegisterHandlers ¶
func RegisterHandlers(router EchoRouter, si ServerInterface)
RegisterHandlers adds each server route to the EchoRouter.
func RegisterHandlersWithBaseURL ¶
func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)
Registers handlers, and prepends BaseURL to the paths, so that the paths can be served under a prefix.
Types ¶
type EchoRouter ¶
type EchoRouter interface { CONNECT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route DELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route GET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route HEAD(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route OPTIONS(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route PATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route POST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route PUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route TRACE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route }
This is a simple interface which specifies echo.Route addition functions which are present on both echo.Echo and echo.Group, since we want to allow using either of them for path registration
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(authUseCase port.AuthUseCase, mailServerUseCase port.MailServerUseCase) *Server
func (*Server) CreateAccount ¶
(POST /accounts)
func (*Server) CreateAddressAlias ¶
(POST /addresses-aliases)
func (*Server) CreateDomainAlias ¶
(POST /domains-aliases)
func (*Server) DeleteAccount ¶
func (m *Server) DeleteAccount(ctx echo.Context, emailAddress model.EmailAddress) error
(DELETE /accounts/{emailAddress})
func (*Server) DeleteAddressAlias ¶
(DELETE /addresses-aliases/{alias})
func (*Server) DeleteDomain ¶
(DELETE /domains/{domain})
func (*Server) DeleteDomainAlias ¶
(DELETE /domains-aliases/{domain_alias})
func (*Server) GetAccount ¶
func (m *Server) GetAccount(ctx echo.Context, emailAddress model.EmailAddress) error
(GET /accounts/{emailAddress})
func (*Server) GetAccountsByDomain ¶
(GET /accounts/filterByDomain/{domain})
func (*Server) GetAddressAliases ¶
(GET /addresses-aliases)
func (*Server) GetAddressAliasesByDomain ¶
(GET /addresses-aliases/filterByDomain/{domain})
func (*Server) GetDomainsAliases ¶
(GET /domains-aliases)
func (*Server) GetDomainsAliasesByDomain ¶
(GET /addresses-aliases/filterByDomain/{domain})
func (*Server) UpdateAccountPassword ¶
Change account password (POST /accounts/changePassword)
func (*Server) UpdateAddressAlias ¶
(PUT /addresses-aliases/{alias})
type ServerInterface ¶
type ServerInterface interface { // Get a list of all email accounts // (GET /accounts) GetAccounts(ctx echo.Context) error // Add a new email account // (POST /accounts) CreateAccount(ctx echo.Context) error // Change account password // (POST /accounts/changePassword) UpdateAccountPassword(ctx echo.Context) error // List of email accounts for a domain // (GET /accounts/filterByDomain/{domain}) GetAccountsByDomain(ctx echo.Context, domain string) error // Remove an email account // (DELETE /accounts/{emailAddress}) DeleteAccount(ctx echo.Context, emailAddress EmailAddress) error // Get data from an email account // (GET /accounts/{emailAddress}) GetAccount(ctx echo.Context, emailAddress EmailAddress) error // Get all email aliases // (GET /addresses-aliases) GetAddressAliases(ctx echo.Context) error // Create an email alias // (POST /addresses-aliases) CreateAddressAlias(ctx echo.Context) error // Get all email aliases // (GET /addresses-aliases/filterByDomain/{domain}) GetAddressAliasesByDomain(ctx echo.Context, domain string) error // Deletes an email alias // (DELETE /addresses-aliases/{alias}) DeleteAddressAlias(ctx echo.Context, alias string) error // Update an email alias // (PUT /addresses-aliases/{alias}) UpdateAddressAlias(ctx echo.Context, alias string) error // Get all email server domains // (GET /domains) GetDomains(ctx echo.Context) error // Add a new domain to the server // (POST /domains) CreateDomain(ctx echo.Context) error // List of domain aliases // (GET /domains-aliases) GetDomainsAliases(ctx echo.Context) error // Adds a new domain alias // (POST /domains-aliases) CreateDomainAlias(ctx echo.Context) error // Get Domains Aliases filtered by Domain // (GET /domains-aliases/filterByDomain/{domain}) GetDomainsAliasesByDomain(ctx echo.Context, domain string) error // Deletes a domain alias // (DELETE /domains-aliases/{domain_alias}) DeleteDomainAlias(ctx echo.Context, domainAlias string) error // Delete a domain // (DELETE /domains/{domain}) DeleteDomain(ctx echo.Context, domain string) error // User Authentication // (POST /getToken) GetToken(ctx echo.Context) error }
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
}
ServerInterfaceWrapper converts echo contexts to parameters.
func (*ServerInterfaceWrapper) CreateAccount ¶
func (w *ServerInterfaceWrapper) CreateAccount(ctx echo.Context) error
CreateAccount converts echo context to params.
func (*ServerInterfaceWrapper) CreateAddressAlias ¶
func (w *ServerInterfaceWrapper) CreateAddressAlias(ctx echo.Context) error
CreateAddressAlias converts echo context to params.
func (*ServerInterfaceWrapper) CreateDomain ¶
func (w *ServerInterfaceWrapper) CreateDomain(ctx echo.Context) error
CreateDomain converts echo context to params.
func (*ServerInterfaceWrapper) CreateDomainAlias ¶
func (w *ServerInterfaceWrapper) CreateDomainAlias(ctx echo.Context) error
CreateDomainAlias converts echo context to params.
func (*ServerInterfaceWrapper) DeleteAccount ¶
func (w *ServerInterfaceWrapper) DeleteAccount(ctx echo.Context) error
DeleteAccount converts echo context to params.
func (*ServerInterfaceWrapper) DeleteAddressAlias ¶
func (w *ServerInterfaceWrapper) DeleteAddressAlias(ctx echo.Context) error
DeleteAddressAlias converts echo context to params.
func (*ServerInterfaceWrapper) DeleteDomain ¶
func (w *ServerInterfaceWrapper) DeleteDomain(ctx echo.Context) error
DeleteDomain converts echo context to params.
func (*ServerInterfaceWrapper) DeleteDomainAlias ¶
func (w *ServerInterfaceWrapper) DeleteDomainAlias(ctx echo.Context) error
DeleteDomainAlias converts echo context to params.
func (*ServerInterfaceWrapper) GetAccount ¶
func (w *ServerInterfaceWrapper) GetAccount(ctx echo.Context) error
GetAccount converts echo context to params.
func (*ServerInterfaceWrapper) GetAccounts ¶
func (w *ServerInterfaceWrapper) GetAccounts(ctx echo.Context) error
GetAccounts converts echo context to params.
func (*ServerInterfaceWrapper) GetAccountsByDomain ¶
func (w *ServerInterfaceWrapper) GetAccountsByDomain(ctx echo.Context) error
GetAccountsByDomain converts echo context to params.
func (*ServerInterfaceWrapper) GetAddressAliases ¶
func (w *ServerInterfaceWrapper) GetAddressAliases(ctx echo.Context) error
GetAddressAliases converts echo context to params.
func (*ServerInterfaceWrapper) GetAddressAliasesByDomain ¶
func (w *ServerInterfaceWrapper) GetAddressAliasesByDomain(ctx echo.Context) error
GetAddressAliasesByDomain converts echo context to params.
func (*ServerInterfaceWrapper) GetDomains ¶
func (w *ServerInterfaceWrapper) GetDomains(ctx echo.Context) error
GetDomains converts echo context to params.
func (*ServerInterfaceWrapper) GetDomainsAliases ¶
func (w *ServerInterfaceWrapper) GetDomainsAliases(ctx echo.Context) error
GetDomainsAliases converts echo context to params.
func (*ServerInterfaceWrapper) GetDomainsAliasesByDomain ¶
func (w *ServerInterfaceWrapper) GetDomainsAliasesByDomain(ctx echo.Context) error
GetDomainsAliasesByDomain converts echo context to params.
func (*ServerInterfaceWrapper) GetToken ¶
func (w *ServerInterfaceWrapper) GetToken(ctx echo.Context) error
GetToken converts echo context to params.
func (*ServerInterfaceWrapper) UpdateAccountPassword ¶
func (w *ServerInterfaceWrapper) UpdateAccountPassword(ctx echo.Context) error
UpdateAccountPassword converts echo context to params.
func (*ServerInterfaceWrapper) UpdateAddressAlias ¶
func (w *ServerInterfaceWrapper) UpdateAddressAlias(ctx echo.Context) error
UpdateAddressAlias converts echo context to params.