Documentation ¶
Index ¶
- func MakeEndpointOfCreateUser(s Service) endpoint.Endpoint
- func NewCodecs() *httpcodec.DefaultCodecs
- func NewHTTPRouter(svc Service, codecs httpcodec.Codecs, opts ...httpoption.Option) chi.Router
- func OASv2APIDoc(schema oas2.Schema) string
- func ValidateCreateUserRequest(newSchema func(*CreateUserRequest) validating.Schema) httpoption.Validator
- type CreateUserRequest
- type CreateUserResponse
- type HTTPClient
- type IPCodec
- type Service
- type User
- type UserService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeEndpointOfCreateUser ¶
MakeEndpointOfCreateUser creates the endpoint for s.CreateUser.
func NewCodecs ¶
func NewCodecs() *httpcodec.DefaultCodecs
func NewHTTPRouter ¶
func OASv2APIDoc ¶
func ValidateCreateUserRequest ¶
func ValidateCreateUserRequest(newSchema func(*CreateUserRequest) validating.Schema) httpoption.Validator
ValidateCreateUserRequest creates a validator for CreateUserRequest.
Types ¶
type CreateUserRequest ¶
type CreateUserRequest struct {
User User `json:"-"`
}
type CreateUserResponse ¶
func (*CreateUserResponse) Body ¶
func (r *CreateUserResponse) Body() interface{}
func (*CreateUserResponse) Failed ¶
func (r *CreateUserResponse) Failed() error
Failed implements endpoint.Failer.
type HTTPClient ¶
type HTTPClient struct {
// contains filtered or unexported fields
}
func NewHTTPClient ¶
func (*HTTPClient) CreateUser ¶
type IPCodec ¶
type IPCodec struct{}
IPCodec is used to encode and decode an IP. It can be reused wherever needed.
Click to show internal directories.
Click to hide internal directories.