Documentation ¶
Overview ¶
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterAuthHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterAuthHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AuthClient) error
- func RegisterAuthHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterAuthServer(s *grpc.Server, srv AuthServer)
- func RegisterHealthServer(s *grpc.Server, srv HealthServer)
- func RegisterMetricHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterMetricHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MetricClient) error
- func RegisterMetricHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterMetricServer(s *grpc.Server, srv MetricServer)
- type AuthClient
- type AuthServer
- type CreateUserRequest
- func (*CreateUserRequest) Descriptor() ([]byte, []int)
- func (m *CreateUserRequest) GetApi() string
- func (m *CreateUserRequest) GetEmail() string
- func (m *CreateUserRequest) GetPassword() string
- func (m *CreateUserRequest) GetUsername() string
- func (*CreateUserRequest) ProtoMessage()
- func (m *CreateUserRequest) Reset()
- func (m *CreateUserRequest) String() string
- func (m *CreateUserRequest) XXX_DiscardUnknown()
- func (m *CreateUserRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CreateUserRequest) XXX_Merge(src proto.Message)
- func (m *CreateUserRequest) XXX_Size() int
- func (m *CreateUserRequest) XXX_Unmarshal(b []byte) error
- type CreateUserResponse
- func (*CreateUserResponse) Descriptor() ([]byte, []int)
- func (m *CreateUserResponse) GetApi() string
- func (m *CreateUserResponse) GetErrorCode() CreateUserResponse_ErrorCode
- func (m *CreateUserResponse) GetSuccess() bool
- func (*CreateUserResponse) ProtoMessage()
- func (m *CreateUserResponse) Reset()
- func (m *CreateUserResponse) String() string
- func (m *CreateUserResponse) XXX_DiscardUnknown()
- func (m *CreateUserResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CreateUserResponse) XXX_Merge(src proto.Message)
- func (m *CreateUserResponse) XXX_Size() int
- func (m *CreateUserResponse) XXX_Unmarshal(b []byte) error
- type CreateUserResponse_ErrorCode
- type HealthCheckRequest
- func (*HealthCheckRequest) Descriptor() ([]byte, []int)
- func (m *HealthCheckRequest) GetService() string
- func (*HealthCheckRequest) ProtoMessage()
- func (m *HealthCheckRequest) Reset()
- func (m *HealthCheckRequest) String() string
- func (m *HealthCheckRequest) XXX_DiscardUnknown()
- func (m *HealthCheckRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *HealthCheckRequest) XXX_Merge(src proto.Message)
- func (m *HealthCheckRequest) XXX_Size() int
- func (m *HealthCheckRequest) XXX_Unmarshal(b []byte) error
- type HealthCheckResponse
- func (*HealthCheckResponse) Descriptor() ([]byte, []int)
- func (m *HealthCheckResponse) GetStatus() HealthCheckResponse_ServingStatus
- func (*HealthCheckResponse) ProtoMessage()
- func (m *HealthCheckResponse) Reset()
- func (m *HealthCheckResponse) String() string
- func (m *HealthCheckResponse) XXX_DiscardUnknown()
- func (m *HealthCheckResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *HealthCheckResponse) XXX_Merge(src proto.Message)
- func (m *HealthCheckResponse) XXX_Size() int
- func (m *HealthCheckResponse) XXX_Unmarshal(b []byte) error
- type HealthCheckResponse_ServingStatus
- type HealthClient
- type HealthServer
- type Health_WatchClient
- type Health_WatchServer
- type LoginRequest
- func (*LoginRequest) Descriptor() ([]byte, []int)
- func (m *LoginRequest) GetApi() string
- func (m *LoginRequest) GetPassword() string
- func (m *LoginRequest) GetUsername() string
- func (*LoginRequest) ProtoMessage()
- func (m *LoginRequest) Reset()
- func (m *LoginRequest) String() string
- func (m *LoginRequest) XXX_DiscardUnknown()
- func (m *LoginRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LoginRequest) XXX_Merge(src proto.Message)
- func (m *LoginRequest) XXX_Size() int
- func (m *LoginRequest) XXX_Unmarshal(b []byte) error
- type LoginResponse
- func (*LoginResponse) Descriptor() ([]byte, []int)
- func (m *LoginResponse) GetApi() string
- func (m *LoginResponse) GetErrorCode() LoginResponse_ErrorCode
- func (m *LoginResponse) GetSuccess() bool
- func (m *LoginResponse) GetToken() string
- func (*LoginResponse) ProtoMessage()
- func (m *LoginResponse) Reset()
- func (m *LoginResponse) String() string
- func (m *LoginResponse) XXX_DiscardUnknown()
- func (m *LoginResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LoginResponse) XXX_Merge(src proto.Message)
- func (m *LoginResponse) XXX_Size() int
- func (m *LoginResponse) XXX_Unmarshal(b []byte) error
- type LoginResponse_ErrorCode
- type MetricClient
- type MetricServer
- type MetricsRequest
- func (*MetricsRequest) Descriptor() ([]byte, []int)
- func (m *MetricsRequest) GetApi() string
- func (*MetricsRequest) ProtoMessage()
- func (m *MetricsRequest) Reset()
- func (m *MetricsRequest) String() string
- func (m *MetricsRequest) XXX_DiscardUnknown()
- func (m *MetricsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MetricsRequest) XXX_Merge(src proto.Message)
- func (m *MetricsRequest) XXX_Size() int
- func (m *MetricsRequest) XXX_Unmarshal(b []byte) error
- type MetricsResponse
- func (*MetricsResponse) Descriptor() ([]byte, []int)
- func (m *MetricsResponse) GetErrorCode() MetricsResponse_ErrorCode
- func (m *MetricsResponse) GetMetrics() []*MetricsResponse_Metric
- func (*MetricsResponse) ProtoMessage()
- func (m *MetricsResponse) Reset()
- func (m *MetricsResponse) String() string
- func (m *MetricsResponse) XXX_DiscardUnknown()
- func (m *MetricsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MetricsResponse) XXX_Merge(src proto.Message)
- func (m *MetricsResponse) XXX_Size() int
- func (m *MetricsResponse) XXX_Unmarshal(b []byte) error
- type MetricsResponse_ErrorCode
- type MetricsResponse_Metric
- func (*MetricsResponse_Metric) Descriptor() ([]byte, []int)
- func (m *MetricsResponse_Metric) GetName() string
- func (m *MetricsResponse_Metric) GetType() string
- func (m *MetricsResponse_Metric) GetValue() string
- func (*MetricsResponse_Metric) ProtoMessage()
- func (m *MetricsResponse_Metric) Reset()
- func (m *MetricsResponse_Metric) String() string
- func (m *MetricsResponse_Metric) XXX_DiscardUnknown()
- func (m *MetricsResponse_Metric) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MetricsResponse_Metric) XXX_Merge(src proto.Message)
- func (m *MetricsResponse_Metric) XXX_Size() int
- func (m *MetricsResponse_Metric) XXX_Unmarshal(b []byte) error
- type SetUserValidationRequest
- func (*SetUserValidationRequest) Descriptor() ([]byte, []int)
- func (m *SetUserValidationRequest) GetApi() string
- func (m *SetUserValidationRequest) GetIsValidated() bool
- func (m *SetUserValidationRequest) GetUsername() string
- func (*SetUserValidationRequest) ProtoMessage()
- func (m *SetUserValidationRequest) Reset()
- func (m *SetUserValidationRequest) String() string
- func (m *SetUserValidationRequest) XXX_DiscardUnknown()
- func (m *SetUserValidationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SetUserValidationRequest) XXX_Merge(src proto.Message)
- func (m *SetUserValidationRequest) XXX_Size() int
- func (m *SetUserValidationRequest) XXX_Unmarshal(b []byte) error
- type SetUserValidationResponse
- func (*SetUserValidationResponse) Descriptor() ([]byte, []int)
- func (m *SetUserValidationResponse) GetApi() string
- func (m *SetUserValidationResponse) GetErrorCode() SetUserValidationResponse_ErrorCode
- func (m *SetUserValidationResponse) GetSuccess() bool
- func (*SetUserValidationResponse) ProtoMessage()
- func (m *SetUserValidationResponse) Reset()
- func (m *SetUserValidationResponse) String() string
- func (m *SetUserValidationResponse) XXX_DiscardUnknown()
- func (m *SetUserValidationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SetUserValidationResponse) XXX_Merge(src proto.Message)
- func (m *SetUserValidationResponse) XXX_Size() int
- func (m *SetUserValidationResponse) XXX_Unmarshal(b []byte) error
- type SetUserValidationResponse_ErrorCode
- type UnimplementedAuthServer
- type UnimplementedHealthServer
- type UnimplementedMetricServer
Constants ¶
This section is empty.
Variables ¶
var CreateUserResponse_ErrorCode_name = map[int32]string{
0: "BAD_REQUEST",
1: "INTERNAL_ERROR",
2: "INVALID_EMAIL",
3: "INVALID_USERNAME",
4: "USERNAME_TAKEN",
5: "EMAIL_IN_USE",
6: "BLANK_USERNAME",
7: "BLANK_PASSWORD",
}
var CreateUserResponse_ErrorCode_value = map[string]int32{
"BAD_REQUEST": 0,
"INTERNAL_ERROR": 1,
"INVALID_EMAIL": 2,
"INVALID_USERNAME": 3,
"USERNAME_TAKEN": 4,
"EMAIL_IN_USE": 5,
"BLANK_USERNAME": 6,
"BLANK_PASSWORD": 7,
}
var HealthCheckResponse_ServingStatus_name = map[int32]string{
0: "UNKNOWN",
1: "SERVING",
2: "NOT_SERVING",
}
var HealthCheckResponse_ServingStatus_value = map[string]int32{
"UNKNOWN": 0,
"SERVING": 1,
"NOT_SERVING": 2,
}
var LoginResponse_ErrorCode_name = map[int32]string{
0: "BAD_REQUEST",
1: "INTERNAL_ERROR",
2: "INCORRECT_USERNAME_OR_PASSWORD",
3: "BLANK_USERNAME",
4: "BLANK_PASSWORD",
}
var LoginResponse_ErrorCode_value = map[string]int32{
"BAD_REQUEST": 0,
"INTERNAL_ERROR": 1,
"INCORRECT_USERNAME_OR_PASSWORD": 2,
"BLANK_USERNAME": 3,
"BLANK_PASSWORD": 4,
}
var MetricsResponse_ErrorCode_name = map[int32]string{
0: "INTERNAL_ERROR",
1: "ENCODING_ERROR",
}
var MetricsResponse_ErrorCode_value = map[string]int32{
"INTERNAL_ERROR": 0,
"ENCODING_ERROR": 1,
}
var SetUserValidationResponse_ErrorCode_name = map[int32]string{
0: "BAD_REQUEST",
1: "INTERNAL_ERROR",
2: "USER_DOES_NOT_EXIST",
3: "USER_ALREADY_VALIDATED",
}
var SetUserValidationResponse_ErrorCode_value = map[string]int32{
"BAD_REQUEST": 0,
"INTERNAL_ERROR": 1,
"USER_DOES_NOT_EXIST": 2,
"USER_ALREADY_VALIDATED": 3,
}
Functions ¶
func RegisterAuthHandler ¶
RegisterAuthHandler registers the http handlers for service Auth to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterAuthHandlerClient ¶
RegisterAuthHandlerClient registers the http handlers for service Auth to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AuthClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AuthClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "AuthClient" to call the correct interceptors.
func RegisterAuthHandlerFromEndpoint ¶
func RegisterAuthHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterAuthHandlerFromEndpoint is same as RegisterAuthHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterAuthServer ¶
func RegisterAuthServer(s *grpc.Server, srv AuthServer)
func RegisterHealthServer ¶
func RegisterHealthServer(s *grpc.Server, srv HealthServer)
func RegisterMetricHandler ¶
RegisterMetricHandler registers the http handlers for service Metric to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterMetricHandlerClient ¶
func RegisterMetricHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MetricClient) error
RegisterMetricHandlerClient registers the http handlers for service Metric to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MetricClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MetricClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "MetricClient" to call the correct interceptors.
func RegisterMetricHandlerFromEndpoint ¶
func RegisterMetricHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterMetricHandlerFromEndpoint is same as RegisterMetricHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterMetricServer ¶
func RegisterMetricServer(s *grpc.Server, srv MetricServer)
Types ¶
type AuthClient ¶
type AuthClient interface { CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*CreateUserResponse, error) Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error) }
AuthClient is the client API for Auth service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewAuthClient ¶
func NewAuthClient(cc *grpc.ClientConn) AuthClient
type AuthServer ¶
type AuthServer interface { CreateUser(context.Context, *CreateUserRequest) (*CreateUserResponse, error) Login(context.Context, *LoginRequest) (*LoginResponse, error) }
AuthServer is the server API for Auth service.
type CreateUserRequest ¶
type CreateUserRequest struct { Api string `protobuf:"bytes,1,opt,name=api,proto3" json:"api,omitempty"` Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"` Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*CreateUserRequest) Descriptor ¶
func (*CreateUserRequest) Descriptor() ([]byte, []int)
func (*CreateUserRequest) GetApi ¶
func (m *CreateUserRequest) GetApi() string
func (*CreateUserRequest) GetEmail ¶
func (m *CreateUserRequest) GetEmail() string
func (*CreateUserRequest) GetPassword ¶
func (m *CreateUserRequest) GetPassword() string
func (*CreateUserRequest) GetUsername ¶
func (m *CreateUserRequest) GetUsername() string
func (*CreateUserRequest) ProtoMessage ¶
func (*CreateUserRequest) ProtoMessage()
func (*CreateUserRequest) Reset ¶
func (m *CreateUserRequest) Reset()
func (*CreateUserRequest) String ¶
func (m *CreateUserRequest) String() string
func (*CreateUserRequest) XXX_DiscardUnknown ¶
func (m *CreateUserRequest) XXX_DiscardUnknown()
func (*CreateUserRequest) XXX_Marshal ¶
func (m *CreateUserRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CreateUserRequest) XXX_Merge ¶
func (m *CreateUserRequest) XXX_Merge(src proto.Message)
func (*CreateUserRequest) XXX_Size ¶
func (m *CreateUserRequest) XXX_Size() int
func (*CreateUserRequest) XXX_Unmarshal ¶
func (m *CreateUserRequest) XXX_Unmarshal(b []byte) error
type CreateUserResponse ¶
type CreateUserResponse struct { Api string `protobuf:"bytes,1,opt,name=api,proto3" json:"api,omitempty"` Success bool `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"` ErrorCode CreateUserResponse_ErrorCode `` /* 131-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*CreateUserResponse) Descriptor ¶
func (*CreateUserResponse) Descriptor() ([]byte, []int)
func (*CreateUserResponse) GetApi ¶
func (m *CreateUserResponse) GetApi() string
func (*CreateUserResponse) GetErrorCode ¶
func (m *CreateUserResponse) GetErrorCode() CreateUserResponse_ErrorCode
func (*CreateUserResponse) GetSuccess ¶
func (m *CreateUserResponse) GetSuccess() bool
func (*CreateUserResponse) ProtoMessage ¶
func (*CreateUserResponse) ProtoMessage()
func (*CreateUserResponse) Reset ¶
func (m *CreateUserResponse) Reset()
func (*CreateUserResponse) String ¶
func (m *CreateUserResponse) String() string
func (*CreateUserResponse) XXX_DiscardUnknown ¶
func (m *CreateUserResponse) XXX_DiscardUnknown()
func (*CreateUserResponse) XXX_Marshal ¶
func (m *CreateUserResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CreateUserResponse) XXX_Merge ¶
func (m *CreateUserResponse) XXX_Merge(src proto.Message)
func (*CreateUserResponse) XXX_Size ¶
func (m *CreateUserResponse) XXX_Size() int
func (*CreateUserResponse) XXX_Unmarshal ¶
func (m *CreateUserResponse) XXX_Unmarshal(b []byte) error
type CreateUserResponse_ErrorCode ¶
type CreateUserResponse_ErrorCode int32
const ( CreateUserResponse_BAD_REQUEST CreateUserResponse_ErrorCode = 0 CreateUserResponse_INTERNAL_ERROR CreateUserResponse_ErrorCode = 1 CreateUserResponse_INVALID_EMAIL CreateUserResponse_ErrorCode = 2 CreateUserResponse_INVALID_USERNAME CreateUserResponse_ErrorCode = 3 CreateUserResponse_USERNAME_TAKEN CreateUserResponse_ErrorCode = 4 CreateUserResponse_EMAIL_IN_USE CreateUserResponse_ErrorCode = 5 CreateUserResponse_BLANK_USERNAME CreateUserResponse_ErrorCode = 6 CreateUserResponse_BLANK_PASSWORD CreateUserResponse_ErrorCode = 7 )
func (CreateUserResponse_ErrorCode) EnumDescriptor ¶
func (CreateUserResponse_ErrorCode) EnumDescriptor() ([]byte, []int)
func (CreateUserResponse_ErrorCode) String ¶
func (x CreateUserResponse_ErrorCode) String() string
type HealthCheckRequest ¶
type HealthCheckRequest struct { Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*HealthCheckRequest) Descriptor ¶
func (*HealthCheckRequest) Descriptor() ([]byte, []int)
func (*HealthCheckRequest) GetService ¶
func (m *HealthCheckRequest) GetService() string
func (*HealthCheckRequest) ProtoMessage ¶
func (*HealthCheckRequest) ProtoMessage()
func (*HealthCheckRequest) Reset ¶
func (m *HealthCheckRequest) Reset()
func (*HealthCheckRequest) String ¶
func (m *HealthCheckRequest) String() string
func (*HealthCheckRequest) XXX_DiscardUnknown ¶
func (m *HealthCheckRequest) XXX_DiscardUnknown()
func (*HealthCheckRequest) XXX_Marshal ¶
func (m *HealthCheckRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*HealthCheckRequest) XXX_Merge ¶
func (m *HealthCheckRequest) XXX_Merge(src proto.Message)
func (*HealthCheckRequest) XXX_Size ¶
func (m *HealthCheckRequest) XXX_Size() int
func (*HealthCheckRequest) XXX_Unmarshal ¶
func (m *HealthCheckRequest) XXX_Unmarshal(b []byte) error
type HealthCheckResponse ¶
type HealthCheckResponse struct { Status HealthCheckResponse_ServingStatus `protobuf:"varint,1,opt,name=status,proto3,enum=grpc.health.v1.HealthCheckResponse_ServingStatus" json:"status,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*HealthCheckResponse) Descriptor ¶
func (*HealthCheckResponse) Descriptor() ([]byte, []int)
func (*HealthCheckResponse) GetStatus ¶
func (m *HealthCheckResponse) GetStatus() HealthCheckResponse_ServingStatus
func (*HealthCheckResponse) ProtoMessage ¶
func (*HealthCheckResponse) ProtoMessage()
func (*HealthCheckResponse) Reset ¶
func (m *HealthCheckResponse) Reset()
func (*HealthCheckResponse) String ¶
func (m *HealthCheckResponse) String() string
func (*HealthCheckResponse) XXX_DiscardUnknown ¶
func (m *HealthCheckResponse) XXX_DiscardUnknown()
func (*HealthCheckResponse) XXX_Marshal ¶
func (m *HealthCheckResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*HealthCheckResponse) XXX_Merge ¶
func (m *HealthCheckResponse) XXX_Merge(src proto.Message)
func (*HealthCheckResponse) XXX_Size ¶
func (m *HealthCheckResponse) XXX_Size() int
func (*HealthCheckResponse) XXX_Unmarshal ¶
func (m *HealthCheckResponse) XXX_Unmarshal(b []byte) error
type HealthCheckResponse_ServingStatus ¶
type HealthCheckResponse_ServingStatus int32
const ( HealthCheckResponse_UNKNOWN HealthCheckResponse_ServingStatus = 0 HealthCheckResponse_SERVING HealthCheckResponse_ServingStatus = 1 HealthCheckResponse_NOT_SERVING HealthCheckResponse_ServingStatus = 2 )
func (HealthCheckResponse_ServingStatus) EnumDescriptor ¶
func (HealthCheckResponse_ServingStatus) EnumDescriptor() ([]byte, []int)
func (HealthCheckResponse_ServingStatus) String ¶
func (x HealthCheckResponse_ServingStatus) String() string
type HealthClient ¶
type HealthClient interface { Check(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (*HealthCheckResponse, error) Watch(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (Health_WatchClient, error) }
HealthClient is the client API for Health service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewHealthClient ¶
func NewHealthClient(cc *grpc.ClientConn) HealthClient
type HealthServer ¶
type HealthServer interface { Check(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error) Watch(*HealthCheckRequest, Health_WatchServer) error }
HealthServer is the server API for Health service.
type Health_WatchClient ¶
type Health_WatchClient interface { Recv() (*HealthCheckResponse, error) grpc.ClientStream }
type Health_WatchServer ¶
type Health_WatchServer interface { Send(*HealthCheckResponse) error grpc.ServerStream }
type LoginRequest ¶
type LoginRequest struct { Api string `protobuf:"bytes,1,opt,name=api,proto3" json:"api,omitempty"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*LoginRequest) Descriptor ¶
func (*LoginRequest) Descriptor() ([]byte, []int)
func (*LoginRequest) GetApi ¶
func (m *LoginRequest) GetApi() string
func (*LoginRequest) GetPassword ¶
func (m *LoginRequest) GetPassword() string
func (*LoginRequest) GetUsername ¶
func (m *LoginRequest) GetUsername() string
func (*LoginRequest) ProtoMessage ¶
func (*LoginRequest) ProtoMessage()
func (*LoginRequest) Reset ¶
func (m *LoginRequest) Reset()
func (*LoginRequest) String ¶
func (m *LoginRequest) String() string
func (*LoginRequest) XXX_DiscardUnknown ¶
func (m *LoginRequest) XXX_DiscardUnknown()
func (*LoginRequest) XXX_Marshal ¶
func (m *LoginRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LoginRequest) XXX_Merge ¶
func (m *LoginRequest) XXX_Merge(src proto.Message)
func (*LoginRequest) XXX_Size ¶
func (m *LoginRequest) XXX_Size() int
func (*LoginRequest) XXX_Unmarshal ¶
func (m *LoginRequest) XXX_Unmarshal(b []byte) error
type LoginResponse ¶
type LoginResponse struct { Api string `protobuf:"bytes,1,opt,name=api,proto3" json:"api,omitempty"` Success bool `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"` Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` ErrorCode LoginResponse_ErrorCode `` /* 126-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*LoginResponse) Descriptor ¶
func (*LoginResponse) Descriptor() ([]byte, []int)
func (*LoginResponse) GetApi ¶
func (m *LoginResponse) GetApi() string
func (*LoginResponse) GetErrorCode ¶
func (m *LoginResponse) GetErrorCode() LoginResponse_ErrorCode
func (*LoginResponse) GetSuccess ¶
func (m *LoginResponse) GetSuccess() bool
func (*LoginResponse) GetToken ¶
func (m *LoginResponse) GetToken() string
func (*LoginResponse) ProtoMessage ¶
func (*LoginResponse) ProtoMessage()
func (*LoginResponse) Reset ¶
func (m *LoginResponse) Reset()
func (*LoginResponse) String ¶
func (m *LoginResponse) String() string
func (*LoginResponse) XXX_DiscardUnknown ¶
func (m *LoginResponse) XXX_DiscardUnknown()
func (*LoginResponse) XXX_Marshal ¶
func (m *LoginResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LoginResponse) XXX_Merge ¶
func (m *LoginResponse) XXX_Merge(src proto.Message)
func (*LoginResponse) XXX_Size ¶
func (m *LoginResponse) XXX_Size() int
func (*LoginResponse) XXX_Unmarshal ¶
func (m *LoginResponse) XXX_Unmarshal(b []byte) error
type LoginResponse_ErrorCode ¶
type LoginResponse_ErrorCode int32
const ( LoginResponse_BAD_REQUEST LoginResponse_ErrorCode = 0 LoginResponse_INTERNAL_ERROR LoginResponse_ErrorCode = 1 LoginResponse_INCORRECT_USERNAME_OR_PASSWORD LoginResponse_ErrorCode = 2 LoginResponse_BLANK_USERNAME LoginResponse_ErrorCode = 3 LoginResponse_BLANK_PASSWORD LoginResponse_ErrorCode = 4 )
func (LoginResponse_ErrorCode) EnumDescriptor ¶
func (LoginResponse_ErrorCode) EnumDescriptor() ([]byte, []int)
func (LoginResponse_ErrorCode) String ¶
func (x LoginResponse_ErrorCode) String() string
type MetricClient ¶
type MetricClient interface {
GetMetrics(ctx context.Context, in *MetricsRequest, opts ...grpc.CallOption) (*MetricsResponse, error)
}
MetricClient is the client API for Metric service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewMetricClient ¶
func NewMetricClient(cc *grpc.ClientConn) MetricClient
type MetricServer ¶
type MetricServer interface {
GetMetrics(context.Context, *MetricsRequest) (*MetricsResponse, error)
}
MetricServer is the server API for Metric service.
type MetricsRequest ¶
type MetricsRequest struct { Api string `protobuf:"bytes,1,opt,name=api,proto3" json:"api,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*MetricsRequest) Descriptor ¶
func (*MetricsRequest) Descriptor() ([]byte, []int)
func (*MetricsRequest) GetApi ¶
func (m *MetricsRequest) GetApi() string
func (*MetricsRequest) ProtoMessage ¶
func (*MetricsRequest) ProtoMessage()
func (*MetricsRequest) Reset ¶
func (m *MetricsRequest) Reset()
func (*MetricsRequest) String ¶
func (m *MetricsRequest) String() string
func (*MetricsRequest) XXX_DiscardUnknown ¶
func (m *MetricsRequest) XXX_DiscardUnknown()
func (*MetricsRequest) XXX_Marshal ¶
func (m *MetricsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MetricsRequest) XXX_Merge ¶
func (m *MetricsRequest) XXX_Merge(src proto.Message)
func (*MetricsRequest) XXX_Size ¶
func (m *MetricsRequest) XXX_Size() int
func (*MetricsRequest) XXX_Unmarshal ¶
func (m *MetricsRequest) XXX_Unmarshal(b []byte) error
type MetricsResponse ¶
type MetricsResponse struct { ErrorCode MetricsResponse_ErrorCode `` /* 128-byte string literal not displayed */ Metrics []*MetricsResponse_Metric `protobuf:"bytes,2,rep,name=metrics,proto3" json:"metrics,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*MetricsResponse) Descriptor ¶
func (*MetricsResponse) Descriptor() ([]byte, []int)
func (*MetricsResponse) GetErrorCode ¶
func (m *MetricsResponse) GetErrorCode() MetricsResponse_ErrorCode
func (*MetricsResponse) GetMetrics ¶
func (m *MetricsResponse) GetMetrics() []*MetricsResponse_Metric
func (*MetricsResponse) ProtoMessage ¶
func (*MetricsResponse) ProtoMessage()
func (*MetricsResponse) Reset ¶
func (m *MetricsResponse) Reset()
func (*MetricsResponse) String ¶
func (m *MetricsResponse) String() string
func (*MetricsResponse) XXX_DiscardUnknown ¶
func (m *MetricsResponse) XXX_DiscardUnknown()
func (*MetricsResponse) XXX_Marshal ¶
func (m *MetricsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MetricsResponse) XXX_Merge ¶
func (m *MetricsResponse) XXX_Merge(src proto.Message)
func (*MetricsResponse) XXX_Size ¶
func (m *MetricsResponse) XXX_Size() int
func (*MetricsResponse) XXX_Unmarshal ¶
func (m *MetricsResponse) XXX_Unmarshal(b []byte) error
type MetricsResponse_ErrorCode ¶
type MetricsResponse_ErrorCode int32
const ( MetricsResponse_INTERNAL_ERROR MetricsResponse_ErrorCode = 0 MetricsResponse_ENCODING_ERROR MetricsResponse_ErrorCode = 1 )
func (MetricsResponse_ErrorCode) EnumDescriptor ¶
func (MetricsResponse_ErrorCode) EnumDescriptor() ([]byte, []int)
func (MetricsResponse_ErrorCode) String ¶
func (x MetricsResponse_ErrorCode) String() string
type MetricsResponse_Metric ¶
type MetricsResponse_Metric struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*MetricsResponse_Metric) Descriptor ¶
func (*MetricsResponse_Metric) Descriptor() ([]byte, []int)
func (*MetricsResponse_Metric) GetName ¶
func (m *MetricsResponse_Metric) GetName() string
func (*MetricsResponse_Metric) GetType ¶
func (m *MetricsResponse_Metric) GetType() string
func (*MetricsResponse_Metric) GetValue ¶
func (m *MetricsResponse_Metric) GetValue() string
func (*MetricsResponse_Metric) ProtoMessage ¶
func (*MetricsResponse_Metric) ProtoMessage()
func (*MetricsResponse_Metric) Reset ¶
func (m *MetricsResponse_Metric) Reset()
func (*MetricsResponse_Metric) String ¶
func (m *MetricsResponse_Metric) String() string
func (*MetricsResponse_Metric) XXX_DiscardUnknown ¶
func (m *MetricsResponse_Metric) XXX_DiscardUnknown()
func (*MetricsResponse_Metric) XXX_Marshal ¶
func (m *MetricsResponse_Metric) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MetricsResponse_Metric) XXX_Merge ¶
func (m *MetricsResponse_Metric) XXX_Merge(src proto.Message)
func (*MetricsResponse_Metric) XXX_Size ¶
func (m *MetricsResponse_Metric) XXX_Size() int
func (*MetricsResponse_Metric) XXX_Unmarshal ¶
func (m *MetricsResponse_Metric) XXX_Unmarshal(b []byte) error
type SetUserValidationRequest ¶
type SetUserValidationRequest struct { Api string `protobuf:"bytes,1,opt,name=api,proto3" json:"api,omitempty"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` IsValidated bool `protobuf:"varint,3,opt,name=is_validated,json=isValidated,proto3" json:"is_validated,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SetUserValidationRequest) Descriptor ¶
func (*SetUserValidationRequest) Descriptor() ([]byte, []int)
func (*SetUserValidationRequest) GetApi ¶
func (m *SetUserValidationRequest) GetApi() string
func (*SetUserValidationRequest) GetIsValidated ¶
func (m *SetUserValidationRequest) GetIsValidated() bool
func (*SetUserValidationRequest) GetUsername ¶
func (m *SetUserValidationRequest) GetUsername() string
func (*SetUserValidationRequest) ProtoMessage ¶
func (*SetUserValidationRequest) ProtoMessage()
func (*SetUserValidationRequest) Reset ¶
func (m *SetUserValidationRequest) Reset()
func (*SetUserValidationRequest) String ¶
func (m *SetUserValidationRequest) String() string
func (*SetUserValidationRequest) XXX_DiscardUnknown ¶
func (m *SetUserValidationRequest) XXX_DiscardUnknown()
func (*SetUserValidationRequest) XXX_Marshal ¶
func (m *SetUserValidationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SetUserValidationRequest) XXX_Merge ¶
func (m *SetUserValidationRequest) XXX_Merge(src proto.Message)
func (*SetUserValidationRequest) XXX_Size ¶
func (m *SetUserValidationRequest) XXX_Size() int
func (*SetUserValidationRequest) XXX_Unmarshal ¶
func (m *SetUserValidationRequest) XXX_Unmarshal(b []byte) error
type SetUserValidationResponse ¶
type SetUserValidationResponse struct { Api string `protobuf:"bytes,1,opt,name=api,proto3" json:"api,omitempty"` Success bool `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"` ErrorCode SetUserValidationResponse_ErrorCode `` /* 138-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SetUserValidationResponse) Descriptor ¶
func (*SetUserValidationResponse) Descriptor() ([]byte, []int)
func (*SetUserValidationResponse) GetApi ¶
func (m *SetUserValidationResponse) GetApi() string
func (*SetUserValidationResponse) GetErrorCode ¶
func (m *SetUserValidationResponse) GetErrorCode() SetUserValidationResponse_ErrorCode
func (*SetUserValidationResponse) GetSuccess ¶
func (m *SetUserValidationResponse) GetSuccess() bool
func (*SetUserValidationResponse) ProtoMessage ¶
func (*SetUserValidationResponse) ProtoMessage()
func (*SetUserValidationResponse) Reset ¶
func (m *SetUserValidationResponse) Reset()
func (*SetUserValidationResponse) String ¶
func (m *SetUserValidationResponse) String() string
func (*SetUserValidationResponse) XXX_DiscardUnknown ¶
func (m *SetUserValidationResponse) XXX_DiscardUnknown()
func (*SetUserValidationResponse) XXX_Marshal ¶
func (m *SetUserValidationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SetUserValidationResponse) XXX_Merge ¶
func (m *SetUserValidationResponse) XXX_Merge(src proto.Message)
func (*SetUserValidationResponse) XXX_Size ¶
func (m *SetUserValidationResponse) XXX_Size() int
func (*SetUserValidationResponse) XXX_Unmarshal ¶
func (m *SetUserValidationResponse) XXX_Unmarshal(b []byte) error
type SetUserValidationResponse_ErrorCode ¶
type SetUserValidationResponse_ErrorCode int32
const ( SetUserValidationResponse_BAD_REQUEST SetUserValidationResponse_ErrorCode = 0 SetUserValidationResponse_INTERNAL_ERROR SetUserValidationResponse_ErrorCode = 1 SetUserValidationResponse_USER_DOES_NOT_EXIST SetUserValidationResponse_ErrorCode = 2 SetUserValidationResponse_USER_ALREADY_VALIDATED SetUserValidationResponse_ErrorCode = 3 )
func (SetUserValidationResponse_ErrorCode) EnumDescriptor ¶
func (SetUserValidationResponse_ErrorCode) EnumDescriptor() ([]byte, []int)
func (SetUserValidationResponse_ErrorCode) String ¶
func (x SetUserValidationResponse_ErrorCode) String() string
type UnimplementedAuthServer ¶
type UnimplementedAuthServer struct { }
UnimplementedAuthServer can be embedded to have forward compatible implementations.
func (*UnimplementedAuthServer) CreateUser ¶
func (*UnimplementedAuthServer) CreateUser(ctx context.Context, req *CreateUserRequest) (*CreateUserResponse, error)
func (*UnimplementedAuthServer) Login ¶
func (*UnimplementedAuthServer) Login(ctx context.Context, req *LoginRequest) (*LoginResponse, error)
type UnimplementedHealthServer ¶
type UnimplementedHealthServer struct { }
UnimplementedHealthServer can be embedded to have forward compatible implementations.
func (*UnimplementedHealthServer) Check ¶
func (*UnimplementedHealthServer) Check(ctx context.Context, req *HealthCheckRequest) (*HealthCheckResponse, error)
func (*UnimplementedHealthServer) Watch ¶
func (*UnimplementedHealthServer) Watch(req *HealthCheckRequest, srv Health_WatchServer) error
type UnimplementedMetricServer ¶
type UnimplementedMetricServer struct { }
UnimplementedMetricServer can be embedded to have forward compatible implementations.
func (*UnimplementedMetricServer) GetMetrics ¶
func (*UnimplementedMetricServer) GetMetrics(ctx context.Context, req *MetricsRequest) (*MetricsResponse, error)