server

package
v0.0.0-...-b9360c4 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CsvExportPath

func CsvExportPath() string

CsvExportPath returns the URL path to the export service csv HTTP endpoint.

func DecodeCsvRequest

func DecodeCsvRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)

DecodeCsvRequest returns a decoder for requests sent to the export csv endpoint.

func DecodeDownloadRequest

func DecodeDownloadRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)

DecodeDownloadRequest returns a decoder for requests sent to the export download endpoint.

func DecodeJSONLinesRequest

func DecodeJSONLinesRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)

DecodeJSONLinesRequest returns a decoder for requests sent to the export json lines endpoint.

func DecodeListMineRequest

func DecodeListMineRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)

DecodeListMineRequest returns a decoder for requests sent to the export list mine endpoint.

func DecodeStatusRequest

func DecodeStatusRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)

DecodeStatusRequest returns a decoder for requests sent to the export status endpoint.

func DownloadExportPath

func DownloadExportPath(id string) string

DownloadExportPath returns the URL path to the export service download HTTP endpoint.

func EncodeCsvError

func EncodeCsvError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, formatter func(err error) goahttp.Statuser) func(context.Context, http.ResponseWriter, error) error

EncodeCsvError returns an encoder for errors returned by the csv export endpoint.

func EncodeCsvResponse

func EncodeCsvResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error

EncodeCsvResponse returns an encoder for responses returned by the export csv endpoint.

func EncodeDownloadError

func EncodeDownloadError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, formatter func(err error) goahttp.Statuser) func(context.Context, http.ResponseWriter, error) error

EncodeDownloadError returns an encoder for errors returned by the download export endpoint.

func EncodeDownloadResponse

func EncodeDownloadResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error

EncodeDownloadResponse returns an encoder for responses returned by the export download endpoint.

func EncodeJSONLinesError

func EncodeJSONLinesError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, formatter func(err error) goahttp.Statuser) func(context.Context, http.ResponseWriter, error) error

EncodeJSONLinesError returns an encoder for errors returned by the json lines export endpoint.

func EncodeJSONLinesResponse

func EncodeJSONLinesResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error

EncodeJSONLinesResponse returns an encoder for responses returned by the export json lines endpoint.

func EncodeListMineError

func EncodeListMineError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, formatter func(err error) goahttp.Statuser) func(context.Context, http.ResponseWriter, error) error

EncodeListMineError returns an encoder for errors returned by the list mine export endpoint.

func EncodeListMineResponse

func EncodeListMineResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error

EncodeListMineResponse returns an encoder for responses returned by the export list mine endpoint.

func EncodeStatusError

func EncodeStatusError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, formatter func(err error) goahttp.Statuser) func(context.Context, http.ResponseWriter, error) error

EncodeStatusError returns an encoder for errors returned by the status export endpoint.

func EncodeStatusResponse

func EncodeStatusResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error

EncodeStatusResponse returns an encoder for responses returned by the export status endpoint.

func JSONLinesExportPath

func JSONLinesExportPath() string

JSONLinesExportPath returns the URL path to the export service json lines HTTP endpoint.

func ListMineExportPath

func ListMineExportPath() string

ListMineExportPath returns the URL path to the export service list mine HTTP endpoint.

func Mount

func Mount(mux goahttp.Muxer, h *Server)

Mount configures the mux to serve the export endpoints.

func MountCORSHandler

func MountCORSHandler(mux goahttp.Muxer, h http.Handler)

MountCORSHandler configures the mux to serve the CORS endpoints for the service export.

func MountCsvHandler

func MountCsvHandler(mux goahttp.Muxer, h http.Handler)

MountCsvHandler configures the mux to serve the "export" service "csv" endpoint.

func MountDownloadHandler

func MountDownloadHandler(mux goahttp.Muxer, h http.Handler)

MountDownloadHandler configures the mux to serve the "export" service "download" endpoint.

func MountJSONLinesHandler

func MountJSONLinesHandler(mux goahttp.Muxer, h http.Handler)

MountJSONLinesHandler configures the mux to serve the "export" service "json lines" endpoint.

func MountListMineHandler

func MountListMineHandler(mux goahttp.Muxer, h http.Handler)

MountListMineHandler configures the mux to serve the "export" service "list mine" endpoint.

func MountStatusHandler

func MountStatusHandler(mux goahttp.Muxer, h http.Handler)

MountStatusHandler configures the mux to serve the "export" service "status" endpoint.

func NewCORSHandler

func NewCORSHandler() http.Handler

NewCORSHandler creates a HTTP handler which returns a simple 200 response.

func NewCsvHandler

func NewCsvHandler(
	endpoint goa.Endpoint,
	mux goahttp.Muxer,
	decoder func(*http.Request) goahttp.Decoder,
	encoder func(context.Context, http.ResponseWriter) goahttp.Encoder,
	errhandler func(context.Context, http.ResponseWriter, error),
	formatter func(err error) goahttp.Statuser,
) http.Handler

NewCsvHandler creates a HTTP handler which loads the HTTP request and calls the "export" service "csv" endpoint.

func NewCsvPayload

func NewCsvPayload(start *int64, end *int64, stations *string, sensors *string, resolution *int32, aggregate *string, complete *bool, tail *int32, auth string) *export.CsvPayload

NewCsvPayload builds a export service csv endpoint payload.

func NewDownloadHandler

func NewDownloadHandler(
	endpoint goa.Endpoint,
	mux goahttp.Muxer,
	decoder func(*http.Request) goahttp.Decoder,
	encoder func(context.Context, http.ResponseWriter) goahttp.Encoder,
	errhandler func(context.Context, http.ResponseWriter, error),
	formatter func(err error) goahttp.Statuser,
) http.Handler

NewDownloadHandler creates a HTTP handler which loads the HTTP request and calls the "export" service "download" endpoint.

func NewDownloadPayload

func NewDownloadPayload(id string, auth string) *export.DownloadPayload

NewDownloadPayload builds a export service download endpoint payload.

func NewJSONLinesHandler

func NewJSONLinesHandler(
	endpoint goa.Endpoint,
	mux goahttp.Muxer,
	decoder func(*http.Request) goahttp.Decoder,
	encoder func(context.Context, http.ResponseWriter) goahttp.Encoder,
	errhandler func(context.Context, http.ResponseWriter, error),
	formatter func(err error) goahttp.Statuser,
) http.Handler

NewJSONLinesHandler creates a HTTP handler which loads the HTTP request and calls the "export" service "json lines" endpoint.

func NewJSONLinesPayload

func NewJSONLinesPayload(start *int64, end *int64, stations *string, sensors *string, resolution *int32, aggregate *string, complete *bool, tail *int32, auth string) *export.JSONLinesPayload

NewJSONLinesPayload builds a export service json lines endpoint payload.

func NewListMineHandler

func NewListMineHandler(
	endpoint goa.Endpoint,
	mux goahttp.Muxer,
	decoder func(*http.Request) goahttp.Decoder,
	encoder func(context.Context, http.ResponseWriter) goahttp.Encoder,
	errhandler func(context.Context, http.ResponseWriter, error),
	formatter func(err error) goahttp.Statuser,
) http.Handler

NewListMineHandler creates a HTTP handler which loads the HTTP request and calls the "export" service "list mine" endpoint.

func NewListMinePayload

func NewListMinePayload(auth string) *export.ListMinePayload

NewListMinePayload builds a export service list mine endpoint payload.

func NewStatusHandler

func NewStatusHandler(
	endpoint goa.Endpoint,
	mux goahttp.Muxer,
	decoder func(*http.Request) goahttp.Decoder,
	encoder func(context.Context, http.ResponseWriter) goahttp.Encoder,
	errhandler func(context.Context, http.ResponseWriter, error),
	formatter func(err error) goahttp.Statuser,
) http.Handler

NewStatusHandler creates a HTTP handler which loads the HTTP request and calls the "export" service "status" endpoint.

func NewStatusPayload

func NewStatusPayload(id string, auth string) *export.StatusPayload

NewStatusPayload builds a export service status endpoint payload.

func StatusExportPath

func StatusExportPath(id string) string

StatusExportPath returns the URL path to the export service status HTTP endpoint.

Types

type CsvBadRequestResponseBody

type CsvBadRequestResponseBody struct {
	// Name is the name of this class of errors.
	Name string `form:"name" json:"name" xml:"name"`
	// ID is a unique identifier for this particular occurrence of the problem.
	ID string `form:"id" json:"id" xml:"id"`
	// Message is a human-readable explanation specific to this occurrence of the
	// problem.
	Message string `form:"message" json:"message" xml:"message"`
	// Is the error temporary?
	Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
	// Is the error a timeout?
	Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
	// Is the error a server-side fault?
	Fault bool `form:"fault" json:"fault" xml:"fault"`
}

CsvBadRequestResponseBody is the type of the "export" service "csv" endpoint HTTP response body for the "bad-request" error.

func NewCsvBadRequestResponseBody

func NewCsvBadRequestResponseBody(res *goa.ServiceError) *CsvBadRequestResponseBody

NewCsvBadRequestResponseBody builds the HTTP response body from the result of the "csv" endpoint of the "export" service.

type CsvForbiddenResponseBody

type CsvForbiddenResponseBody struct {
	// Name is the name of this class of errors.
	Name string `form:"name" json:"name" xml:"name"`
	// ID is a unique identifier for this particular occurrence of the problem.
	ID string `form:"id" json:"id" xml:"id"`
	// Message is a human-readable explanation specific to this occurrence of the
	// problem.
	Message string `form:"message" json:"message" xml:"message"`
	// Is the error temporary?
	Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
	// Is the error a timeout?
	Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
	// Is the error a server-side fault?
	Fault bool `form:"fault" json:"fault" xml:"fault"`
}

CsvForbiddenResponseBody is the type of the "export" service "csv" endpoint HTTP response body for the "forbidden" error.

func NewCsvForbiddenResponseBody

func NewCsvForbiddenResponseBody(res *goa.ServiceError) *CsvForbiddenResponseBody

NewCsvForbiddenResponseBody builds the HTTP response body from the result of the "csv" endpoint of the "export" service.

type CsvNotFoundResponseBody

type CsvNotFoundResponseBody struct {
	// Name is the name of this class of errors.
	Name string `form:"name" json:"name" xml:"name"`
	// ID is a unique identifier for this particular occurrence of the problem.
	ID string `form:"id" json:"id" xml:"id"`
	// Message is a human-readable explanation specific to this occurrence of the
	// problem.
	Message string `form:"message" json:"message" xml:"message"`
	// Is the error temporary?
	Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
	// Is the error a timeout?
	Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
	// Is the error a server-side fault?
	Fault bool `form:"fault" json:"fault" xml:"fault"`
}

CsvNotFoundResponseBody is the type of the "export" service "csv" endpoint HTTP response body for the "not-found" error.

func NewCsvNotFoundResponseBody

func NewCsvNotFoundResponseBody(res *goa.ServiceError) *CsvNotFoundResponseBody

NewCsvNotFoundResponseBody builds the HTTP response body from the result of the "csv" endpoint of the "export" service.

type CsvUnauthorizedResponseBody

type CsvUnauthorizedResponseBody struct {
	// Name is the name of this class of errors.
	Name string `form:"name" json:"name" xml:"name"`
	// ID is a unique identifier for this particular occurrence of the problem.
	ID string `form:"id" json:"id" xml:"id"`
	// Message is a human-readable explanation specific to this occurrence of the
	// problem.
	Message string `form:"message" json:"message" xml:"message"`
	// Is the error temporary?
	Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
	// Is the error a timeout?
	Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
	// Is the error a server-side fault?
	Fault bool `form:"fault" json:"fault" xml:"fault"`
}

CsvUnauthorizedResponseBody is the type of the "export" service "csv" endpoint HTTP response body for the "unauthorized" error.

func NewCsvUnauthorizedResponseBody

func NewCsvUnauthorizedResponseBody(res *goa.ServiceError) *CsvUnauthorizedResponseBody

NewCsvUnauthorizedResponseBody builds the HTTP response body from the result of the "csv" endpoint of the "export" service.

type DownloadBadRequestResponseBody

type DownloadBadRequestResponseBody struct {
	// Name is the name of this class of errors.
	Name string `form:"name" json:"name" xml:"name"`
	// ID is a unique identifier for this particular occurrence of the problem.
	ID string `form:"id" json:"id" xml:"id"`
	// Message is a human-readable explanation specific to this occurrence of the
	// problem.
	Message string `form:"message" json:"message" xml:"message"`
	// Is the error temporary?
	Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
	// Is the error a timeout?
	Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
	// Is the error a server-side fault?
	Fault bool `form:"fault" json:"fault" xml:"fault"`
}

DownloadBadRequestResponseBody is the type of the "export" service "download" endpoint HTTP response body for the "bad-request" error.

func NewDownloadBadRequestResponseBody

func NewDownloadBadRequestResponseBody(res *goa.ServiceError) *DownloadBadRequestResponseBody

NewDownloadBadRequestResponseBody builds the HTTP response body from the result of the "download" endpoint of the "export" service.

type DownloadForbiddenResponseBody

type DownloadForbiddenResponseBody struct {
	// Name is the name of this class of errors.
	Name string `form:"name" json:"name" xml:"name"`
	// ID is a unique identifier for this particular occurrence of the problem.
	ID string `form:"id" json:"id" xml:"id"`
	// Message is a human-readable explanation specific to this occurrence of the
	// problem.
	Message string `form:"message" json:"message" xml:"message"`
	// Is the error temporary?
	Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
	// Is the error a timeout?
	Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
	// Is the error a server-side fault?
	Fault bool `form:"fault" json:"fault" xml:"fault"`
}

DownloadForbiddenResponseBody is the type of the "export" service "download" endpoint HTTP response body for the "forbidden" error.

func NewDownloadForbiddenResponseBody

func NewDownloadForbiddenResponseBody(res *goa.ServiceError) *DownloadForbiddenResponseBody

NewDownloadForbiddenResponseBody builds the HTTP response body from the result of the "download" endpoint of the "export" service.

type DownloadNotFoundResponseBody

type DownloadNotFoundResponseBody struct {
	// Name is the name of this class of errors.
	Name string `form:"name" json:"name" xml:"name"`
	// ID is a unique identifier for this particular occurrence of the problem.
	ID string `form:"id" json:"id" xml:"id"`
	// Message is a human-readable explanation specific to this occurrence of the
	// problem.
	Message string `form:"message" json:"message" xml:"message"`
	// Is the error temporary?
	Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
	// Is the error a timeout?
	Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
	// Is the error a server-side fault?
	Fault bool `form:"fault" json:"fault" xml:"fault"`
}

DownloadNotFoundResponseBody is the type of the "export" service "download" endpoint HTTP response body for the "not-found" error.

func NewDownloadNotFoundResponseBody

func NewDownloadNotFoundResponseBody(res *goa.ServiceError) *DownloadNotFoundResponseBody

NewDownloadNotFoundResponseBody builds the HTTP response body from the result of the "download" endpoint of the "export" service.

type DownloadUnauthorizedResponseBody

type DownloadUnauthorizedResponseBody struct {
	// Name is the name of this class of errors.
	Name string `form:"name" json:"name" xml:"name"`
	// ID is a unique identifier for this particular occurrence of the problem.
	ID string `form:"id" json:"id" xml:"id"`
	// Message is a human-readable explanation specific to this occurrence of the
	// problem.
	Message string `form:"message" json:"message" xml:"message"`
	// Is the error temporary?
	Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
	// Is the error a timeout?
	Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
	// Is the error a server-side fault?
	Fault bool `form:"fault" json:"fault" xml:"fault"`
}

DownloadUnauthorizedResponseBody is the type of the "export" service "download" endpoint HTTP response body for the "unauthorized" error.

func NewDownloadUnauthorizedResponseBody

func NewDownloadUnauthorizedResponseBody(res *goa.ServiceError) *DownloadUnauthorizedResponseBody

NewDownloadUnauthorizedResponseBody builds the HTTP response body from the result of the "download" endpoint of the "export" service.

type ErrorNamer

type ErrorNamer interface {
	ErrorName() string
}

ErrorNamer is an interface implemented by generated error structs that exposes the name of the error as defined in the design.

type ExportStatusResponseBody

type ExportStatusResponseBody struct {
	ID          int64       `form:"id" json:"id" xml:"id"`
	Token       string      `form:"token" json:"token" xml:"token"`
	CreatedAt   int64       `form:"createdAt" json:"createdAt" xml:"createdAt"`
	CompletedAt *int64      `form:"completedAt,omitempty" json:"completedAt,omitempty" xml:"completedAt,omitempty"`
	Format      string      `form:"format" json:"format" xml:"format"`
	Progress    float32     `form:"progress" json:"progress" xml:"progress"`
	Message     *string     `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
	StatusURL   string      `form:"statusUrl" json:"statusUrl" xml:"statusUrl"`
	DownloadURL *string     `form:"downloadUrl,omitempty" json:"downloadUrl,omitempty" xml:"downloadUrl,omitempty"`
	Size        *int32      `form:"size,omitempty" json:"size,omitempty" xml:"size,omitempty"`
	Args        interface{} `form:"args" json:"args" xml:"args"`
}

ExportStatusResponseBody is used to define fields on response body types.

type JSONLinesBadRequestResponseBody

type JSONLinesBadRequestResponseBody struct {
	// Name is the name of this class of errors.
	Name string `form:"name" json:"name" xml:"name"`
	// ID is a unique identifier for this particular occurrence of the problem.
	ID string `form:"id" json:"id" xml:"id"`
	// Message is a human-readable explanation specific to this occurrence of the
	// problem.
	Message string `form:"message" json:"message" xml:"message"`
	// Is the error temporary?
	Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
	// Is the error a timeout?
	Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
	// Is the error a server-side fault?
	Fault bool `form:"fault" json:"fault" xml:"fault"`
}

JSONLinesBadRequestResponseBody is the type of the "export" service "json lines" endpoint HTTP response body for the "bad-request" error.

func NewJSONLinesBadRequestResponseBody

func NewJSONLinesBadRequestResponseBody(res *goa.ServiceError) *JSONLinesBadRequestResponseBody

NewJSONLinesBadRequestResponseBody builds the HTTP response body from the result of the "json lines" endpoint of the "export" service.

type JSONLinesForbiddenResponseBody

type JSONLinesForbiddenResponseBody struct {
	// Name is the name of this class of errors.
	Name string `form:"name" json:"name" xml:"name"`
	// ID is a unique identifier for this particular occurrence of the problem.
	ID string `form:"id" json:"id" xml:"id"`
	// Message is a human-readable explanation specific to this occurrence of the
	// problem.
	Message string `form:"message" json:"message" xml:"message"`
	// Is the error temporary?
	Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
	// Is the error a timeout?
	Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
	// Is the error a server-side fault?
	Fault bool `form:"fault" json:"fault" xml:"fault"`
}

JSONLinesForbiddenResponseBody is the type of the "export" service "json lines" endpoint HTTP response body for the "forbidden" error.

func NewJSONLinesForbiddenResponseBody

func NewJSONLinesForbiddenResponseBody(res *goa.ServiceError) *JSONLinesForbiddenResponseBody

NewJSONLinesForbiddenResponseBody builds the HTTP response body from the result of the "json lines" endpoint of the "export" service.

type JSONLinesNotFoundResponseBody

type JSONLinesNotFoundResponseBody struct {
	// Name is the name of this class of errors.
	Name string `form:"name" json:"name" xml:"name"`
	// ID is a unique identifier for this particular occurrence of the problem.
	ID string `form:"id" json:"id" xml:"id"`
	// Message is a human-readable explanation specific to this occurrence of the
	// problem.
	Message string `form:"message" json:"message" xml:"message"`
	// Is the error temporary?
	Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
	// Is the error a timeout?
	Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
	// Is the error a server-side fault?
	Fault bool `form:"fault" json:"fault" xml:"fault"`
}

JSONLinesNotFoundResponseBody is the type of the "export" service "json lines" endpoint HTTP response body for the "not-found" error.

func NewJSONLinesNotFoundResponseBody

func NewJSONLinesNotFoundResponseBody(res *goa.ServiceError) *JSONLinesNotFoundResponseBody

NewJSONLinesNotFoundResponseBody builds the HTTP response body from the result of the "json lines" endpoint of the "export" service.

type JSONLinesUnauthorizedResponseBody

type JSONLinesUnauthorizedResponseBody struct {
	// Name is the name of this class of errors.
	Name string `form:"name" json:"name" xml:"name"`
	// ID is a unique identifier for this particular occurrence of the problem.
	ID string `form:"id" json:"id" xml:"id"`
	// Message is a human-readable explanation specific to this occurrence of the
	// problem.
	Message string `form:"message" json:"message" xml:"message"`
	// Is the error temporary?
	Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
	// Is the error a timeout?
	Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
	// Is the error a server-side fault?
	Fault bool `form:"fault" json:"fault" xml:"fault"`
}

JSONLinesUnauthorizedResponseBody is the type of the "export" service "json lines" endpoint HTTP response body for the "unauthorized" error.

func NewJSONLinesUnauthorizedResponseBody

func NewJSONLinesUnauthorizedResponseBody(res *goa.ServiceError) *JSONLinesUnauthorizedResponseBody

NewJSONLinesUnauthorizedResponseBody builds the HTTP response body from the result of the "json lines" endpoint of the "export" service.

type ListMineBadRequestResponseBody

type ListMineBadRequestResponseBody struct {
	// Name is the name of this class of errors.
	Name string `form:"name" json:"name" xml:"name"`
	// ID is a unique identifier for this particular occurrence of the problem.
	ID string `form:"id" json:"id" xml:"id"`
	// Message is a human-readable explanation specific to this occurrence of the
	// problem.
	Message string `form:"message" json:"message" xml:"message"`
	// Is the error temporary?
	Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
	// Is the error a timeout?
	Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
	// Is the error a server-side fault?
	Fault bool `form:"fault" json:"fault" xml:"fault"`
}

ListMineBadRequestResponseBody is the type of the "export" service "list mine" endpoint HTTP response body for the "bad-request" error.

func NewListMineBadRequestResponseBody

func NewListMineBadRequestResponseBody(res *goa.ServiceError) *ListMineBadRequestResponseBody

NewListMineBadRequestResponseBody builds the HTTP response body from the result of the "list mine" endpoint of the "export" service.

type ListMineForbiddenResponseBody

type ListMineForbiddenResponseBody struct {
	// Name is the name of this class of errors.
	Name string `form:"name" json:"name" xml:"name"`
	// ID is a unique identifier for this particular occurrence of the problem.
	ID string `form:"id" json:"id" xml:"id"`
	// Message is a human-readable explanation specific to this occurrence of the
	// problem.
	Message string `form:"message" json:"message" xml:"message"`
	// Is the error temporary?
	Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
	// Is the error a timeout?
	Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
	// Is the error a server-side fault?
	Fault bool `form:"fault" json:"fault" xml:"fault"`
}

ListMineForbiddenResponseBody is the type of the "export" service "list mine" endpoint HTTP response body for the "forbidden" error.

func NewListMineForbiddenResponseBody

func NewListMineForbiddenResponseBody(res *goa.ServiceError) *ListMineForbiddenResponseBody

NewListMineForbiddenResponseBody builds the HTTP response body from the result of the "list mine" endpoint of the "export" service.

type ListMineNotFoundResponseBody

type ListMineNotFoundResponseBody struct {
	// Name is the name of this class of errors.
	Name string `form:"name" json:"name" xml:"name"`
	// ID is a unique identifier for this particular occurrence of the problem.
	ID string `form:"id" json:"id" xml:"id"`
	// Message is a human-readable explanation specific to this occurrence of the
	// problem.
	Message string `form:"message" json:"message" xml:"message"`
	// Is the error temporary?
	Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
	// Is the error a timeout?
	Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
	// Is the error a server-side fault?
	Fault bool `form:"fault" json:"fault" xml:"fault"`
}

ListMineNotFoundResponseBody is the type of the "export" service "list mine" endpoint HTTP response body for the "not-found" error.

func NewListMineNotFoundResponseBody

func NewListMineNotFoundResponseBody(res *goa.ServiceError) *ListMineNotFoundResponseBody

NewListMineNotFoundResponseBody builds the HTTP response body from the result of the "list mine" endpoint of the "export" service.

type ListMineResponseBody

type ListMineResponseBody struct {
	Exports []*ExportStatusResponseBody `form:"exports" json:"exports" xml:"exports"`
}

ListMineResponseBody is the type of the "export" service "list mine" endpoint HTTP response body.

func NewListMineResponseBody

func NewListMineResponseBody(res *exportviews.UserExportsView) *ListMineResponseBody

NewListMineResponseBody builds the HTTP response body from the result of the "list mine" endpoint of the "export" service.

type ListMineUnauthorizedResponseBody

type ListMineUnauthorizedResponseBody struct {
	// Name is the name of this class of errors.
	Name string `form:"name" json:"name" xml:"name"`
	// ID is a unique identifier for this particular occurrence of the problem.
	ID string `form:"id" json:"id" xml:"id"`
	// Message is a human-readable explanation specific to this occurrence of the
	// problem.
	Message string `form:"message" json:"message" xml:"message"`
	// Is the error temporary?
	Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
	// Is the error a timeout?
	Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
	// Is the error a server-side fault?
	Fault bool `form:"fault" json:"fault" xml:"fault"`
}

ListMineUnauthorizedResponseBody is the type of the "export" service "list mine" endpoint HTTP response body for the "unauthorized" error.

func NewListMineUnauthorizedResponseBody

func NewListMineUnauthorizedResponseBody(res *goa.ServiceError) *ListMineUnauthorizedResponseBody

NewListMineUnauthorizedResponseBody builds the HTTP response body from the result of the "list mine" endpoint of the "export" service.

type MountPoint

type MountPoint struct {
	// Method is the name of the service method served by the mounted HTTP handler.
	Method string
	// Verb is the HTTP method used to match requests to the mounted handler.
	Verb string
	// Pattern is the HTTP request path pattern used to match requests to the
	// mounted handler.
	Pattern string
}

MountPoint holds information about the mounted endpoints.

type Server

type Server struct {
	Mounts    []*MountPoint
	ListMine  http.Handler
	Status    http.Handler
	Download  http.Handler
	Csv       http.Handler
	JSONLines http.Handler
	CORS      http.Handler
}

Server lists the export service endpoint HTTP handlers.

func New

func New(
	e *export.Endpoints,
	mux goahttp.Muxer,
	decoder func(*http.Request) goahttp.Decoder,
	encoder func(context.Context, http.ResponseWriter) goahttp.Encoder,
	errhandler func(context.Context, http.ResponseWriter, error),
	formatter func(err error) goahttp.Statuser,
) *Server

New instantiates HTTP handlers for all the export service endpoints using the provided encoder and decoder. The handlers are mounted on the given mux using the HTTP verb and path defined in the design. errhandler is called whenever a response fails to be encoded. formatter is used to format errors returned by the service methods prior to encoding. Both errhandler and formatter are optional and can be nil.

func (*Server) Service

func (s *Server) Service() string

Service returns the name of the service served.

func (*Server) Use

func (s *Server) Use(m func(http.Handler) http.Handler)

Use wraps the server handlers with the given middleware.

type StatusBadRequestResponseBody

type StatusBadRequestResponseBody struct {
	// Name is the name of this class of errors.
	Name string `form:"name" json:"name" xml:"name"`
	// ID is a unique identifier for this particular occurrence of the problem.
	ID string `form:"id" json:"id" xml:"id"`
	// Message is a human-readable explanation specific to this occurrence of the
	// problem.
	Message string `form:"message" json:"message" xml:"message"`
	// Is the error temporary?
	Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
	// Is the error a timeout?
	Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
	// Is the error a server-side fault?
	Fault bool `form:"fault" json:"fault" xml:"fault"`
}

StatusBadRequestResponseBody is the type of the "export" service "status" endpoint HTTP response body for the "bad-request" error.

func NewStatusBadRequestResponseBody

func NewStatusBadRequestResponseBody(res *goa.ServiceError) *StatusBadRequestResponseBody

NewStatusBadRequestResponseBody builds the HTTP response body from the result of the "status" endpoint of the "export" service.

type StatusForbiddenResponseBody

type StatusForbiddenResponseBody struct {
	// Name is the name of this class of errors.
	Name string `form:"name" json:"name" xml:"name"`
	// ID is a unique identifier for this particular occurrence of the problem.
	ID string `form:"id" json:"id" xml:"id"`
	// Message is a human-readable explanation specific to this occurrence of the
	// problem.
	Message string `form:"message" json:"message" xml:"message"`
	// Is the error temporary?
	Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
	// Is the error a timeout?
	Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
	// Is the error a server-side fault?
	Fault bool `form:"fault" json:"fault" xml:"fault"`
}

StatusForbiddenResponseBody is the type of the "export" service "status" endpoint HTTP response body for the "forbidden" error.

func NewStatusForbiddenResponseBody

func NewStatusForbiddenResponseBody(res *goa.ServiceError) *StatusForbiddenResponseBody

NewStatusForbiddenResponseBody builds the HTTP response body from the result of the "status" endpoint of the "export" service.

type StatusNotFoundResponseBody

type StatusNotFoundResponseBody struct {
	// Name is the name of this class of errors.
	Name string `form:"name" json:"name" xml:"name"`
	// ID is a unique identifier for this particular occurrence of the problem.
	ID string `form:"id" json:"id" xml:"id"`
	// Message is a human-readable explanation specific to this occurrence of the
	// problem.
	Message string `form:"message" json:"message" xml:"message"`
	// Is the error temporary?
	Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
	// Is the error a timeout?
	Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
	// Is the error a server-side fault?
	Fault bool `form:"fault" json:"fault" xml:"fault"`
}

StatusNotFoundResponseBody is the type of the "export" service "status" endpoint HTTP response body for the "not-found" error.

func NewStatusNotFoundResponseBody

func NewStatusNotFoundResponseBody(res *goa.ServiceError) *StatusNotFoundResponseBody

NewStatusNotFoundResponseBody builds the HTTP response body from the result of the "status" endpoint of the "export" service.

type StatusResponseBody

type StatusResponseBody struct {
	ID          int64       `form:"id" json:"id" xml:"id"`
	Token       string      `form:"token" json:"token" xml:"token"`
	CreatedAt   int64       `form:"createdAt" json:"createdAt" xml:"createdAt"`
	CompletedAt *int64      `form:"completedAt,omitempty" json:"completedAt,omitempty" xml:"completedAt,omitempty"`
	Format      string      `form:"format" json:"format" xml:"format"`
	Progress    float32     `form:"progress" json:"progress" xml:"progress"`
	Message     *string     `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
	StatusURL   string      `form:"statusUrl" json:"statusUrl" xml:"statusUrl"`
	DownloadURL *string     `form:"downloadUrl,omitempty" json:"downloadUrl,omitempty" xml:"downloadUrl,omitempty"`
	Size        *int32      `form:"size,omitempty" json:"size,omitempty" xml:"size,omitempty"`
	Args        interface{} `form:"args" json:"args" xml:"args"`
}

StatusResponseBody is the type of the "export" service "status" endpoint HTTP response body.

func NewStatusResponseBody

func NewStatusResponseBody(res *exportviews.ExportStatusView) *StatusResponseBody

NewStatusResponseBody builds the HTTP response body from the result of the "status" endpoint of the "export" service.

type StatusUnauthorizedResponseBody

type StatusUnauthorizedResponseBody struct {
	// Name is the name of this class of errors.
	Name string `form:"name" json:"name" xml:"name"`
	// ID is a unique identifier for this particular occurrence of the problem.
	ID string `form:"id" json:"id" xml:"id"`
	// Message is a human-readable explanation specific to this occurrence of the
	// problem.
	Message string `form:"message" json:"message" xml:"message"`
	// Is the error temporary?
	Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
	// Is the error a timeout?
	Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
	// Is the error a server-side fault?
	Fault bool `form:"fault" json:"fault" xml:"fault"`
}

StatusUnauthorizedResponseBody is the type of the "export" service "status" endpoint HTTP response body for the "unauthorized" error.

func NewStatusUnauthorizedResponseBody

func NewStatusUnauthorizedResponseBody(res *goa.ServiceError) *StatusUnauthorizedResponseBody

NewStatusUnauthorizedResponseBody builds the HTTP response body from the result of the "status" endpoint of the "export" service.

Jump to

Keyboard shortcuts

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