roles

package
v0.0.0-...-1d8daf6 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2020 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package roles is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_protobuf_roles_roles_proto protoreflect.FileDescriptor

Functions

func RegisterRoleServiceHandler

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

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

func RegisterRoleServiceHandlerClient

func RegisterRoleServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RoleServiceClient) error

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

func RegisterRoleServiceHandlerFromEndpoint

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

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

func RegisterRoleServiceHandlerServer

func RegisterRoleServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RoleServiceServer) error

RegisterRoleServiceHandlerServer registers the http handlers for service RoleService to "mux". UnaryRPC :call RoleServiceServer 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 RegisterRoleServiceHandlerFromEndpoint instead.

func RegisterRoleServiceServer

func RegisterRoleServiceServer(s *grpc.Server, srv RoleServiceServer)

Types

type CreateRoleRequest

type CreateRoleRequest struct {
	Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateRoleRequest) Descriptor deprecated

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

Deprecated: Use CreateRoleRequest.ProtoReflect.Descriptor instead.

func (*CreateRoleRequest) GetTitle

func (x *CreateRoleRequest) GetTitle() string

func (*CreateRoleRequest) ProtoMessage

func (*CreateRoleRequest) ProtoMessage()

func (*CreateRoleRequest) ProtoReflect

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

func (*CreateRoleRequest) Reset

func (x *CreateRoleRequest) Reset()

func (*CreateRoleRequest) String

func (x *CreateRoleRequest) String() string

type DeleteRoleRequest

type DeleteRoleRequest struct {
	Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteRoleRequest) Descriptor deprecated

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

Deprecated: Use DeleteRoleRequest.ProtoReflect.Descriptor instead.

func (*DeleteRoleRequest) GetUuid

func (x *DeleteRoleRequest) GetUuid() string

func (*DeleteRoleRequest) ProtoMessage

func (*DeleteRoleRequest) ProtoMessage()

func (*DeleteRoleRequest) ProtoReflect

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

func (*DeleteRoleRequest) Reset

func (x *DeleteRoleRequest) Reset()

func (*DeleteRoleRequest) String

func (x *DeleteRoleRequest) String() string

type GetRoleRequest

type GetRoleRequest struct {
	Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
	// contains filtered or unexported fields
}

func (*GetRoleRequest) Descriptor deprecated

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

Deprecated: Use GetRoleRequest.ProtoReflect.Descriptor instead.

func (*GetRoleRequest) GetUuid

func (x *GetRoleRequest) GetUuid() string

func (*GetRoleRequest) ProtoMessage

func (*GetRoleRequest) ProtoMessage()

func (*GetRoleRequest) ProtoReflect

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

func (*GetRoleRequest) Reset

func (x *GetRoleRequest) Reset()

func (*GetRoleRequest) String

func (x *GetRoleRequest) String() string

type ListRolesRequest

type ListRolesRequest struct {
	Limit  int64 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"`
	Offset int64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
	// contains filtered or unexported fields
}

func (*ListRolesRequest) Descriptor deprecated

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

Deprecated: Use ListRolesRequest.ProtoReflect.Descriptor instead.

func (*ListRolesRequest) GetLimit

func (x *ListRolesRequest) GetLimit() int64

func (*ListRolesRequest) GetOffset

func (x *ListRolesRequest) GetOffset() int64

func (*ListRolesRequest) ProtoMessage

func (*ListRolesRequest) ProtoMessage()

func (*ListRolesRequest) ProtoReflect

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

func (*ListRolesRequest) Reset

func (x *ListRolesRequest) Reset()

func (*ListRolesRequest) String

func (x *ListRolesRequest) String() string

type ListRolesResponse

type ListRolesResponse struct {
	Roles      []*Role `protobuf:"bytes,1,rep,name=roles,proto3" json:"roles,omitempty"`
	TotalCount int64   `protobuf:"varint,2,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"`
	Limit      int64   `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"`
	Offset     int64   `protobuf:"varint,4,opt,name=offset,proto3" json:"offset,omitempty"`
	// contains filtered or unexported fields
}

func (*ListRolesResponse) Descriptor deprecated

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

Deprecated: Use ListRolesResponse.ProtoReflect.Descriptor instead.

func (*ListRolesResponse) GetLimit

func (x *ListRolesResponse) GetLimit() int64

func (*ListRolesResponse) GetOffset

func (x *ListRolesResponse) GetOffset() int64

func (*ListRolesResponse) GetRoles

func (x *ListRolesResponse) GetRoles() []*Role

func (*ListRolesResponse) GetTotalCount

func (x *ListRolesResponse) GetTotalCount() int64

func (*ListRolesResponse) ProtoMessage

func (*ListRolesResponse) ProtoMessage()

func (*ListRolesResponse) ProtoReflect

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

func (*ListRolesResponse) Reset

func (x *ListRolesResponse) Reset()

func (*ListRolesResponse) String

func (x *ListRolesResponse) String() string

type Role

type Role struct {
	Id        uint64               `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Uuid      string               `protobuf:"bytes,2,opt,name=uuid,proto3" json:"uuid,omitempty"`
	Title     string               `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"`
	CreatedAt *timestamp.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	UpdatedAt *timestamp.Timestamp `protobuf:"bytes,5,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

func (*Role) Descriptor deprecated

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

Deprecated: Use Role.ProtoReflect.Descriptor instead.

func (*Role) GetCreatedAt

func (x *Role) GetCreatedAt() *timestamp.Timestamp

func (*Role) GetId

func (x *Role) GetId() uint64

func (*Role) GetTitle

func (x *Role) GetTitle() string

func (*Role) GetUpdatedAt

func (x *Role) GetUpdatedAt() *timestamp.Timestamp

func (*Role) GetUuid

func (x *Role) GetUuid() string

func (*Role) ProtoMessage

func (*Role) ProtoMessage()

func (*Role) ProtoReflect

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

func (*Role) Reset

func (x *Role) Reset()

func (*Role) String

func (x *Role) String() string

type RoleServiceClient

type RoleServiceClient interface {
	// List Roles
	ListRoles(ctx context.Context, in *ListRolesRequest, opts ...grpc.CallOption) (*ListRolesResponse, error)
	// Get Role
	GetRole(ctx context.Context, in *GetRoleRequest, opts ...grpc.CallOption) (*Role, error)
	// Create Role object request
	CreateRole(ctx context.Context, in *CreateRoleRequest, opts ...grpc.CallOption) (*Role, error)
	// Update Role object request
	UpdateRole(ctx context.Context, in *UpdateRoleRequest, opts ...grpc.CallOption) (*Role, error)
	// Delete Role object request
	DeleteRole(ctx context.Context, in *DeleteRoleRequest, opts ...grpc.CallOption) (*empty.Empty, error)
}

RoleServiceClient is the client API for RoleService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

type RoleServiceServer

type RoleServiceServer interface {
	// List Roles
	ListRoles(context.Context, *ListRolesRequest) (*ListRolesResponse, error)
	// Get Role
	GetRole(context.Context, *GetRoleRequest) (*Role, error)
	// Create Role object request
	CreateRole(context.Context, *CreateRoleRequest) (*Role, error)
	// Update Role object request
	UpdateRole(context.Context, *UpdateRoleRequest) (*Role, error)
	// Delete Role object request
	DeleteRole(context.Context, *DeleteRoleRequest) (*empty.Empty, error)
}

RoleServiceServer is the server API for RoleService service.

type UnimplementedRoleServiceServer

type UnimplementedRoleServiceServer struct {
}

UnimplementedRoleServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedRoleServiceServer) CreateRole

func (*UnimplementedRoleServiceServer) DeleteRole

func (*UnimplementedRoleServiceServer) GetRole

func (*UnimplementedRoleServiceServer) ListRoles

func (*UnimplementedRoleServiceServer) UpdateRole

type UpdateRoleRequest

type UpdateRoleRequest struct {
	Uuid  string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
	Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateRoleRequest) Descriptor deprecated

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

Deprecated: Use UpdateRoleRequest.ProtoReflect.Descriptor instead.

func (*UpdateRoleRequest) GetTitle

func (x *UpdateRoleRequest) GetTitle() string

func (*UpdateRoleRequest) GetUuid

func (x *UpdateRoleRequest) GetUuid() string

func (*UpdateRoleRequest) ProtoMessage

func (*UpdateRoleRequest) ProtoMessage()

func (*UpdateRoleRequest) ProtoReflect

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

func (*UpdateRoleRequest) Reset

func (x *UpdateRoleRequest) Reset()

func (*UpdateRoleRequest) String

func (x *UpdateRoleRequest) String() string

Jump to

Keyboard shortcuts

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