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 DecodeDeleteMediaRequest

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

DecodeDeleteMediaRequest returns a decoder for requests sent to the notes delete media endpoint.

func DecodeDownloadMediaRequest

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

DecodeDownloadMediaRequest returns a decoder for requests sent to the notes download media endpoint.

func DecodeGetRequest

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

DecodeGetRequest returns a decoder for requests sent to the notes get endpoint.

func DecodeUpdateRequest

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

DecodeUpdateRequest returns a decoder for requests sent to the notes update endpoint.

func DecodeUploadMediaRequest

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

DecodeUploadMediaRequest returns a decoder for requests sent to the notes upload media endpoint.

func DeleteMediaNotesPath

func DeleteMediaNotesPath(mediaID int32) string

DeleteMediaNotesPath returns the URL path to the notes service delete media HTTP endpoint.

func DownloadMediaNotesPath

func DownloadMediaNotesPath(mediaID int32) string

DownloadMediaNotesPath returns the URL path to the notes service download media HTTP endpoint.

func EncodeDeleteMediaError

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

EncodeDeleteMediaError returns an encoder for errors returned by the delete media notes endpoint.

func EncodeDeleteMediaResponse

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

EncodeDeleteMediaResponse returns an encoder for responses returned by the notes delete media endpoint.

func EncodeDownloadMediaError

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

EncodeDownloadMediaError returns an encoder for errors returned by the download media notes endpoint.

func EncodeDownloadMediaResponse

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

EncodeDownloadMediaResponse returns an encoder for responses returned by the notes download media endpoint.

func EncodeGetError

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

EncodeGetError returns an encoder for errors returned by the get notes endpoint.

func EncodeGetResponse

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

EncodeGetResponse returns an encoder for responses returned by the notes get endpoint.

func EncodeUpdateError

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

EncodeUpdateError returns an encoder for errors returned by the update notes endpoint.

func EncodeUpdateResponse

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

EncodeUpdateResponse returns an encoder for responses returned by the notes update endpoint.

func EncodeUploadMediaError

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

EncodeUploadMediaError returns an encoder for errors returned by the upload media notes endpoint.

func EncodeUploadMediaResponse

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

EncodeUploadMediaResponse returns an encoder for responses returned by the notes upload media endpoint.

func GetNotesPath

func GetNotesPath(stationID int32) string

GetNotesPath returns the URL path to the notes service get HTTP endpoint.

func Mount

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

Mount configures the mux to serve the notes endpoints.

func MountCORSHandler

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

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

func MountDeleteMediaHandler

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

MountDeleteMediaHandler configures the mux to serve the "notes" service "delete media" endpoint.

func MountDownloadMediaHandler

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

MountDownloadMediaHandler configures the mux to serve the "notes" service "download media" endpoint.

func MountGetHandler

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

MountGetHandler configures the mux to serve the "notes" service "get" endpoint.

func MountUpdateHandler

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

MountUpdateHandler configures the mux to serve the "notes" service "update" endpoint.

func MountUploadMediaHandler

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

MountUploadMediaHandler configures the mux to serve the "notes" service "upload media" endpoint.

func NewCORSHandler

func NewCORSHandler() http.Handler

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

func NewDeleteMediaHandler

func NewDeleteMediaHandler(
	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

NewDeleteMediaHandler creates a HTTP handler which loads the HTTP request and calls the "notes" service "delete media" endpoint.

func NewDeleteMediaPayload

func NewDeleteMediaPayload(mediaID int32, auth string) *notes.DeleteMediaPayload

NewDeleteMediaPayload builds a notes service delete media endpoint payload.

func NewDownloadMediaHandler

func NewDownloadMediaHandler(
	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

NewDownloadMediaHandler creates a HTTP handler which loads the HTTP request and calls the "notes" service "download media" endpoint.

func NewDownloadMediaPayload

func NewDownloadMediaPayload(mediaID int32, auth *string) *notes.DownloadMediaPayload

NewDownloadMediaPayload builds a notes service download media endpoint payload.

func NewGetHandler

func NewGetHandler(
	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

NewGetHandler creates a HTTP handler which loads the HTTP request and calls the "notes" service "get" endpoint.

func NewGetPayload

func NewGetPayload(stationID int32, auth *string) *notes.GetPayload

NewGetPayload builds a notes service get endpoint payload.

func NewUpdateHandler

func NewUpdateHandler(
	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

NewUpdateHandler creates a HTTP handler which loads the HTTP request and calls the "notes" service "update" endpoint.

func NewUpdatePayload

func NewUpdatePayload(body *UpdateRequestBody, stationID int32, auth string) *notes.UpdatePayload

NewUpdatePayload builds a notes service update endpoint payload.

func NewUploadMediaHandler

func NewUploadMediaHandler(
	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

NewUploadMediaHandler creates a HTTP handler which loads the HTTP request and calls the "notes" service "upload media" endpoint.

func NewUploadMediaPayload

func NewUploadMediaPayload(stationID int32, key string, contentType string, contentLength int64, auth string) *notes.UploadMediaPayload

NewUploadMediaPayload builds a notes service upload media endpoint payload.

func UpdateNotesPath

func UpdateNotesPath(stationID int32) string

UpdateNotesPath returns the URL path to the notes service update HTTP endpoint.

func UploadMediaNotesPath

func UploadMediaNotesPath(stationID int32) string

UploadMediaNotesPath returns the URL path to the notes service upload media HTTP endpoint.

func ValidateExistingFieldNoteRequestBody

func ValidateExistingFieldNoteRequestBody(body *ExistingFieldNoteRequestBody) (err error)

ValidateExistingFieldNoteRequestBody runs the validations defined on ExistingFieldNoteRequestBody

func ValidateFieldNoteUpdateRequestBody

func ValidateFieldNoteUpdateRequestBody(body *FieldNoteUpdateRequestBody) (err error)

ValidateFieldNoteUpdateRequestBody runs the validations defined on FieldNoteUpdateRequestBody

func ValidateUpdateRequestBody

func ValidateUpdateRequestBody(body *UpdateRequestBody) (err error)

ValidateUpdateRequestBody runs the validations defined on UpdateRequestBody

Types

type DeleteMediaBadRequestResponseBody

type DeleteMediaBadRequestResponseBody 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"`
}

DeleteMediaBadRequestResponseBody is the type of the "notes" service "delete media" endpoint HTTP response body for the "bad-request" error.

func NewDeleteMediaBadRequestResponseBody

func NewDeleteMediaBadRequestResponseBody(res *goa.ServiceError) *DeleteMediaBadRequestResponseBody

NewDeleteMediaBadRequestResponseBody builds the HTTP response body from the result of the "delete media" endpoint of the "notes" service.

type DeleteMediaForbiddenResponseBody

type DeleteMediaForbiddenResponseBody 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"`
}

DeleteMediaForbiddenResponseBody is the type of the "notes" service "delete media" endpoint HTTP response body for the "forbidden" error.

func NewDeleteMediaForbiddenResponseBody

func NewDeleteMediaForbiddenResponseBody(res *goa.ServiceError) *DeleteMediaForbiddenResponseBody

NewDeleteMediaForbiddenResponseBody builds the HTTP response body from the result of the "delete media" endpoint of the "notes" service.

type DeleteMediaNotFoundResponseBody

type DeleteMediaNotFoundResponseBody 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"`
}

DeleteMediaNotFoundResponseBody is the type of the "notes" service "delete media" endpoint HTTP response body for the "not-found" error.

func NewDeleteMediaNotFoundResponseBody

func NewDeleteMediaNotFoundResponseBody(res *goa.ServiceError) *DeleteMediaNotFoundResponseBody

NewDeleteMediaNotFoundResponseBody builds the HTTP response body from the result of the "delete media" endpoint of the "notes" service.

type DeleteMediaUnauthorizedResponseBody

type DeleteMediaUnauthorizedResponseBody 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"`
}

DeleteMediaUnauthorizedResponseBody is the type of the "notes" service "delete media" endpoint HTTP response body for the "unauthorized" error.

func NewDeleteMediaUnauthorizedResponseBody

func NewDeleteMediaUnauthorizedResponseBody(res *goa.ServiceError) *DeleteMediaUnauthorizedResponseBody

NewDeleteMediaUnauthorizedResponseBody builds the HTTP response body from the result of the "delete media" endpoint of the "notes" service.

type DownloadMediaBadRequestResponseBody

type DownloadMediaBadRequestResponseBody 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"`
}

DownloadMediaBadRequestResponseBody is the type of the "notes" service "download media" endpoint HTTP response body for the "bad-request" error.

func NewDownloadMediaBadRequestResponseBody

func NewDownloadMediaBadRequestResponseBody(res *goa.ServiceError) *DownloadMediaBadRequestResponseBody

NewDownloadMediaBadRequestResponseBody builds the HTTP response body from the result of the "download media" endpoint of the "notes" service.

type DownloadMediaForbiddenResponseBody

type DownloadMediaForbiddenResponseBody 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"`
}

DownloadMediaForbiddenResponseBody is the type of the "notes" service "download media" endpoint HTTP response body for the "forbidden" error.

func NewDownloadMediaForbiddenResponseBody

func NewDownloadMediaForbiddenResponseBody(res *goa.ServiceError) *DownloadMediaForbiddenResponseBody

NewDownloadMediaForbiddenResponseBody builds the HTTP response body from the result of the "download media" endpoint of the "notes" service.

type DownloadMediaNotFoundResponseBody

type DownloadMediaNotFoundResponseBody 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"`
}

DownloadMediaNotFoundResponseBody is the type of the "notes" service "download media" endpoint HTTP response body for the "not-found" error.

func NewDownloadMediaNotFoundResponseBody

func NewDownloadMediaNotFoundResponseBody(res *goa.ServiceError) *DownloadMediaNotFoundResponseBody

NewDownloadMediaNotFoundResponseBody builds the HTTP response body from the result of the "download media" endpoint of the "notes" service.

type DownloadMediaUnauthorizedResponseBody

type DownloadMediaUnauthorizedResponseBody 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"`
}

DownloadMediaUnauthorizedResponseBody is the type of the "notes" service "download media" endpoint HTTP response body for the "unauthorized" error.

func NewDownloadMediaUnauthorizedResponseBody

func NewDownloadMediaUnauthorizedResponseBody(res *goa.ServiceError) *DownloadMediaUnauthorizedResponseBody

NewDownloadMediaUnauthorizedResponseBody builds the HTTP response body from the result of the "download media" endpoint of the "notes" 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 ExistingFieldNoteRequestBody

type ExistingFieldNoteRequestBody struct {
	ID       *int64  `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
	Key      *string `form:"key,omitempty" json:"key,omitempty" xml:"key,omitempty"`
	Title    *string `form:"title,omitempty" json:"title,omitempty" xml:"title,omitempty"`
	Body     *string `form:"body,omitempty" json:"body,omitempty" xml:"body,omitempty"`
	MediaIds []int64 `form:"mediaIds,omitempty" json:"mediaIds,omitempty" xml:"mediaIds,omitempty"`
}

ExistingFieldNoteRequestBody is used to define fields on request body types.

type FieldNoteAuthorResponseBody

type FieldNoteAuthorResponseBody struct {
	ID       int32  `form:"id" json:"id" xml:"id"`
	Name     string `form:"name" json:"name" xml:"name"`
	MediaURL string `form:"mediaUrl" json:"mediaUrl" xml:"mediaUrl"`
}

FieldNoteAuthorResponseBody is used to define fields on response body types.

type FieldNoteResponseBody

type FieldNoteResponseBody struct {
	ID        int64                        `form:"id" json:"id" xml:"id"`
	CreatedAt int64                        `form:"createdAt" json:"createdAt" xml:"createdAt"`
	UpdatedAt int64                        `form:"updatedAt" json:"updatedAt" xml:"updatedAt"`
	Author    *FieldNoteAuthorResponseBody `form:"author" json:"author" xml:"author"`
	Key       *string                      `form:"key,omitempty" json:"key,omitempty" xml:"key,omitempty"`
	Title     *string                      `form:"title,omitempty" json:"title,omitempty" xml:"title,omitempty"`
	Body      *string                      `form:"body,omitempty" json:"body,omitempty" xml:"body,omitempty"`
	Version   int64                        `form:"version" json:"version" xml:"version"`
	Media     []*NoteMediaResponseBody     `form:"media" json:"media" xml:"media"`
}

FieldNoteResponseBody is used to define fields on response body types.

type FieldNoteStationResponseBody

type FieldNoteStationResponseBody struct {
	ReadOnly bool `form:"readOnly" json:"readOnly" xml:"readOnly"`
}

FieldNoteStationResponseBody is used to define fields on response body types.

type FieldNoteUpdateRequestBody

type FieldNoteUpdateRequestBody struct {
	Notes    []*ExistingFieldNoteRequestBody `form:"notes,omitempty" json:"notes,omitempty" xml:"notes,omitempty"`
	Creating []*NewFieldNoteRequestBody      `form:"creating,omitempty" json:"creating,omitempty" xml:"creating,omitempty"`
}

FieldNoteUpdateRequestBody is used to define fields on request body types.

type GetBadRequestResponseBody

type GetBadRequestResponseBody 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"`
}

GetBadRequestResponseBody is the type of the "notes" service "get" endpoint HTTP response body for the "bad-request" error.

func NewGetBadRequestResponseBody

func NewGetBadRequestResponseBody(res *goa.ServiceError) *GetBadRequestResponseBody

NewGetBadRequestResponseBody builds the HTTP response body from the result of the "get" endpoint of the "notes" service.

type GetForbiddenResponseBody

type GetForbiddenResponseBody 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"`
}

GetForbiddenResponseBody is the type of the "notes" service "get" endpoint HTTP response body for the "forbidden" error.

func NewGetForbiddenResponseBody

func NewGetForbiddenResponseBody(res *goa.ServiceError) *GetForbiddenResponseBody

NewGetForbiddenResponseBody builds the HTTP response body from the result of the "get" endpoint of the "notes" service.

type GetNotFoundResponseBody

type GetNotFoundResponseBody 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"`
}

GetNotFoundResponseBody is the type of the "notes" service "get" endpoint HTTP response body for the "not-found" error.

func NewGetNotFoundResponseBody

func NewGetNotFoundResponseBody(res *goa.ServiceError) *GetNotFoundResponseBody

NewGetNotFoundResponseBody builds the HTTP response body from the result of the "get" endpoint of the "notes" service.

type GetResponseBody

type GetResponseBody struct {
	Notes   []*FieldNoteResponseBody      `form:"notes" json:"notes" xml:"notes"`
	Media   []*NoteMediaResponseBody      `form:"media" json:"media" xml:"media"`
	Station *FieldNoteStationResponseBody `form:"station" json:"station" xml:"station"`
}

GetResponseBody is the type of the "notes" service "get" endpoint HTTP response body.

func NewGetResponseBody

func NewGetResponseBody(res *notesviews.FieldNotesView) *GetResponseBody

NewGetResponseBody builds the HTTP response body from the result of the "get" endpoint of the "notes" service.

type GetUnauthorizedResponseBody

type GetUnauthorizedResponseBody 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"`
}

GetUnauthorizedResponseBody is the type of the "notes" service "get" endpoint HTTP response body for the "unauthorized" error.

func NewGetUnauthorizedResponseBody

func NewGetUnauthorizedResponseBody(res *goa.ServiceError) *GetUnauthorizedResponseBody

NewGetUnauthorizedResponseBody builds the HTTP response body from the result of the "get" endpoint of the "notes" 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 NewFieldNoteRequestBody

type NewFieldNoteRequestBody struct {
	Key      *string `form:"key,omitempty" json:"key,omitempty" xml:"key,omitempty"`
	Title    *string `form:"title,omitempty" json:"title,omitempty" xml:"title,omitempty"`
	Body     *string `form:"body,omitempty" json:"body,omitempty" xml:"body,omitempty"`
	MediaIds []int64 `form:"mediaIds,omitempty" json:"mediaIds,omitempty" xml:"mediaIds,omitempty"`
}

NewFieldNoteRequestBody is used to define fields on request body types.

type NoteMediaResponseBody

type NoteMediaResponseBody struct {
	ID          int64  `form:"id" json:"id" xml:"id"`
	URL         string `form:"url" json:"url" xml:"url"`
	Key         string `form:"key" json:"key" xml:"key"`
	ContentType string `form:"contentType" json:"contentType" xml:"contentType"`
}

NoteMediaResponseBody is used to define fields on response body types.

type Server

type Server struct {
	Mounts        []*MountPoint
	Update        http.Handler
	Get           http.Handler
	DownloadMedia http.Handler
	UploadMedia   http.Handler
	DeleteMedia   http.Handler
	CORS          http.Handler
}

Server lists the notes service endpoint HTTP handlers.

func New

func New(
	e *notes.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 notes 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 UpdateBadRequestResponseBody

type UpdateBadRequestResponseBody 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"`
}

UpdateBadRequestResponseBody is the type of the "notes" service "update" endpoint HTTP response body for the "bad-request" error.

func NewUpdateBadRequestResponseBody

func NewUpdateBadRequestResponseBody(res *goa.ServiceError) *UpdateBadRequestResponseBody

NewUpdateBadRequestResponseBody builds the HTTP response body from the result of the "update" endpoint of the "notes" service.

type UpdateForbiddenResponseBody

type UpdateForbiddenResponseBody 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"`
}

UpdateForbiddenResponseBody is the type of the "notes" service "update" endpoint HTTP response body for the "forbidden" error.

func NewUpdateForbiddenResponseBody

func NewUpdateForbiddenResponseBody(res *goa.ServiceError) *UpdateForbiddenResponseBody

NewUpdateForbiddenResponseBody builds the HTTP response body from the result of the "update" endpoint of the "notes" service.

type UpdateNotFoundResponseBody

type UpdateNotFoundResponseBody 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"`
}

UpdateNotFoundResponseBody is the type of the "notes" service "update" endpoint HTTP response body for the "not-found" error.

func NewUpdateNotFoundResponseBody

func NewUpdateNotFoundResponseBody(res *goa.ServiceError) *UpdateNotFoundResponseBody

NewUpdateNotFoundResponseBody builds the HTTP response body from the result of the "update" endpoint of the "notes" service.

type UpdateRequestBody

type UpdateRequestBody struct {
	Notes *FieldNoteUpdateRequestBody `form:"notes,omitempty" json:"notes,omitempty" xml:"notes,omitempty"`
}

UpdateRequestBody is the type of the "notes" service "update" endpoint HTTP request body.

type UpdateResponseBody

type UpdateResponseBody struct {
	Notes   []*FieldNoteResponseBody      `form:"notes" json:"notes" xml:"notes"`
	Media   []*NoteMediaResponseBody      `form:"media" json:"media" xml:"media"`
	Station *FieldNoteStationResponseBody `form:"station" json:"station" xml:"station"`
}

UpdateResponseBody is the type of the "notes" service "update" endpoint HTTP response body.

func NewUpdateResponseBody

func NewUpdateResponseBody(res *notesviews.FieldNotesView) *UpdateResponseBody

NewUpdateResponseBody builds the HTTP response body from the result of the "update" endpoint of the "notes" service.

type UpdateUnauthorizedResponseBody

type UpdateUnauthorizedResponseBody 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"`
}

UpdateUnauthorizedResponseBody is the type of the "notes" service "update" endpoint HTTP response body for the "unauthorized" error.

func NewUpdateUnauthorizedResponseBody

func NewUpdateUnauthorizedResponseBody(res *goa.ServiceError) *UpdateUnauthorizedResponseBody

NewUpdateUnauthorizedResponseBody builds the HTTP response body from the result of the "update" endpoint of the "notes" service.

type UploadMediaBadRequestResponseBody

type UploadMediaBadRequestResponseBody 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"`
}

UploadMediaBadRequestResponseBody is the type of the "notes" service "upload media" endpoint HTTP response body for the "bad-request" error.

func NewUploadMediaBadRequestResponseBody

func NewUploadMediaBadRequestResponseBody(res *goa.ServiceError) *UploadMediaBadRequestResponseBody

NewUploadMediaBadRequestResponseBody builds the HTTP response body from the result of the "upload media" endpoint of the "notes" service.

type UploadMediaForbiddenResponseBody

type UploadMediaForbiddenResponseBody 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"`
}

UploadMediaForbiddenResponseBody is the type of the "notes" service "upload media" endpoint HTTP response body for the "forbidden" error.

func NewUploadMediaForbiddenResponseBody

func NewUploadMediaForbiddenResponseBody(res *goa.ServiceError) *UploadMediaForbiddenResponseBody

NewUploadMediaForbiddenResponseBody builds the HTTP response body from the result of the "upload media" endpoint of the "notes" service.

type UploadMediaNotFoundResponseBody

type UploadMediaNotFoundResponseBody 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"`
}

UploadMediaNotFoundResponseBody is the type of the "notes" service "upload media" endpoint HTTP response body for the "not-found" error.

func NewUploadMediaNotFoundResponseBody

func NewUploadMediaNotFoundResponseBody(res *goa.ServiceError) *UploadMediaNotFoundResponseBody

NewUploadMediaNotFoundResponseBody builds the HTTP response body from the result of the "upload media" endpoint of the "notes" service.

type UploadMediaResponseBody

type UploadMediaResponseBody struct {
	ID  int64  `form:"id" json:"id" xml:"id"`
	URL string `form:"url" json:"url" xml:"url"`
	Key string `form:"key" json:"key" xml:"key"`
}

UploadMediaResponseBody is the type of the "notes" service "upload media" endpoint HTTP response body.

func NewUploadMediaResponseBody

func NewUploadMediaResponseBody(res *notesviews.NoteMediaView) *UploadMediaResponseBody

NewUploadMediaResponseBody builds the HTTP response body from the result of the "upload media" endpoint of the "notes" service.

type UploadMediaUnauthorizedResponseBody

type UploadMediaUnauthorizedResponseBody 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"`
}

UploadMediaUnauthorizedResponseBody is the type of the "notes" service "upload media" endpoint HTTP response body for the "unauthorized" error.

func NewUploadMediaUnauthorizedResponseBody

func NewUploadMediaUnauthorizedResponseBody(res *goa.ServiceError) *UploadMediaUnauthorizedResponseBody

NewUploadMediaUnauthorizedResponseBody builds the HTTP response body from the result of the "upload media" endpoint of the "notes" service.

Jump to

Keyboard shortcuts

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