mydms

package
v0.0.0-...-c32710b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 29, 2020 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Overview

Package mydms mydms-API

The API of the mydms-application.

Terms Of Service:

Schemes: https
Host: mydms.binggl.net
BasePath: /api/v1
Version: 3.0.0
License: Apache 2.0 https://opensource.org/licenses/Apache-2.0

Consumes:
- application/json

Produces:
- application/json

swagger:meta

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EndpointLoggingMiddleware

func EndpointLoggingMiddleware(logger logging.Logger, endpointName string) endpoint.Middleware

EndpointLoggingMiddleware returns an endpoint middleware that logs the duration of each invocation, and the resulting error, if any.

func MakeHTTPHandler

func MakeHTTPHandler(e Endpoints, logger logging.Logger, opts HTTPHandlerOptions) http.Handler

MakeHTTPHandler mounts all service endpoints into an http.Handler.

Types

type AppConfig

type AppConfig struct {
	config.BaseConfig
	Database  Database
	Upload    UploadConfig
	Filestore FileStore
}

AppConfig holds the application configuration

type Database

type Database struct {
	ConnectionString string
}

Database defines the connection string

type DocumentRequest

type DocumentRequest struct {
	*document.Document
}

DocumentRequest is the request payload for the Document data model.

func (*DocumentRequest) Bind

func (d *DocumentRequest) Bind(r *http.Request) error

Bind assigns the the provided data to a DocumentRequest

func (*DocumentRequest) String

func (d *DocumentRequest) String() string

String returns a string representation of a DocumentRequest

type DocumentRequestSwagger

type DocumentRequestSwagger struct {
	// In: body
	Body document.Document
}

DocumentRequestSwagger is used for swagger docu swagger:parameters SaveDocument

type Endpoints

type Endpoints struct {
	GetAppInfoEndpoint         endpoint.Endpoint
	GetDocumentByIDEndpoint    endpoint.Endpoint
	DeleteDocumentByIDEndpoint endpoint.Endpoint
	SearchListEndpoint         endpoint.Endpoint
	SearchDocumentsEndpoint    endpoint.Endpoint
	SaveDocumentEndpoint       endpoint.Endpoint
	GetFileEndpoint            endpoint.Endpoint
}

Endpoints collects all of the endpoints that compose a profile service. It's meant to be used as a helper struct, to collect all of the endpoints into a single parameter.

func MakeServerEndpoints

func MakeServerEndpoints(ai appinfo.Service, doc document.Service, f filestore.FileService, logger logging.Logger) Endpoints

MakeServerEndpoints returns an Endpoints struct where each endpoint invokes the corresponding method on the provided service.

type EntriesResult

type EntriesResult struct {
	Lenght  int      `json:"length,omitempty"`
	Entries []string `json:"result,omitempty"`
}

EntriesResult holds a list of strings swagger:model

type FileStore

type FileStore struct {
	Region string
	Bucket string
	Key    string
	Secret string
}

FileStore holds configuration settings for the backend file store

type HTTPHandlerOptions

type HTTPHandlerOptions struct {
	BasePath     string
	ErrorPath    string
	JWTConfig    config.Security
	CookieConfig config.ApplicationCookies
	CorsConfig   config.CorsSettings
	AssetConfig  config.AssetSettings
}

HTTPHandlerOptions containts configuration settings relevant for the HTTP handler implementation

type UploadConfig

type UploadConfig struct {
	// EndpointURL defines the upload endpoint api URL
	EndpointURL string
}

UploadConfig defines relevant values for the upload logic

Directories

Path Synopsis
app

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL