endpoint

package
v0.0.0-...-4aec9fb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 27, 2019 License: MIT Imports: 8 Imported by: 2

Documentation

Overview

THIS FILE IS AUTO GENERATED BY GK-CLI DO NOT EDIT!!

Index

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

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.

func (Endpoints) PostAuthInfo

func (e Endpoints) PostAuthInfo(ctx context.Context, id string, certifiedPic string) (status bool, errinfo string, data model.User)

PostAuthInfo implements Service. Primarily useful in a client.

func (Endpoints) PostCertifyState

func (e Endpoints) PostCertifyState(ctx context.Context, id string, pass bool) (status bool, errinfo string, data model.User)

PostCertifyState 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

type PostAuthInfoRequest struct {
	Id           string `json:"id"`
	CertifiedPic string `json:"certifiedPic"`
}

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

type PostCertifyStateRequest struct {
	Id   string `json:"id"`
	Pass bool   `json:"pass"`
}

PostCertifyStateRequest collects the request parameters for the PostCertifyState method.

type PostCertifyStateResponse

type PostCertifyStateResponse struct {
	Status  bool       `json:"status"`
	Errinfo string     `json:"errinfo"`
	Data    model.User `json:"data"`
}

PostCertifyStateResponse collects the response parameters for the PostCertifyState method.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL