org

package
v0.6.12 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2021 License: Apache-2.0 Imports: 18 Imported by: 1

Documentation

Overview

Package org is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_org_v1_org_proto protoreflect.FileDescriptor
View Source
var OrgApi_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "blueapi.org.v1.OrgApi",
	HandlerType: (*OrgApiServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetOrg",
			Handler:    _OrgApi_GetOrg_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "org/v1/org.proto",
}

OrgApi_ServiceDesc is the grpc.ServiceDesc for OrgApi service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterOrgApiHandler added in v0.6.11

func RegisterOrgApiHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterOrgApiHandler registers the http handlers for service OrgApi to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterOrgApiHandlerClient added in v0.6.11

func RegisterOrgApiHandlerClient(ctx context.Context, mux *runtime.ServeMux, client OrgApiClient) error

RegisterOrgApiHandlerClient registers the http handlers for service OrgApi to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "OrgApiClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "OrgApiClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "OrgApiClient" to call the correct interceptors.

func RegisterOrgApiHandlerFromEndpoint added in v0.6.11

func RegisterOrgApiHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterOrgApiHandlerFromEndpoint is same as RegisterOrgApiHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterOrgApiHandlerServer added in v0.6.11

func RegisterOrgApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, server OrgApiServer) error

RegisterOrgApiHandlerServer registers the http handlers for service OrgApi to "mux". UnaryRPC :call OrgApiServer 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 RegisterOrgApiHandlerFromEndpoint instead.

func RegisterOrgApiServer added in v0.6.11

func RegisterOrgApiServer(s grpc.ServiceRegistrar, srv OrgApiServer)

Types

type ClientOptions added in v0.6.10

type ClientOptions struct {
	Conn *conn.GrpcClientConn
}

ClientOptions represents the optional options to NewClient.

type GetOrgRequest added in v0.6.11

type GetOrgRequest struct {
	// contains filtered or unexported fields
}

Request message for OrgApi.GetOrg rpc.

func (*GetOrgRequest) Descriptor deprecated added in v0.6.11

func (*GetOrgRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetOrgRequest.ProtoReflect.Descriptor instead.

func (*GetOrgRequest) ProtoMessage added in v0.6.11

func (*GetOrgRequest) ProtoMessage()

func (*GetOrgRequest) ProtoReflect added in v0.6.11

func (x *GetOrgRequest) ProtoReflect() protoreflect.Message

func (*GetOrgRequest) Reset added in v0.6.11

func (x *GetOrgRequest) Reset()

func (*GetOrgRequest) String added in v0.6.11

func (x *GetOrgRequest) String() string

type GrpcClient added in v0.6.6

type GrpcClient struct {
	OrgApiClient
	// contains filtered or unexported fields
}

func NewClient added in v0.6.6

func NewClient(ctx context.Context, opts ...*ClientOptions) (*GrpcClient, error)

NewClient returns a client connection to the 'org' service.

func (*GrpcClient) Close added in v0.6.6

func (c *GrpcClient) Close()

type Org added in v0.6.11

type Org struct {
	Name        string            `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Description string            `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	Email       string            `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
	Metadata    map[string]string `` /* 157-byte string literal not displayed */
	// contains filtered or unexported fields
}

Org resource definition.

func (*Org) Descriptor deprecated added in v0.6.11

func (*Org) Descriptor() ([]byte, []int)

Deprecated: Use Org.ProtoReflect.Descriptor instead.

func (*Org) GetDescription added in v0.6.11

func (x *Org) GetDescription() string

func (*Org) GetEmail added in v0.6.11

func (x *Org) GetEmail() string

func (*Org) GetMetadata added in v0.6.11

func (x *Org) GetMetadata() map[string]string

func (*Org) GetName added in v0.6.11

func (x *Org) GetName() string

func (*Org) ProtoMessage added in v0.6.11

func (*Org) ProtoMessage()

func (*Org) ProtoReflect added in v0.6.11

func (x *Org) ProtoReflect() protoreflect.Message

func (*Org) Reset added in v0.6.11

func (x *Org) Reset()

func (*Org) String added in v0.6.11

func (x *Org) String() string

type OrgApiClient added in v0.6.11

type OrgApiClient interface {
	GetOrg(ctx context.Context, in *GetOrgRequest, opts ...grpc.CallOption) (*Org, error)
}

OrgApiClient is the client API for OrgApi 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 NewOrgApiClient added in v0.6.11

func NewOrgApiClient(cc grpc.ClientConnInterface) OrgApiClient

type OrgApiServer added in v0.6.11

type OrgApiServer interface {
	GetOrg(context.Context, *GetOrgRequest) (*Org, error)
	// contains filtered or unexported methods
}

OrgApiServer is the server API for OrgApi service. All implementations must embed UnimplementedOrgApiServer for forward compatibility

type UnimplementedOrgApiServer added in v0.6.11

type UnimplementedOrgApiServer struct {
}

UnimplementedOrgApiServer must be embedded to have forward compatible implementations.

func (UnimplementedOrgApiServer) GetOrg added in v0.6.11

type UnsafeOrgApiServer added in v0.6.11

type UnsafeOrgApiServer interface {
	// contains filtered or unexported methods
}

UnsafeOrgApiServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to OrgApiServer will result in compilation errors.

Jump to

Keyboard shortcuts

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