Documentation ¶
Overview ¶
Package rest_credentials is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- func RegisterRestAuthCredentialsHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterRestAuthCredentialsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RestAuthCredentialsClient) error
- func RegisterRestAuthCredentialsHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterRestAuthCredentialsServer(s *grpc.Server, srv RestAuthCredentialsServer)
- type CreateRestRequest
- func (*CreateRestRequest) Descriptor() ([]byte, []int)
- func (m *CreateRestRequest) GetProjectId() string
- func (m *CreateRestRequest) GetRedirectUris() string
- func (*CreateRestRequest) ProtoMessage()
- func (m *CreateRestRequest) Reset()
- func (m *CreateRestRequest) String() string
- func (m *CreateRestRequest) XXX_DiscardUnknown()
- func (m *CreateRestRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CreateRestRequest) XXX_Merge(src proto.Message)
- func (m *CreateRestRequest) XXX_Size() int
- func (m *CreateRestRequest) XXX_Unmarshal(b []byte) error
- type CreateRestResponse
- func (*CreateRestResponse) Descriptor() ([]byte, []int)
- func (m *CreateRestResponse) GetRest() *RestAppDefinition
- func (*CreateRestResponse) ProtoMessage()
- func (m *CreateRestResponse) Reset()
- func (m *CreateRestResponse) String() string
- func (m *CreateRestResponse) XXX_DiscardUnknown()
- func (m *CreateRestResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CreateRestResponse) XXX_Merge(src proto.Message)
- func (m *CreateRestResponse) XXX_Size() int
- func (m *CreateRestResponse) XXX_Unmarshal(b []byte) error
- type RestAppDefinition
- func (*RestAppDefinition) Descriptor() ([]byte, []int)
- func (m *RestAppDefinition) GetAuthUri() string
- func (m *RestAppDefinition) GetClientId() string
- func (m *RestAppDefinition) GetClientSecret() string
- func (m *RestAppDefinition) GetProjectId() string
- func (m *RestAppDefinition) GetRedirectUris() []string
- func (*RestAppDefinition) ProtoMessage()
- func (m *RestAppDefinition) Reset()
- func (m *RestAppDefinition) String() string
- func (m *RestAppDefinition) XXX_DiscardUnknown()
- func (m *RestAppDefinition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RestAppDefinition) XXX_Merge(src proto.Message)
- func (m *RestAppDefinition) XXX_Size() int
- func (m *RestAppDefinition) XXX_Unmarshal(b []byte) error
- type RestAuthCredentialsClient
- type RestAuthCredentialsServer
- type UnimplementedRestAuthCredentialsServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterRestAuthCredentialsHandler ¶
func RegisterRestAuthCredentialsHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterRestAuthCredentialsHandler registers the http handlers for service RestAuthCredentials to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterRestAuthCredentialsHandlerClient ¶
func RegisterRestAuthCredentialsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RestAuthCredentialsClient) error
RegisterRestAuthCredentialsHandlerClient registers the http handlers for service RestAuthCredentials to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "RestAuthCredentialsClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "RestAuthCredentialsClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "RestAuthCredentialsClient" to call the correct interceptors.
func RegisterRestAuthCredentialsHandlerFromEndpoint ¶
func RegisterRestAuthCredentialsHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterRestAuthCredentialsHandlerFromEndpoint is same as RegisterRestAuthCredentialsHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterRestAuthCredentialsServer ¶
func RegisterRestAuthCredentialsServer(s *grpc.Server, srv RestAuthCredentialsServer)
Types ¶
type CreateRestRequest ¶
type CreateRestRequest struct { ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` RedirectUris string `protobuf:"bytes,2,opt,name=redirect_uris,json=redirectUris,proto3" json:"redirect_uris,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Data needed to create credentials.
func (*CreateRestRequest) Descriptor ¶
func (*CreateRestRequest) Descriptor() ([]byte, []int)
func (*CreateRestRequest) GetProjectId ¶
func (m *CreateRestRequest) GetProjectId() string
func (*CreateRestRequest) GetRedirectUris ¶
func (m *CreateRestRequest) GetRedirectUris() string
func (*CreateRestRequest) ProtoMessage ¶
func (*CreateRestRequest) ProtoMessage()
func (*CreateRestRequest) Reset ¶
func (m *CreateRestRequest) Reset()
func (*CreateRestRequest) String ¶
func (m *CreateRestRequest) String() string
func (*CreateRestRequest) XXX_DiscardUnknown ¶
func (m *CreateRestRequest) XXX_DiscardUnknown()
func (*CreateRestRequest) XXX_Marshal ¶
func (m *CreateRestRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CreateRestRequest) XXX_Merge ¶
func (m *CreateRestRequest) XXX_Merge(src proto.Message)
func (*CreateRestRequest) XXX_Size ¶
func (m *CreateRestRequest) XXX_Size() int
func (*CreateRestRequest) XXX_Unmarshal ¶
func (m *CreateRestRequest) XXX_Unmarshal(b []byte) error
type CreateRestResponse ¶
type CreateRestResponse struct { Rest *RestAppDefinition `protobuf:"bytes,1,opt,name=rest,proto3" json:"rest,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Create a response for the rest application with credentials data.
func (*CreateRestResponse) Descriptor ¶
func (*CreateRestResponse) Descriptor() ([]byte, []int)
func (*CreateRestResponse) GetRest ¶
func (m *CreateRestResponse) GetRest() *RestAppDefinition
func (*CreateRestResponse) ProtoMessage ¶
func (*CreateRestResponse) ProtoMessage()
func (*CreateRestResponse) Reset ¶
func (m *CreateRestResponse) Reset()
func (*CreateRestResponse) String ¶
func (m *CreateRestResponse) String() string
func (*CreateRestResponse) XXX_DiscardUnknown ¶
func (m *CreateRestResponse) XXX_DiscardUnknown()
func (*CreateRestResponse) XXX_Marshal ¶
func (m *CreateRestResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CreateRestResponse) XXX_Merge ¶
func (m *CreateRestResponse) XXX_Merge(src proto.Message)
func (*CreateRestResponse) XXX_Size ¶
func (m *CreateRestResponse) XXX_Size() int
func (*CreateRestResponse) XXX_Unmarshal ¶
func (m *CreateRestResponse) XXX_Unmarshal(b []byte) error
type RestAppDefinition ¶
type RestAppDefinition struct { ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` ClientSecret string `protobuf:"bytes,3,opt,name=client_secret,json=clientSecret,proto3" json:"client_secret,omitempty"` AuthUri string `protobuf:"bytes,4,opt,name=auth_uri,json=authUri,proto3" json:"auth_uri,omitempty"` RedirectUris []string `protobuf:"bytes,5,rep,name=redirect_uris,json=redirectUris,proto3" json:"redirect_uris,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Credentials values generated for a rest application.
func (*RestAppDefinition) Descriptor ¶
func (*RestAppDefinition) Descriptor() ([]byte, []int)
func (*RestAppDefinition) GetAuthUri ¶
func (m *RestAppDefinition) GetAuthUri() string
func (*RestAppDefinition) GetClientId ¶
func (m *RestAppDefinition) GetClientId() string
func (*RestAppDefinition) GetClientSecret ¶
func (m *RestAppDefinition) GetClientSecret() string
func (*RestAppDefinition) GetProjectId ¶
func (m *RestAppDefinition) GetProjectId() string
func (*RestAppDefinition) GetRedirectUris ¶
func (m *RestAppDefinition) GetRedirectUris() []string
func (*RestAppDefinition) ProtoMessage ¶
func (*RestAppDefinition) ProtoMessage()
func (*RestAppDefinition) Reset ¶
func (m *RestAppDefinition) Reset()
func (*RestAppDefinition) String ¶
func (m *RestAppDefinition) String() string
func (*RestAppDefinition) XXX_DiscardUnknown ¶
func (m *RestAppDefinition) XXX_DiscardUnknown()
func (*RestAppDefinition) XXX_Marshal ¶
func (m *RestAppDefinition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RestAppDefinition) XXX_Merge ¶
func (m *RestAppDefinition) XXX_Merge(src proto.Message)
func (*RestAppDefinition) XXX_Size ¶
func (m *RestAppDefinition) XXX_Size() int
func (*RestAppDefinition) XXX_Unmarshal ¶
func (m *RestAppDefinition) XXX_Unmarshal(b []byte) error
type RestAuthCredentialsClient ¶
type RestAuthCredentialsClient interface { // Create new Credentials for rest backend Create(ctx context.Context, in *CreateRestRequest, opts ...grpc.CallOption) (*CreateRestResponse, error) }
RestAuthCredentialsClient is the client API for RestAuthCredentials service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewRestAuthCredentialsClient ¶
func NewRestAuthCredentialsClient(cc *grpc.ClientConn) RestAuthCredentialsClient
type RestAuthCredentialsServer ¶
type RestAuthCredentialsServer interface { // Create new Credentials for rest backend Create(context.Context, *CreateRestRequest) (*CreateRestResponse, error) }
RestAuthCredentialsServer is the server API for RestAuthCredentials service.
type UnimplementedRestAuthCredentialsServer ¶
type UnimplementedRestAuthCredentialsServer struct { }
UnimplementedRestAuthCredentialsServer can be embedded to have forward compatible implementations.
func (*UnimplementedRestAuthCredentialsServer) Create ¶
func (*UnimplementedRestAuthCredentialsServer) Create(ctx context.Context, req *CreateRestRequest) (*CreateRestResponse, error)