v1role

package
v0.0.0-...-9296deb Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package v1role is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	RoleService_GetRole_FullMethodName    = "/role.v1.RoleService/GetRole"
	RoleService_ListRole_FullMethodName   = "/role.v1.RoleService/ListRole"
	RoleService_CreateRole_FullMethodName = "/role.v1.RoleService/CreateRole"
	RoleService_UpdateRole_FullMethodName = "/role.v1.RoleService/UpdateRole"
)

Variables

View Source
var File_role_v1_role_proto protoreflect.FileDescriptor
View Source
var RoleService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "role.v1.RoleService",
	HandlerType: (*RoleServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetRole",
			Handler:    _RoleService_GetRole_Handler,
		},
		{
			MethodName: "ListRole",
			Handler:    _RoleService_ListRole_Handler,
		},
		{
			MethodName: "CreateRole",
			Handler:    _RoleService_CreateRole_Handler,
		},
		{
			MethodName: "UpdateRole",
			Handler:    _RoleService_UpdateRole_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "role/v1/role.proto",
}

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

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.ServiceRegistrar, srv RoleServiceServer)

Types

type CreateRoleRequest

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

func (*CreateRoleRequest) Descriptor deprecated

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

Deprecated: Use CreateRoleRequest.ProtoReflect.Descriptor instead.

func (*CreateRoleRequest) GetRole

func (x *CreateRoleRequest) GetRole() *Role

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 CreateRoleResponse

type CreateRoleResponse struct {
	Role *Role `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateRoleResponse) Descriptor deprecated

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

Deprecated: Use CreateRoleResponse.ProtoReflect.Descriptor instead.

func (*CreateRoleResponse) GetRole

func (x *CreateRoleResponse) GetRole() *Role

func (*CreateRoleResponse) ProtoMessage

func (*CreateRoleResponse) ProtoMessage()

func (*CreateRoleResponse) ProtoReflect

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

func (*CreateRoleResponse) Reset

func (x *CreateRoleResponse) Reset()

func (*CreateRoleResponse) String

func (x *CreateRoleResponse) String() string

type GetRoleRequest

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

func (*GetRoleRequest) Descriptor deprecated

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

Deprecated: Use GetRoleRequest.ProtoReflect.Descriptor instead.

func (*GetRoleRequest) GetId

func (x *GetRoleRequest) GetId() 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 GetRoleResponse

type GetRoleResponse struct {
	Role *Role `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"`
	// contains filtered or unexported fields
}

func (*GetRoleResponse) Descriptor deprecated

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

Deprecated: Use GetRoleResponse.ProtoReflect.Descriptor instead.

func (*GetRoleResponse) GetRole

func (x *GetRoleResponse) GetRole() *Role

func (*GetRoleResponse) ProtoMessage

func (*GetRoleResponse) ProtoMessage()

func (*GetRoleResponse) ProtoReflect

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

func (*GetRoleResponse) Reset

func (x *GetRoleResponse) Reset()

func (*GetRoleResponse) String

func (x *GetRoleResponse) String() string

type ListRoleRequest

type ListRoleRequest struct {
	Page int32 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"`
	Size int32 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
	// contains filtered or unexported fields
}

func (*ListRoleRequest) Descriptor deprecated

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

Deprecated: Use ListRoleRequest.ProtoReflect.Descriptor instead.

func (*ListRoleRequest) GetPage

func (x *ListRoleRequest) GetPage() int32

func (*ListRoleRequest) GetSize

func (x *ListRoleRequest) GetSize() int32

func (*ListRoleRequest) ProtoMessage

func (*ListRoleRequest) ProtoMessage()

func (*ListRoleRequest) ProtoReflect

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

func (*ListRoleRequest) Reset

func (x *ListRoleRequest) Reset()

func (*ListRoleRequest) String

func (x *ListRoleRequest) String() string

type ListRoleResponse

type ListRoleResponse struct {
	Roles []*Role `protobuf:"bytes,1,rep,name=roles,proto3" json:"roles,omitempty"`
	Total int32   `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"`
	// contains filtered or unexported fields
}

func (*ListRoleResponse) Descriptor deprecated

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

Deprecated: Use ListRoleResponse.ProtoReflect.Descriptor instead.

func (*ListRoleResponse) GetRoles

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

func (*ListRoleResponse) GetTotal

func (x *ListRoleResponse) GetTotal() int32

func (*ListRoleResponse) ProtoMessage

func (*ListRoleResponse) ProtoMessage()

func (*ListRoleResponse) ProtoReflect

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

func (*ListRoleResponse) Reset

func (x *ListRoleResponse) Reset()

func (*ListRoleResponse) String

func (x *ListRoleResponse) String() string

type Role

type Role struct {
	Id        string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name      string                 `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	ApiGroup  string                 `protobuf:"bytes,3,opt,name=api_group,json=apiGroup,proto3" json:"api_group,omitempty"`
	Resource  string                 `protobuf:"bytes,4,opt,name=resource,proto3" json:"resource,omitempty"`
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,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) GetApiGroup

func (x *Role) GetApiGroup() string

func (*Role) GetCreatedAt

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

func (*Role) GetId

func (x *Role) GetId() string

func (*Role) GetName

func (x *Role) GetName() string

func (*Role) GetResource

func (x *Role) GetResource() string

func (*Role) GetUpdatedAt

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

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 {
	GetRole(ctx context.Context, in *GetRoleRequest, opts ...grpc.CallOption) (*GetRoleResponse, error)
	ListRole(ctx context.Context, in *ListRoleRequest, opts ...grpc.CallOption) (*ListRoleResponse, error)
	CreateRole(ctx context.Context, in *CreateRoleRequest, opts ...grpc.CallOption) (*CreateRoleResponse, error)
	UpdateRole(ctx context.Context, in *UpdateRoleRequest, opts ...grpc.CallOption) (*UpdateRoleResponse, error)
}

RoleServiceClient is the client API for RoleService 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.

type RoleServiceServer

RoleServiceServer is the server API for RoleService service. All implementations should embed UnimplementedRoleServiceServer for forward compatibility

type UnimplementedRoleServiceServer

type UnimplementedRoleServiceServer struct {
}

UnimplementedRoleServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedRoleServiceServer) CreateRole

func (UnimplementedRoleServiceServer) GetRole

func (UnimplementedRoleServiceServer) ListRole

func (UnimplementedRoleServiceServer) UpdateRole

type UnsafeRoleServiceServer

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

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

type UpdateRoleRequest

type UpdateRoleRequest struct {
	Role *Role `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateRoleRequest) Descriptor deprecated

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

Deprecated: Use UpdateRoleRequest.ProtoReflect.Descriptor instead.

func (*UpdateRoleRequest) GetRole

func (x *UpdateRoleRequest) GetRole() *Role

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

type UpdateRoleResponse

type UpdateRoleResponse struct {
	Role *Role `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateRoleResponse) Descriptor deprecated

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

Deprecated: Use UpdateRoleResponse.ProtoReflect.Descriptor instead.

func (*UpdateRoleResponse) GetRole

func (x *UpdateRoleResponse) GetRole() *Role

func (*UpdateRoleResponse) ProtoMessage

func (*UpdateRoleResponse) ProtoMessage()

func (*UpdateRoleResponse) ProtoReflect

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

func (*UpdateRoleResponse) Reset

func (x *UpdateRoleResponse) Reset()

func (*UpdateRoleResponse) String

func (x *UpdateRoleResponse) String() string

Jump to

Keyboard shortcuts

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