Documentation ¶
Overview ¶
THIS FILE IS AUTO GENERATED BY GK-CLI DO NOT EDIT!!
Index ¶
- func InstrumentingMiddleware(duration metrics.Histogram) endpoint.Middleware
- func LoggingMiddleware(logger log.Logger) endpoint.Middleware
- func MakeGetAllUnCertifyEndpoint(s service.CertifyService) endpoint.Endpoint
- func MakeGetAuthInfoEndpoint(s service.CertifyService) endpoint.Endpoint
- func MakeGetUnCertifyInfoEndpoint(s service.CertifyService) endpoint.Endpoint
- func MakePostAuthInfoEndpoint(s service.CertifyService) endpoint.Endpoint
- func MakePostCertifyStateEndpoint(s service.CertifyService) endpoint.Endpoint
- type Endpoints
- func (e Endpoints) GetAllUnCertify(ctx context.Context) (status bool, errinfo string, data []model.User)
- func (e Endpoints) GetAuthInfo(ctx context.Context, id string) (status bool, errinfo string, data model.User)
- func (e Endpoints) GetUnCertifyInfo(ctx context.Context, id string) (status bool, errinfo string, data model.User)
- func (e Endpoints) PostAuthInfo(ctx context.Context, id string, certifiedPic string) (status bool, errinfo string, data model.User)
- func (e Endpoints) PostCertifyState(ctx context.Context, id string, pass bool) (status bool, errinfo string, data model.User)
- type GetAllUnCertifyRequest
- type GetAllUnCertifyResponse
- type GetAuthInfoRequest
- type GetAuthInfoResponse
- type GetUnCertifyInfoRequest
- type GetUnCertifyInfoResponse
- type PostAuthInfoRequest
- type PostAuthInfoResponse
- type PostCertifyStateRequest
- type PostCertifyStateResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InstrumentingMiddleware ¶
func InstrumentingMiddleware(duration metrics.Histogram) endpoint.Middleware
InstrumentingMiddleware returns an endpoint middleware that records the duration of each invocation to the passed histogram. The middleware adds a single field: "success", which is "true" if no error is returned, and "false" otherwise.
func LoggingMiddleware ¶
func LoggingMiddleware(logger log.Logger) endpoint.Middleware
LoggingMiddleware returns an endpoint middleware that logs the duration of each invocation, and the resulting error, if any.
func MakeGetAllUnCertifyEndpoint ¶
func MakeGetAllUnCertifyEndpoint(s service.CertifyService) endpoint.Endpoint
MakeGetAllUnCertifyEndpoint returns an endpoint that invokes GetAllUnCertify on the service.
func MakeGetAuthInfoEndpoint ¶
func MakeGetAuthInfoEndpoint(s service.CertifyService) endpoint.Endpoint
MakeGetAuthInfoEndpoint returns an endpoint that invokes GetAuthInfo on the service.
func MakeGetUnCertifyInfoEndpoint ¶
func MakeGetUnCertifyInfoEndpoint(s service.CertifyService) endpoint.Endpoint
MakeGetUnCertifyInfoEndpoint returns an endpoint that invokes GetUnCertifyInfo on the service.
func MakePostAuthInfoEndpoint ¶
func MakePostAuthInfoEndpoint(s service.CertifyService) endpoint.Endpoint
MakePostAuthInfoEndpoint returns an endpoint that invokes PostAuthInfo on the service.
func MakePostCertifyStateEndpoint ¶
func MakePostCertifyStateEndpoint(s service.CertifyService) endpoint.Endpoint
MakePostCertifyStateEndpoint returns an endpoint that invokes PostCertifyState on the service.
Types ¶
type Endpoints ¶
type Endpoints struct { GetAuthInfoEndpoint endpoint.Endpoint PostAuthInfoEndpoint endpoint.Endpoint GetAllUnCertifyEndpoint endpoint.Endpoint GetUnCertifyInfoEndpoint endpoint.Endpoint PostCertifyStateEndpoint endpoint.Endpoint }
Endpoints collects all of the endpoints that compose a profile service. It's meant to be used as a helper struct, to collect all of the endpoints into a single parameter.
func New ¶
func New(s service.CertifyService, mdw map[string][]endpoint.Middleware) Endpoints
New returns a Endpoints struct that wraps the provided service, and wires in all of the expected endpoint middlewares
func (Endpoints) GetAllUnCertify ¶
func (e Endpoints) GetAllUnCertify(ctx context.Context) (status bool, errinfo string, data []model.User)
GetAllUnCertify implements Service. Primarily useful in a client.
func (Endpoints) GetAuthInfo ¶
func (e Endpoints) GetAuthInfo(ctx context.Context, id string) (status bool, errinfo string, data model.User)
GetAuthInfo implements Service. Primarily useful in a client.
func (Endpoints) GetUnCertifyInfo ¶
func (e Endpoints) GetUnCertifyInfo(ctx context.Context, id string) (status bool, errinfo string, data model.User)
GetUnCertifyInfo implements Service. Primarily useful in a client.
type GetAllUnCertifyRequest ¶
type GetAllUnCertifyRequest struct{}
GetAllUnCertifyRequest collects the request parameters for the GetAllUnCertify method.
type GetAllUnCertifyResponse ¶
type GetAllUnCertifyResponse struct { Status bool `json:"status"` Errinfo string `json:"errinfo"` Data []model.User `json:"data"` }
GetAllUnCertifyResponse collects the response parameters for the GetAllUnCertify method.
type GetAuthInfoRequest ¶
type GetAuthInfoRequest struct {
Id string `json:"id"`
}
GetAuthInfoRequest collects the request parameters for the GetAuthInfo method.
type GetAuthInfoResponse ¶
type GetAuthInfoResponse struct { Status bool `json:"status"` Errinfo string `json:"errinfo"` Data model.User `json:"data"` }
GetAuthInfoResponse collects the response parameters for the GetAuthInfo method.
type GetUnCertifyInfoRequest ¶
type GetUnCertifyInfoRequest struct {
Id string `json:"id"`
}
GetUnCertifyInfoRequest collects the request parameters for the GetUnCertifyInfo method.
type GetUnCertifyInfoResponse ¶
type GetUnCertifyInfoResponse struct { Status bool `json:"status"` Errinfo string `json:"errinfo"` Data model.User `json:"data"` }
GetUnCertifyInfoResponse collects the response parameters for the GetUnCertifyInfo method.
type PostAuthInfoRequest ¶
PostAuthInfoRequest collects the request parameters for the PostAuthInfo method.
type PostAuthInfoResponse ¶
type PostAuthInfoResponse struct { Status bool `json:"status"` Errinfo string `json:"errinfo"` Data model.User `json:"data"` }
PostAuthInfoResponse collects the response parameters for the PostAuthInfo method.
type PostCertifyStateRequest ¶
PostCertifyStateRequest collects the request parameters for the PostCertifyState method.