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 MakeAdminLoginEndpoint(s service.AuthenticationService) endpoint.Endpoint
- func MakeEnterpriseLoginEndpoint(s service.AuthenticationService) endpoint.Endpoint
- func MakeGetOpenidEndpoint(s service.AuthenticationService) endpoint.Endpoint
- func MakeLogoutEndpoint(s service.AuthenticationService) endpoint.Endpoint
- type AdminLoginRequest
- type AdminLoginResponse
- type Endpoints
- func (e Endpoints) AdminLogin(ctx context.Context, name string, password string) (status bool, errinfo string, data string)
- func (e Endpoints) EnterpriseLogin(ctx context.Context, name string, password string) (status bool, errinfo string, data string)
- func (e Endpoints) GetOpenid(ctx context.Context, code string) (status bool, errinfo string, data *service.UserRes)
- func (e Endpoints) Logout(ctx context.Context) (status bool, errinfo string, data string)
- type EnterpriseLoginRequest
- type EnterpriseLoginResponse
- type GetOpenidRequest
- type GetOpenidResponse
- type LogoutRequest
- type LogoutResponse
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 MakeAdminLoginEndpoint ¶
func MakeAdminLoginEndpoint(s service.AuthenticationService) endpoint.Endpoint
MakeAdminLoginEndpoint returns an endpoint that invokes AdminLogin on the service.
func MakeEnterpriseLoginEndpoint ¶
func MakeEnterpriseLoginEndpoint(s service.AuthenticationService) endpoint.Endpoint
MakeEnterpriseLoginEndpoint returns an endpoint that invokes EnterpriseLogin on the service.
func MakeGetOpenidEndpoint ¶
func MakeGetOpenidEndpoint(s service.AuthenticationService) endpoint.Endpoint
MakeGetOpenidEndpoint returns an endpoint that invokes GetOpenid on the service.
func MakeLogoutEndpoint ¶
func MakeLogoutEndpoint(s service.AuthenticationService) endpoint.Endpoint
MakeLogoutEndpoint returns an endpoint that invokes Logout on the service.
Types ¶
type AdminLoginRequest ¶
AdminLoginRequest collects the request parameters for the AdminLogin method.
type AdminLoginResponse ¶
type AdminLoginResponse struct { Status bool `json:"status"` Errinfo string `json:"errinfo"` Data string `json:"data"` }
AdminLoginResponse collects the response parameters for the AdminLogin method.
type Endpoints ¶
type Endpoints struct { GetOpenidEndpoint endpoint.Endpoint AdminLoginEndpoint endpoint.Endpoint EnterpriseLoginEndpoint endpoint.Endpoint LogoutEndpoint 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.AuthenticationService, 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) AdminLogin ¶
func (e Endpoints) AdminLogin(ctx context.Context, name string, password string) (status bool, errinfo string, data string)
AdminLogin implements Service. Primarily useful in a client.
func (Endpoints) EnterpriseLogin ¶
func (e Endpoints) EnterpriseLogin(ctx context.Context, name string, password string) (status bool, errinfo string, data string)
EnterpriseLogin implements Service. Primarily useful in a client.
type EnterpriseLoginRequest ¶
EnterpriseLoginRequest collects the request parameters for the EnterpriseLogin method.
type EnterpriseLoginResponse ¶
type EnterpriseLoginResponse struct { Status bool `json:"status"` Errinfo string `json:"errinfo"` Data string `json:"data"` }
EnterpriseLoginResponse collects the response parameters for the EnterpriseLogin method.
type GetOpenidRequest ¶
type GetOpenidRequest struct {
Code string `json:"code"`
}
GetOpenidRequest collects the request parameters for the GetOpenid method.
type GetOpenidResponse ¶
type GetOpenidResponse struct { Status bool `json:"status"` Errinfo string `json:"errinfo"` Data *service.UserRes `json:"data"` }
GetOpenidResponse collects the response parameters for the GetOpenid method.
type LogoutRequest ¶
type LogoutRequest struct{}
LogoutRequest collects the request parameters for the Logout method.
type LogoutResponse ¶
type LogoutResponse struct { Status bool `json:"status"` Errinfo string `json:"errinfo"` Data string `json:"data"` }
LogoutResponse collects the response parameters for the Logout method.