Documentation ¶
Index ¶
- Variables
- func RegisterSecuredServiceServer(s *grpc.Server, srv SecuredServiceServer)
- type AlsoDoublySecureRequest
- func (*AlsoDoublySecureRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AlsoDoublySecureRequest) GetKey() string
- func (x *AlsoDoublySecureRequest) GetPassword() string
- func (x *AlsoDoublySecureRequest) GetUsername() string
- func (*AlsoDoublySecureRequest) ProtoMessage()
- func (x *AlsoDoublySecureRequest) ProtoReflect() protoreflect.Message
- func (x *AlsoDoublySecureRequest) Reset()
- func (x *AlsoDoublySecureRequest) String() string
- type AlsoDoublySecureResponse
- func (*AlsoDoublySecureResponse) Descriptor() ([]byte, []int)deprecated
- func (x *AlsoDoublySecureResponse) GetField() string
- func (*AlsoDoublySecureResponse) ProtoMessage()
- func (x *AlsoDoublySecureResponse) ProtoReflect() protoreflect.Message
- func (x *AlsoDoublySecureResponse) Reset()
- func (x *AlsoDoublySecureResponse) String() string
- type DoublySecureRequest
- func (*DoublySecureRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DoublySecureRequest) GetKey() string
- func (*DoublySecureRequest) ProtoMessage()
- func (x *DoublySecureRequest) ProtoReflect() protoreflect.Message
- func (x *DoublySecureRequest) Reset()
- func (x *DoublySecureRequest) String() string
- type DoublySecureResponse
- func (*DoublySecureResponse) Descriptor() ([]byte, []int)deprecated
- func (x *DoublySecureResponse) GetField() string
- func (*DoublySecureResponse) ProtoMessage()
- func (x *DoublySecureResponse) ProtoReflect() protoreflect.Message
- func (x *DoublySecureResponse) Reset()
- func (x *DoublySecureResponse) String() string
- type SecureRequest
- type SecureResponse
- type SecuredServiceClient
- type SecuredServiceServer
- type SigninRequest
- type SigninResponse
- func (*SigninResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SigninResponse) GetApiKey() string
- func (x *SigninResponse) GetJwt() string
- func (x *SigninResponse) GetOauthToken() string
- func (*SigninResponse) ProtoMessage()
- func (x *SigninResponse) ProtoReflect() protoreflect.Message
- func (x *SigninResponse) Reset()
- func (x *SigninResponse) String() string
- type UnimplementedSecuredServiceServer
- func (*UnimplementedSecuredServiceServer) AlsoDoublySecure(context.Context, *AlsoDoublySecureRequest) (*AlsoDoublySecureResponse, error)
- func (*UnimplementedSecuredServiceServer) DoublySecure(context.Context, *DoublySecureRequest) (*DoublySecureResponse, error)
- func (*UnimplementedSecuredServiceServer) Secure(context.Context, *SecureRequest) (*SecureResponse, error)
- func (*UnimplementedSecuredServiceServer) Signin(context.Context, *SigninRequest) (*SigninResponse, error)
Constants ¶
This section is empty.
Variables ¶
var File_secured_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterSecuredServiceServer ¶
func RegisterSecuredServiceServer(s *grpc.Server, srv SecuredServiceServer)
Types ¶
type AlsoDoublySecureRequest ¶
type AlsoDoublySecureRequest struct { // Username used to perform signin Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` // Password used to perform signin Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // API key Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` // contains filtered or unexported fields }
func (*AlsoDoublySecureRequest) Descriptor
deprecated
func (*AlsoDoublySecureRequest) Descriptor() ([]byte, []int)
Deprecated: Use AlsoDoublySecureRequest.ProtoReflect.Descriptor instead.
func (*AlsoDoublySecureRequest) GetKey ¶
func (x *AlsoDoublySecureRequest) GetKey() string
func (*AlsoDoublySecureRequest) GetPassword ¶
func (x *AlsoDoublySecureRequest) GetPassword() string
func (*AlsoDoublySecureRequest) GetUsername ¶
func (x *AlsoDoublySecureRequest) GetUsername() string
func (*AlsoDoublySecureRequest) ProtoMessage ¶
func (*AlsoDoublySecureRequest) ProtoMessage()
func (*AlsoDoublySecureRequest) ProtoReflect ¶
func (x *AlsoDoublySecureRequest) ProtoReflect() protoreflect.Message
func (*AlsoDoublySecureRequest) Reset ¶
func (x *AlsoDoublySecureRequest) Reset()
func (*AlsoDoublySecureRequest) String ¶
func (x *AlsoDoublySecureRequest) String() string
type AlsoDoublySecureResponse ¶
type AlsoDoublySecureResponse struct { Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"` // contains filtered or unexported fields }
func (*AlsoDoublySecureResponse) Descriptor
deprecated
func (*AlsoDoublySecureResponse) Descriptor() ([]byte, []int)
Deprecated: Use AlsoDoublySecureResponse.ProtoReflect.Descriptor instead.
func (*AlsoDoublySecureResponse) GetField ¶
func (x *AlsoDoublySecureResponse) GetField() string
func (*AlsoDoublySecureResponse) ProtoMessage ¶
func (*AlsoDoublySecureResponse) ProtoMessage()
func (*AlsoDoublySecureResponse) ProtoReflect ¶
func (x *AlsoDoublySecureResponse) ProtoReflect() protoreflect.Message
func (*AlsoDoublySecureResponse) Reset ¶
func (x *AlsoDoublySecureResponse) Reset()
func (*AlsoDoublySecureResponse) String ¶
func (x *AlsoDoublySecureResponse) String() string
type DoublySecureRequest ¶
type DoublySecureRequest struct { // API key Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // contains filtered or unexported fields }
func (*DoublySecureRequest) Descriptor
deprecated
func (*DoublySecureRequest) Descriptor() ([]byte, []int)
Deprecated: Use DoublySecureRequest.ProtoReflect.Descriptor instead.
func (*DoublySecureRequest) GetKey ¶
func (x *DoublySecureRequest) GetKey() string
func (*DoublySecureRequest) ProtoMessage ¶
func (*DoublySecureRequest) ProtoMessage()
func (*DoublySecureRequest) ProtoReflect ¶
func (x *DoublySecureRequest) ProtoReflect() protoreflect.Message
func (*DoublySecureRequest) Reset ¶
func (x *DoublySecureRequest) Reset()
func (*DoublySecureRequest) String ¶
func (x *DoublySecureRequest) String() string
type DoublySecureResponse ¶
type DoublySecureResponse struct { Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"` // contains filtered or unexported fields }
func (*DoublySecureResponse) Descriptor
deprecated
func (*DoublySecureResponse) Descriptor() ([]byte, []int)
Deprecated: Use DoublySecureResponse.ProtoReflect.Descriptor instead.
func (*DoublySecureResponse) GetField ¶
func (x *DoublySecureResponse) GetField() string
func (*DoublySecureResponse) ProtoMessage ¶
func (*DoublySecureResponse) ProtoMessage()
func (*DoublySecureResponse) ProtoReflect ¶
func (x *DoublySecureResponse) ProtoReflect() protoreflect.Message
func (*DoublySecureResponse) Reset ¶
func (x *DoublySecureResponse) Reset()
func (*DoublySecureResponse) String ¶
func (x *DoublySecureResponse) String() string
type SecureRequest ¶
type SecureRequest struct { // Whether to force auth failure even with a valid JWT Fail bool `protobuf:"varint,1,opt,name=fail,proto3" json:"fail,omitempty"` // contains filtered or unexported fields }
func (*SecureRequest) Descriptor
deprecated
func (*SecureRequest) Descriptor() ([]byte, []int)
Deprecated: Use SecureRequest.ProtoReflect.Descriptor instead.
func (*SecureRequest) GetFail ¶
func (x *SecureRequest) GetFail() bool
func (*SecureRequest) ProtoMessage ¶
func (*SecureRequest) ProtoMessage()
func (*SecureRequest) ProtoReflect ¶
func (x *SecureRequest) ProtoReflect() protoreflect.Message
func (*SecureRequest) Reset ¶
func (x *SecureRequest) Reset()
func (*SecureRequest) String ¶
func (x *SecureRequest) String() string
type SecureResponse ¶
type SecureResponse struct { Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"` // contains filtered or unexported fields }
func (*SecureResponse) Descriptor
deprecated
func (*SecureResponse) Descriptor() ([]byte, []int)
Deprecated: Use SecureResponse.ProtoReflect.Descriptor instead.
func (*SecureResponse) GetField ¶
func (x *SecureResponse) GetField() string
func (*SecureResponse) ProtoMessage ¶
func (*SecureResponse) ProtoMessage()
func (*SecureResponse) ProtoReflect ¶
func (x *SecureResponse) ProtoReflect() protoreflect.Message
func (*SecureResponse) Reset ¶
func (x *SecureResponse) Reset()
func (*SecureResponse) String ¶
func (x *SecureResponse) String() string
type SecuredServiceClient ¶
type SecuredServiceClient interface { // Creates a valid JWT Signin(ctx context.Context, in *SigninRequest, opts ...grpc.CallOption) (*SigninResponse, error) // This action is secured with the jwt scheme Secure(ctx context.Context, in *SecureRequest, opts ...grpc.CallOption) (*SecureResponse, error) // This action is secured with the jwt scheme and also requires an API key // query string. DoublySecure(ctx context.Context, in *DoublySecureRequest, opts ...grpc.CallOption) (*DoublySecureResponse, error) // This action is secured with the jwt scheme and also requires an API key // header. AlsoDoublySecure(ctx context.Context, in *AlsoDoublySecureRequest, opts ...grpc.CallOption) (*AlsoDoublySecureResponse, error) }
SecuredServiceClient is the client API for SecuredService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewSecuredServiceClient ¶
func NewSecuredServiceClient(cc grpc.ClientConnInterface) SecuredServiceClient
type SecuredServiceServer ¶
type SecuredServiceServer interface { // Creates a valid JWT Signin(context.Context, *SigninRequest) (*SigninResponse, error) // This action is secured with the jwt scheme Secure(context.Context, *SecureRequest) (*SecureResponse, error) // This action is secured with the jwt scheme and also requires an API key // query string. DoublySecure(context.Context, *DoublySecureRequest) (*DoublySecureResponse, error) // This action is secured with the jwt scheme and also requires an API key // header. AlsoDoublySecure(context.Context, *AlsoDoublySecureRequest) (*AlsoDoublySecureResponse, error) }
SecuredServiceServer is the server API for SecuredService service.
type SigninRequest ¶
type SigninRequest struct {
// contains filtered or unexported fields
}
func (*SigninRequest) Descriptor
deprecated
func (*SigninRequest) Descriptor() ([]byte, []int)
Deprecated: Use SigninRequest.ProtoReflect.Descriptor instead.
func (*SigninRequest) ProtoMessage ¶
func (*SigninRequest) ProtoMessage()
func (*SigninRequest) ProtoReflect ¶
func (x *SigninRequest) ProtoReflect() protoreflect.Message
func (*SigninRequest) Reset ¶
func (x *SigninRequest) Reset()
func (*SigninRequest) String ¶
func (x *SigninRequest) String() string
type SigninResponse ¶
type SigninResponse struct { // JWT token Jwt string `protobuf:"bytes,1,opt,name=jwt,proto3" json:"jwt,omitempty"` // API Key ApiKey string `protobuf:"bytes,2,opt,name=api_key,json=apiKey,proto3" json:"api_key,omitempty"` // OAuth2 token OauthToken string `protobuf:"bytes,3,opt,name=oauth_token,json=oauthToken,proto3" json:"oauth_token,omitempty"` // contains filtered or unexported fields }
func (*SigninResponse) Descriptor
deprecated
func (*SigninResponse) Descriptor() ([]byte, []int)
Deprecated: Use SigninResponse.ProtoReflect.Descriptor instead.
func (*SigninResponse) GetApiKey ¶
func (x *SigninResponse) GetApiKey() string
func (*SigninResponse) GetJwt ¶
func (x *SigninResponse) GetJwt() string
func (*SigninResponse) GetOauthToken ¶
func (x *SigninResponse) GetOauthToken() string
func (*SigninResponse) ProtoMessage ¶
func (*SigninResponse) ProtoMessage()
func (*SigninResponse) ProtoReflect ¶
func (x *SigninResponse) ProtoReflect() protoreflect.Message
func (*SigninResponse) Reset ¶
func (x *SigninResponse) Reset()
func (*SigninResponse) String ¶
func (x *SigninResponse) String() string
type UnimplementedSecuredServiceServer ¶
type UnimplementedSecuredServiceServer struct { }
UnimplementedSecuredServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedSecuredServiceServer) AlsoDoublySecure ¶
func (*UnimplementedSecuredServiceServer) AlsoDoublySecure(context.Context, *AlsoDoublySecureRequest) (*AlsoDoublySecureResponse, error)
func (*UnimplementedSecuredServiceServer) DoublySecure ¶
func (*UnimplementedSecuredServiceServer) DoublySecure(context.Context, *DoublySecureRequest) (*DoublySecureResponse, error)
func (*UnimplementedSecuredServiceServer) Secure ¶
func (*UnimplementedSecuredServiceServer) Secure(context.Context, *SecureRequest) (*SecureResponse, error)
func (*UnimplementedSecuredServiceServer) Signin ¶
func (*UnimplementedSecuredServiceServer) Signin(context.Context, *SigninRequest) (*SigninResponse, error)