Documentation ¶
Index ¶
- Constants
- Variables
- type Client
- func (c *Client) Create(ctx context.Context, path string, body []byte) ([]byte, error)
- func (c *Client) Delete(ctx context.Context, path, id string) error
- func (c *Client) Get(ctx context.Context, path, id string) ([]byte, error)
- func (c *Client) Update(ctx context.Context, path, id string, body []byte) ([]byte, error)
- type Error
- type ErrorReason
Constants ¶
View Source
const ( SpeakerPath = "/api/speakers" ProposalPath = "/api/proposals" )
Variables ¶
View Source
var ( ErrCreateRequest = ErrorReason{Reason: "InvalidRequest", Summary: "invalid request"} ErrMakeRequest = ErrorReason{Reason: "RequestFailed", Summary: "request failed"} ErrCreateSpeaker = ErrorReason{Reason: "CreateSpeakerFailed", Summary: "error creating speaker"} ErrUpdateSpeaker = ErrorReason{Reason: "UpdateSpeakerFailed", Summary: "error updating speaker"} ErrFetchSpeaker = ErrorReason{Reason: "FetchSpeakerFailed", Summary: "error fetching speaker"} ErrDeleteSpeaker = ErrorReason{Reason: "DeleteSpeakerFailed", Summary: "error deleting speaker"} ErrCreateProposal = ErrorReason{Reason: "CreateProposalFailed", Summary: "error creating proposal"} ErrUpdateProposal = ErrorReason{Reason: "UpdateProposalFailed", Summary: "error updating proposal"} ErrFetchProposal = ErrorReason{Reason: "FetchProposalFailed", Summary: "error fetching proposal"} ErrDeleteProposal = ErrorReason{Reason: "DeleteProposalFailed", Summary: "error deleting proposal"} ErrUnknown = ErrorReason{Reason: "Unknown", Summary: "unknown error"} )
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct { Reason ErrorReason Err error }
type ErrorReason ¶
func (ErrorReason) Error ¶
func (e ErrorReason) Error() string
Click to show internal directories.
Click to hide internal directories.