Documentation ¶
Overview ¶
Package admin is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterAdminHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterAdminHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AdminClient) error
- func RegisterAdminHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterAdminHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AdminServer) error
- func RegisterAdminServer(s grpc.ServiceRegistrar, srv AdminServer)
- type AdminClient
- type AdminServer
- type Admin_ListAccountGroupsClient
- type Admin_ListAccountGroupsServer
- type ClientOptions
- type GetAccountGroupRequest
- func (*GetAccountGroupRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetAccountGroupRequest) GetId() string
- func (*GetAccountGroupRequest) ProtoMessage()
- func (x *GetAccountGroupRequest) ProtoReflect() protoreflect.Message
- func (x *GetAccountGroupRequest) Reset()
- func (x *GetAccountGroupRequest) String() string
- type GetAccountGroupResponse
- func (*GetAccountGroupResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetAccountGroupResponse) GetAcctGroup() *api.AccountGroup
- func (*GetAccountGroupResponse) ProtoMessage()
- func (x *GetAccountGroupResponse) ProtoReflect() protoreflect.Message
- func (x *GetAccountGroupResponse) Reset()
- func (x *GetAccountGroupResponse) String() string
- type GrpcClient
- type ListAccountGroupsRequest
- type ListAccountGroupsResponse
- func (*ListAccountGroupsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListAccountGroupsResponse) GetAccountGroups() []*api.AccountGroup
- func (*ListAccountGroupsResponse) ProtoMessage()
- func (x *ListAccountGroupsResponse) ProtoReflect() protoreflect.Message
- func (x *ListAccountGroupsResponse) Reset()
- func (x *ListAccountGroupsResponse) String() string
- type UnimplementedAdminServer
- type UnsafeAdminServer
Constants ¶
This section is empty.
Variables ¶
var Admin_ServiceDesc = grpc.ServiceDesc{ ServiceName: "blueapi.admin.v1.Admin", HandlerType: (*AdminServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetAccountGroup", Handler: _Admin_GetAccountGroup_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "ListAccountGroups", Handler: _Admin_ListAccountGroups_Handler, ServerStreams: true, }, }, Metadata: "admin/v1/admin.proto", }
Admin_ServiceDesc is the grpc.ServiceDesc for Admin service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_admin_v1_admin_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAdminHandler ¶
RegisterAdminHandler registers the http handlers for service Admin to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterAdminHandlerClient ¶
func RegisterAdminHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AdminClient) error
RegisterAdminHandlerClient registers the http handlers for service Admin to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AdminClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AdminClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "AdminClient" to call the correct interceptors.
func RegisterAdminHandlerFromEndpoint ¶
func RegisterAdminHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterAdminHandlerFromEndpoint is same as RegisterAdminHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterAdminHandlerServer ¶
func RegisterAdminHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AdminServer) error
RegisterAdminHandlerServer registers the http handlers for service Admin to "mux". UnaryRPC :call AdminServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAdminHandlerFromEndpoint instead.
func RegisterAdminServer ¶
func RegisterAdminServer(s grpc.ServiceRegistrar, srv AdminServer)
Types ¶
type AdminClient ¶
type AdminClient interface { // Lists all account groups. ListAccountGroups(ctx context.Context, in *ListAccountGroupsRequest, opts ...grpc.CallOption) (Admin_ListAccountGroupsClient, error) // Gets an account group. GetAccountGroup(ctx context.Context, in *GetAccountGroupRequest, opts ...grpc.CallOption) (*GetAccountGroupResponse, error) }
AdminClient is the client API for Admin service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewAdminClient ¶
func NewAdminClient(cc grpc.ClientConnInterface) AdminClient
type AdminServer ¶
type AdminServer interface { // Lists all account groups. ListAccountGroups(*ListAccountGroupsRequest, Admin_ListAccountGroupsServer) error // Gets an account group. GetAccountGroup(context.Context, *GetAccountGroupRequest) (*GetAccountGroupResponse, error) // contains filtered or unexported methods }
AdminServer is the server API for Admin service. All implementations must embed UnimplementedAdminServer for forward compatibility
type Admin_ListAccountGroupsClient ¶
type Admin_ListAccountGroupsClient interface { Recv() (*ListAccountGroupsResponse, error) grpc.ClientStream }
type Admin_ListAccountGroupsServer ¶
type Admin_ListAccountGroupsServer interface { Send(*ListAccountGroupsResponse) error grpc.ServerStream }
type ClientOptions ¶
type ClientOptions struct {
Conn *conn.GrpcClientConn
}
ClientOptions represents the optional options to NewClient.
type GetAccountGroupRequest ¶ added in v0.36.3
type GetAccountGroupRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
Request message for the Admin.GetAccountGroup rpc.
func (*GetAccountGroupRequest) Descriptor
deprecated
added in
v0.36.3
func (*GetAccountGroupRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetAccountGroupRequest.ProtoReflect.Descriptor instead.
func (*GetAccountGroupRequest) GetId ¶ added in v0.36.3
func (x *GetAccountGroupRequest) GetId() string
func (*GetAccountGroupRequest) ProtoMessage ¶ added in v0.36.3
func (*GetAccountGroupRequest) ProtoMessage()
func (*GetAccountGroupRequest) ProtoReflect ¶ added in v0.36.3
func (x *GetAccountGroupRequest) ProtoReflect() protoreflect.Message
func (*GetAccountGroupRequest) Reset ¶ added in v0.36.3
func (x *GetAccountGroupRequest) Reset()
func (*GetAccountGroupRequest) String ¶ added in v0.36.3
func (x *GetAccountGroupRequest) String() string
type GetAccountGroupResponse ¶ added in v0.36.3
type GetAccountGroupResponse struct { AcctGroup *api.AccountGroup `protobuf:"bytes,1,opt,name=acctGroup,proto3" json:"acctGroup,omitempty"` // contains filtered or unexported fields }
Response message for the Admin.GetAccountGroup rpc.
func (*GetAccountGroupResponse) Descriptor
deprecated
added in
v0.36.3
func (*GetAccountGroupResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetAccountGroupResponse.ProtoReflect.Descriptor instead.
func (*GetAccountGroupResponse) GetAcctGroup ¶ added in v0.36.3
func (x *GetAccountGroupResponse) GetAcctGroup() *api.AccountGroup
func (*GetAccountGroupResponse) ProtoMessage ¶ added in v0.36.3
func (*GetAccountGroupResponse) ProtoMessage()
func (*GetAccountGroupResponse) ProtoReflect ¶ added in v0.36.3
func (x *GetAccountGroupResponse) ProtoReflect() protoreflect.Message
func (*GetAccountGroupResponse) Reset ¶ added in v0.36.3
func (x *GetAccountGroupResponse) Reset()
func (*GetAccountGroupResponse) String ¶ added in v0.36.3
func (x *GetAccountGroupResponse) String() string
type GrpcClient ¶
type GrpcClient struct { AdminClient // contains filtered or unexported fields }
func NewClient ¶
func NewClient(ctx context.Context, opts ...*ClientOptions) (*GrpcClient, error)
NewClient returns a client connection to the 'admin' service.
func (*GrpcClient) Close ¶
func (c *GrpcClient) Close()
type ListAccountGroupsRequest ¶
type ListAccountGroupsRequest struct {
// contains filtered or unexported fields
}
Request message for the Admin.ListAccountGroups rpc.
func (*ListAccountGroupsRequest) Descriptor
deprecated
func (*ListAccountGroupsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListAccountGroupsRequest.ProtoReflect.Descriptor instead.
func (*ListAccountGroupsRequest) ProtoMessage ¶
func (*ListAccountGroupsRequest) ProtoMessage()
func (*ListAccountGroupsRequest) ProtoReflect ¶
func (x *ListAccountGroupsRequest) ProtoReflect() protoreflect.Message
func (*ListAccountGroupsRequest) Reset ¶
func (x *ListAccountGroupsRequest) Reset()
func (*ListAccountGroupsRequest) String ¶
func (x *ListAccountGroupsRequest) String() string
type ListAccountGroupsResponse ¶
type ListAccountGroupsResponse struct { AccountGroups []*api.AccountGroup `protobuf:"bytes,1,rep,name=accountGroups,proto3" json:"accountGroups,omitempty"` // contains filtered or unexported fields }
Response message for the Admin.ListAccountGroups rpc.
func (*ListAccountGroupsResponse) Descriptor
deprecated
func (*ListAccountGroupsResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListAccountGroupsResponse.ProtoReflect.Descriptor instead.
func (*ListAccountGroupsResponse) GetAccountGroups ¶ added in v0.36.1
func (x *ListAccountGroupsResponse) GetAccountGroups() []*api.AccountGroup
func (*ListAccountGroupsResponse) ProtoMessage ¶
func (*ListAccountGroupsResponse) ProtoMessage()
func (*ListAccountGroupsResponse) ProtoReflect ¶
func (x *ListAccountGroupsResponse) ProtoReflect() protoreflect.Message
func (*ListAccountGroupsResponse) Reset ¶
func (x *ListAccountGroupsResponse) Reset()
func (*ListAccountGroupsResponse) String ¶
func (x *ListAccountGroupsResponse) String() string
type UnimplementedAdminServer ¶
type UnimplementedAdminServer struct { }
UnimplementedAdminServer must be embedded to have forward compatible implementations.
func (UnimplementedAdminServer) GetAccountGroup ¶ added in v0.36.3
func (UnimplementedAdminServer) GetAccountGroup(context.Context, *GetAccountGroupRequest) (*GetAccountGroupResponse, error)
func (UnimplementedAdminServer) ListAccountGroups ¶
func (UnimplementedAdminServer) ListAccountGroups(*ListAccountGroupsRequest, Admin_ListAccountGroupsServer) error
type UnsafeAdminServer ¶
type UnsafeAdminServer interface {
// contains filtered or unexported methods
}
UnsafeAdminServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AdminServer will result in compilation errors.