Documentation
¶
Index ¶
- func Authentication(next http.Handler) http.Handler
- func ProvideContext(r *http.Request) context.Context
- func ProvideForwardedHeader(req *http.Request) *url.URL
- type Address
- type ContactRequest
- type ContactResponse
- type ContactsService
- func (cs ContactsService) Create(ctx context.Context, contactRequest *ContactRequest) (*ContactResponse, error)
- func (cs ContactsService) DeleteBulk(ctx context.Context, ids []string) error
- func (cs ContactsService) GetBunch(ctx context.Context, ids []int64) (*ContactResponse, error)
- func (cs ContactsService) GetByDate(ctx context.Context, month, day, year string) (*ContactResponse, error)
- func (cs ContactsService) GetOne(ctx context.Context, id int) (*ContactResponse, error)
- func (cs ContactsService) Redirect(ctx context.Context, id string) (string, error)
- func (cs *ContactsService) Replace(ctx context.Context, id int, contactRequest ContactRequest) (*ContactResponse, error)
- func (cs ContactsService) Update(ctx context.Context, id int, contactRequest ContactRequest) (*ContactResponse, error)
- type DoodadsService
- type Name
- type PingRequest
- type PingResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ContactRequest ¶ added in v0.3.3
type ContactRequest struct { ID string `json:"id"` Name EMail string `json:"eMail" format:"email"` Address *Address `json:"address"` }
ContactRequest model
type ContactResponse ¶ added in v0.3.3
type ContactResponse struct { // id is the unique id of contact ID string `json:"id"` }
ContactResponse model
type ContactsService ¶
type ContactsService struct {
DataConnector *connectors.DataConnector
}
func InitContactsService ¶ added in v0.0.2
func InitContactsService() (*ContactsService, error)
InitContactsService wires up the Contacts Service.
func NewContactsService ¶ added in v0.0.7
func NewContactsService(dc *connectors.DataConnector) ContactsService
func (ContactsService) Create ¶
func (cs ContactsService) Create(ctx context.Context, contactRequest *ContactRequest) (*ContactResponse, error)
Create a new contact request entity.
func (ContactsService) DeleteBulk ¶ added in v0.1.5
func (cs ContactsService) DeleteBulk(ctx context.Context, ids []string) error
DeleteBulk contact by id
func (ContactsService) GetBunch ¶ added in v0.4.2
func (cs ContactsService) GetBunch(ctx context.Context, ids []int64) (*ContactResponse, error)
GetBunch of contacts by ids
@summary Get a list of contacts by ids @description Get a list of contacts by ids @tags contacts @produces application/json @parameters {"name":"ids", "description":"list of contact ids", "required":true} @responses.400 {models.ErrorResponse}
func (ContactsService) GetByDate ¶ added in v0.0.2
func (cs ContactsService) GetByDate(ctx context.Context, month, day, year string) (*ContactResponse, error)
Get contacts list by date
func (ContactsService) GetOne ¶
func (cs ContactsService) GetOne(ctx context.Context, id int) (*ContactResponse, error)
GetOne contact by id id contact id
func (*ContactsService) Replace ¶ added in v0.0.2
func (cs *ContactsService) Replace(ctx context.Context, id int, contactRequest ContactRequest) (*ContactResponse, error)
Replace a contact entity completely.
func (ContactsService) Update ¶
func (cs ContactsService) Update(ctx context.Context, id int, contactRequest ContactRequest) (*ContactResponse, error)
Update a contact entity with provided data.
type DoodadsService ¶ added in v0.1.6
type DoodadsService struct {
// contains filtered or unexported fields
}
func NewDoodadsService ¶ added in v0.1.6
func NewDoodadsService(env *connectors.Env) (*DoodadsService, error)
func (DoodadsService) Create ¶ added in v0.1.6
func (cs DoodadsService) Create(ctx context.Context, url *url.URL, wr *http.Request, thing *models.ThingRequest) (*models.ThingResponse, error)
Create a new doodad entity.
type PingRequest ¶ added in v0.0.7
type PingRequest struct {
Input string `json:"input"`
}
PingRequest model
type PingResponse ¶ added in v0.0.7
type PingResponse struct {
Output string `json:"output"`
}
PingResponse model
func Ping ¶ added in v0.0.7
func Ping(ctx context.Context, env *connectors.Env, pingRequest PingRequest) (PingResponse, error)
Ping returns body with 'i's replaced with 'o's