permpb

package
v0.0.0-...-48c4086 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2022 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const GroupServicePathPrefix = "/twirp/perm.v1.GroupService/"

GroupServicePathPrefix is a convenience constant that may identify URL paths. Should be used with caution, it only matches routes generated by Twirp Go clients, with the default "/twirp" prefix and default CamelCase service and method names. More info: https://twitchtv.github.io/twirp/docs/routing.html

View Source
const MenuServicePathPrefix = "/twirp/perm.v1.MenuService/"

MenuServicePathPrefix is a convenience constant that may identify URL paths. Should be used with caution, it only matches routes generated by Twirp Go clients, with the default "/twirp" prefix and default CamelCase service and method names. More info: https://twitchtv.github.io/twirp/docs/routing.html

View Source
const OrgServicePathPrefix = "/twirp/perm.v1.OrgService/"

OrgServicePathPrefix is a convenience constant that may identify URL paths. Should be used with caution, it only matches routes generated by Twirp Go clients, with the default "/twirp" prefix and default CamelCase service and method names. More info: https://twitchtv.github.io/twirp/docs/routing.html

View Source
const PermServicePathPrefix = "/twirp/perm.v1.PermService/"

PermServicePathPrefix is a convenience constant that may identify URL paths. Should be used with caution, it only matches routes generated by Twirp Go clients, with the default "/twirp" prefix and default CamelCase service and method names. More info: https://twitchtv.github.io/twirp/docs/routing.html

View Source
const RoleServicePathPrefix = "/twirp/perm.v1.RoleService/"

RoleServicePathPrefix is a convenience constant that may identify URL paths. Should be used with caution, it only matches routes generated by Twirp Go clients, with the default "/twirp" prefix and default CamelCase service and method names. More info: https://twitchtv.github.io/twirp/docs/routing.html

Variables

View Source
var File_perm_v1_group_proto protoreflect.FileDescriptor
View Source
var File_perm_v1_menu_proto protoreflect.FileDescriptor
View Source
var File_perm_v1_org_proto protoreflect.FileDescriptor
View Source
var File_perm_v1_perm_proto protoreflect.FileDescriptor
View Source
var File_perm_v1_role_proto protoreflect.FileDescriptor
View Source
var GroupService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "perm.v1.GroupService",
	HandlerType: (*GroupServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateGroup",
			Handler:    _GroupService_CreateGroup_Handler,
		},
		{
			MethodName: "DeleteGroup",
			Handler:    _GroupService_DeleteGroup_Handler,
		},
		{
			MethodName: "MoveGroup",
			Handler:    _GroupService_MoveGroup_Handler,
		},
		{
			MethodName: "ListGroups",
			Handler:    _GroupService_ListGroups_Handler,
		},
		{
			MethodName: "AddResForGroup",
			Handler:    _GroupService_AddResForGroup_Handler,
		},
		{
			MethodName: "DelResForGroup",
			Handler:    _GroupService_DelResForGroup_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "perm/v1/group.proto",
}

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

View Source
var MenuService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "perm.v1.MenuService",
	HandlerType: (*MenuServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ListMenus",
			Handler:    _MenuService_ListMenus_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "perm/v1/menu.proto",
}

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

View Source
var OrgService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "perm.v1.OrgService",
	HandlerType: (*OrgServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateOrg",
			Handler:    _OrgService_CreateOrg_Handler,
		},
		{
			MethodName: "DeleteOrg",
			Handler:    _OrgService_DeleteOrg_Handler,
		},
		{
			MethodName: "TransferOrg",
			Handler:    _OrgService_TransferOrg_Handler,
		},
		{
			MethodName: "ListOrg",
			Handler:    _OrgService_ListOrg_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "perm/v1/org.proto",
}

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

View Source
var PermService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "perm.v1.PermService",
	HandlerType: (*PermServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Enforce",
			Handler:    _PermService_Enforce_Handler,
		},
		{
			MethodName: "ListResources",
			Handler:    _PermService_ListResources_Handler,
		},
		{
			MethodName: "ListMenus",
			Handler:    _PermService_ListMenus_Handler,
		},
		{
			MethodName: "ListGroups",
			Handler:    _PermService_ListGroups_Handler,
		},
		{
			MethodName: "SaveRolePerm",
			Handler:    _PermService_SaveRolePerm_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "perm/v1/perm.proto",
}

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

View Source
var RoleService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "perm.v1.RoleService",
	HandlerType: (*RoleServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateRole",
			Handler:    _RoleService_CreateRole_Handler,
		},
		{
			MethodName: "DeleteRole",
			Handler:    _RoleService_DeleteRole_Handler,
		},
		{
			MethodName: "UpdateRole",
			Handler:    _RoleService_UpdateRole_Handler,
		},
		{
			MethodName: "GetRole",
			Handler:    _RoleService_GetRole_Handler,
		},
		{
			MethodName: "ListRoles",
			Handler:    _RoleService_ListRoles_Handler,
		},
		{
			MethodName: "AddRoleForUser",
			Handler:    _RoleService_AddRoleForUser_Handler,
		},
		{
			MethodName: "DelRoleForUser",
			Handler:    _RoleService_DelRoleForUser_Handler,
		},
		{
			MethodName: "GetRolesForUser",
			Handler:    _RoleService_GetRolesForUser_Handler,
		},
		{
			MethodName: "GetUsersForRole",
			Handler:    _RoleService_GetUsersForRole_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "perm/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 RegisterGroupServiceServer

func RegisterGroupServiceServer(s grpc.ServiceRegistrar, srv GroupServiceServer)

func RegisterMenuServiceServer

func RegisterMenuServiceServer(s grpc.ServiceRegistrar, srv MenuServiceServer)

func RegisterOrgServiceServer

func RegisterOrgServiceServer(s grpc.ServiceRegistrar, srv OrgServiceServer)

func RegisterPermServiceServer

func RegisterPermServiceServer(s grpc.ServiceRegistrar, srv PermServiceServer)

func RegisterRoleServiceServer

func RegisterRoleServiceServer(s grpc.ServiceRegistrar, srv RoleServiceServer)

func WriteError

func WriteError(resp http.ResponseWriter, err error)

WriteError writes an HTTP response with a valid Twirp error format (code, msg, meta). Useful outside of the Twirp server (e.g. http middleware), but does not trigger hooks. If err is not a twirp.Error, it will get wrapped with twirp.InternalErrorWith(err)

Types

type AddResForGroupRequest

type AddResForGroupRequest struct {
	OrgId     string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"`
	ResType   string `protobuf:"bytes,2,opt,name=res_type,json=resType,proto3" json:"res_type,omitempty"`
	GroupType string `protobuf:"bytes,3,opt,name=group_type,json=groupType,proto3" json:"group_type,omitempty"`
	GroupId   string `protobuf:"bytes,4,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
	ResId     string `protobuf:"bytes,5,opt,name=res_id,json=resId,proto3" json:"res_id,omitempty"`
	// contains filtered or unexported fields
}

func (*AddResForGroupRequest) Descriptor deprecated

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

Deprecated: Use AddResForGroupRequest.ProtoReflect.Descriptor instead.

func (*AddResForGroupRequest) GetGroupId

func (x *AddResForGroupRequest) GetGroupId() string

func (*AddResForGroupRequest) GetGroupType

func (x *AddResForGroupRequest) GetGroupType() string

func (*AddResForGroupRequest) GetOrgId

func (x *AddResForGroupRequest) GetOrgId() string

func (*AddResForGroupRequest) GetResId

func (x *AddResForGroupRequest) GetResId() string

func (*AddResForGroupRequest) GetResType

func (x *AddResForGroupRequest) GetResType() string

func (*AddResForGroupRequest) ProtoMessage

func (*AddResForGroupRequest) ProtoMessage()

func (*AddResForGroupRequest) ProtoReflect

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

func (*AddResForGroupRequest) Reset

func (x *AddResForGroupRequest) Reset()

func (*AddResForGroupRequest) String

func (x *AddResForGroupRequest) String() string

type AddResForGroupResponse

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

func (*AddResForGroupResponse) Descriptor deprecated

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

Deprecated: Use AddResForGroupResponse.ProtoReflect.Descriptor instead.

func (*AddResForGroupResponse) ProtoMessage

func (*AddResForGroupResponse) ProtoMessage()

func (*AddResForGroupResponse) ProtoReflect

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

func (*AddResForGroupResponse) Reset

func (x *AddResForGroupResponse) Reset()

func (*AddResForGroupResponse) String

func (x *AddResForGroupResponse) String() string

type AddRoleForUserRequest

type AddRoleForUserRequest struct {
	OrgId  string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"`
	UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	RoleId string `protobuf:"bytes,3,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"`
	// contains filtered or unexported fields
}

func (*AddRoleForUserRequest) Descriptor deprecated

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

Deprecated: Use AddRoleForUserRequest.ProtoReflect.Descriptor instead.

func (*AddRoleForUserRequest) GetOrgId

func (x *AddRoleForUserRequest) GetOrgId() string

func (*AddRoleForUserRequest) GetRoleId

func (x *AddRoleForUserRequest) GetRoleId() string

func (*AddRoleForUserRequest) GetUserId

func (x *AddRoleForUserRequest) GetUserId() string

func (*AddRoleForUserRequest) ProtoMessage

func (*AddRoleForUserRequest) ProtoMessage()

func (*AddRoleForUserRequest) ProtoReflect

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

func (*AddRoleForUserRequest) Reset

func (x *AddRoleForUserRequest) Reset()

func (*AddRoleForUserRequest) String

func (x *AddRoleForUserRequest) String() string

type AddRoleForUserResponse

type AddRoleForUserResponse struct {
	Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
	// contains filtered or unexported fields
}

func (*AddRoleForUserResponse) Descriptor deprecated

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

Deprecated: Use AddRoleForUserResponse.ProtoReflect.Descriptor instead.

func (*AddRoleForUserResponse) GetOk

func (x *AddRoleForUserResponse) GetOk() bool

func (*AddRoleForUserResponse) ProtoMessage

func (*AddRoleForUserResponse) ProtoMessage()

func (*AddRoleForUserResponse) ProtoReflect

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

func (*AddRoleForUserResponse) Reset

func (x *AddRoleForUserResponse) Reset()

func (*AddRoleForUserResponse) String

func (x *AddRoleForUserResponse) String() string

type CreateGroupRequest

type CreateGroupRequest struct {
	OrgId           string   `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"`
	ResType         string   `protobuf:"bytes,2,opt,name=res_type,json=resType,proto3" json:"res_type,omitempty"`
	GroupType       string   `protobuf:"bytes,3,opt,name=group_type,json=groupType,proto3" json:"group_type,omitempty"`
	GroupId         string   `protobuf:"bytes,4,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
	ParentGroupType string   `protobuf:"bytes,5,opt,name=parent_group_type,json=parentGroupType,proto3" json:"parent_group_type,omitempty"`
	ParentGroupId   string   `protobuf:"bytes,6,opt,name=parent_group_id,json=parentGroupId,proto3" json:"parent_group_id,omitempty"`
	Children        []string `protobuf:"bytes,7,rep,name=children,proto3" json:"children,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateGroupRequest) Descriptor deprecated

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

Deprecated: Use CreateGroupRequest.ProtoReflect.Descriptor instead.

func (*CreateGroupRequest) GetChildren

func (x *CreateGroupRequest) GetChildren() []string

func (*CreateGroupRequest) GetGroupId

func (x *CreateGroupRequest) GetGroupId() string

func (*CreateGroupRequest) GetGroupType

func (x *CreateGroupRequest) GetGroupType() string

func (*CreateGroupRequest) GetOrgId

func (x *CreateGroupRequest) GetOrgId() string

func (*CreateGroupRequest) GetParentGroupId

func (x *CreateGroupRequest) GetParentGroupId() string

func (*CreateGroupRequest) GetParentGroupType

func (x *CreateGroupRequest) GetParentGroupType() string

func (*CreateGroupRequest) GetResType

func (x *CreateGroupRequest) GetResType() string

func (*CreateGroupRequest) ProtoMessage

func (*CreateGroupRequest) ProtoMessage()

func (*CreateGroupRequest) ProtoReflect

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

func (*CreateGroupRequest) Reset

func (x *CreateGroupRequest) Reset()

func (*CreateGroupRequest) String

func (x *CreateGroupRequest) String() string

type CreateGroupResponse

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

func (*CreateGroupResponse) Descriptor deprecated

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

Deprecated: Use CreateGroupResponse.ProtoReflect.Descriptor instead.

func (*CreateGroupResponse) ProtoMessage

func (*CreateGroupResponse) ProtoMessage()

func (*CreateGroupResponse) ProtoReflect

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

func (*CreateGroupResponse) Reset

func (x *CreateGroupResponse) Reset()

func (*CreateGroupResponse) String

func (x *CreateGroupResponse) String() string

type CreateOrgRequest

type CreateOrgRequest struct {
	OrgId  string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"`
	UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateOrgRequest) Descriptor deprecated

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

Deprecated: Use CreateOrgRequest.ProtoReflect.Descriptor instead.

func (*CreateOrgRequest) GetOrgId

func (x *CreateOrgRequest) GetOrgId() string

func (*CreateOrgRequest) GetUserId

func (x *CreateOrgRequest) GetUserId() string

func (*CreateOrgRequest) ProtoMessage

func (*CreateOrgRequest) ProtoMessage()

func (*CreateOrgRequest) ProtoReflect

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

func (*CreateOrgRequest) Reset

func (x *CreateOrgRequest) Reset()

func (*CreateOrgRequest) String

func (x *CreateOrgRequest) String() string

type CreateOrgResponse

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

func (*CreateOrgResponse) Descriptor deprecated

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

Deprecated: Use CreateOrgResponse.ProtoReflect.Descriptor instead.

func (*CreateOrgResponse) ProtoMessage

func (*CreateOrgResponse) ProtoMessage()

func (*CreateOrgResponse) ProtoReflect

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

func (*CreateOrgResponse) Reset

func (x *CreateOrgResponse) Reset()

func (*CreateOrgResponse) String

func (x *CreateOrgResponse) String() string

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 DelResForGroupRequest

type DelResForGroupRequest struct {
	OrgId     string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"`
	ResType   string `protobuf:"bytes,2,opt,name=res_type,json=resType,proto3" json:"res_type,omitempty"`
	GroupType string `protobuf:"bytes,3,opt,name=group_type,json=groupType,proto3" json:"group_type,omitempty"`
	GroupId   string `protobuf:"bytes,4,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
	ResId     string `protobuf:"bytes,5,opt,name=res_id,json=resId,proto3" json:"res_id,omitempty"`
	// contains filtered or unexported fields
}

func (*DelResForGroupRequest) Descriptor deprecated

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

Deprecated: Use DelResForGroupRequest.ProtoReflect.Descriptor instead.

func (*DelResForGroupRequest) GetGroupId

func (x *DelResForGroupRequest) GetGroupId() string

func (*DelResForGroupRequest) GetGroupType

func (x *DelResForGroupRequest) GetGroupType() string

func (*DelResForGroupRequest) GetOrgId

func (x *DelResForGroupRequest) GetOrgId() string

func (*DelResForGroupRequest) GetResId

func (x *DelResForGroupRequest) GetResId() string

func (*DelResForGroupRequest) GetResType

func (x *DelResForGroupRequest) GetResType() string

func (*DelResForGroupRequest) ProtoMessage

func (*DelResForGroupRequest) ProtoMessage()

func (*DelResForGroupRequest) ProtoReflect

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

func (*DelResForGroupRequest) Reset

func (x *DelResForGroupRequest) Reset()

func (*DelResForGroupRequest) String

func (x *DelResForGroupRequest) String() string

type DelResForGroupResponse

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

func (*DelResForGroupResponse) Descriptor deprecated

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

Deprecated: Use DelResForGroupResponse.ProtoReflect.Descriptor instead.

func (*DelResForGroupResponse) ProtoMessage

func (*DelResForGroupResponse) ProtoMessage()

func (*DelResForGroupResponse) ProtoReflect

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

func (*DelResForGroupResponse) Reset

func (x *DelResForGroupResponse) Reset()

func (*DelResForGroupResponse) String

func (x *DelResForGroupResponse) String() string

type DelRoleForUserRequest

type DelRoleForUserRequest struct {
	OrgId  string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"`
	UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	RoleId string `protobuf:"bytes,3,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"`
	// contains filtered or unexported fields
}

func (*DelRoleForUserRequest) Descriptor deprecated

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

Deprecated: Use DelRoleForUserRequest.ProtoReflect.Descriptor instead.

func (*DelRoleForUserRequest) GetOrgId

func (x *DelRoleForUserRequest) GetOrgId() string

func (*DelRoleForUserRequest) GetRoleId

func (x *DelRoleForUserRequest) GetRoleId() string

func (*DelRoleForUserRequest) GetUserId

func (x *DelRoleForUserRequest) GetUserId() string

func (*DelRoleForUserRequest) ProtoMessage

func (*DelRoleForUserRequest) ProtoMessage()

func (*DelRoleForUserRequest) ProtoReflect

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

func (*DelRoleForUserRequest) Reset

func (x *DelRoleForUserRequest) Reset()

func (*DelRoleForUserRequest) String

func (x *DelRoleForUserRequest) String() string

type DelRoleForUserResponse

type DelRoleForUserResponse struct {
	Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
	// contains filtered or unexported fields
}

func (*DelRoleForUserResponse) Descriptor deprecated

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

Deprecated: Use DelRoleForUserResponse.ProtoReflect.Descriptor instead.

func (*DelRoleForUserResponse) GetOk

func (x *DelRoleForUserResponse) GetOk() bool

func (*DelRoleForUserResponse) ProtoMessage

func (*DelRoleForUserResponse) ProtoMessage()

func (*DelRoleForUserResponse) ProtoReflect

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

func (*DelRoleForUserResponse) Reset

func (x *DelRoleForUserResponse) Reset()

func (*DelRoleForUserResponse) String

func (x *DelRoleForUserResponse) String() string

type DeleteGroupRequest

type DeleteGroupRequest struct {
	OrgId           string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"`
	ResType         string `protobuf:"bytes,2,opt,name=res_type,json=resType,proto3" json:"res_type,omitempty"`
	GroupType       string `protobuf:"bytes,3,opt,name=group_type,json=groupType,proto3" json:"group_type,omitempty"`
	GroupId         string `protobuf:"bytes,4,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
	ParentGroupType string `protobuf:"bytes,5,opt,name=parent_group_type,json=parentGroupType,proto3" json:"parent_group_type,omitempty"`
	ParentGroupId   string `protobuf:"bytes,6,opt,name=parent_group_id,json=parentGroupId,proto3" json:"parent_group_id,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteGroupRequest) Descriptor deprecated

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

Deprecated: Use DeleteGroupRequest.ProtoReflect.Descriptor instead.

func (*DeleteGroupRequest) GetGroupId

func (x *DeleteGroupRequest) GetGroupId() string

func (*DeleteGroupRequest) GetGroupType

func (x *DeleteGroupRequest) GetGroupType() string

func (*DeleteGroupRequest) GetOrgId

func (x *DeleteGroupRequest) GetOrgId() string

func (*DeleteGroupRequest) GetParentGroupId

func (x *DeleteGroupRequest) GetParentGroupId() string

func (*DeleteGroupRequest) GetParentGroupType

func (x *DeleteGroupRequest) GetParentGroupType() string

func (*DeleteGroupRequest) GetResType

func (x *DeleteGroupRequest) GetResType() string

func (*DeleteGroupRequest) ProtoMessage

func (*DeleteGroupRequest) ProtoMessage()

func (*DeleteGroupRequest) ProtoReflect

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

func (*DeleteGroupRequest) Reset

func (x *DeleteGroupRequest) Reset()

func (*DeleteGroupRequest) String

func (x *DeleteGroupRequest) String() string

type DeleteGroupResponse

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

func (*DeleteGroupResponse) Descriptor deprecated

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

Deprecated: Use DeleteGroupResponse.ProtoReflect.Descriptor instead.

func (*DeleteGroupResponse) ProtoMessage

func (*DeleteGroupResponse) ProtoMessage()

func (*DeleteGroupResponse) ProtoReflect

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

func (*DeleteGroupResponse) Reset

func (x *DeleteGroupResponse) Reset()

func (*DeleteGroupResponse) String

func (x *DeleteGroupResponse) String() string

type DeleteOrgRequest

type DeleteOrgRequest struct {
	OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteOrgRequest) Descriptor deprecated

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

Deprecated: Use DeleteOrgRequest.ProtoReflect.Descriptor instead.

func (*DeleteOrgRequest) GetOrgId

func (x *DeleteOrgRequest) GetOrgId() string

func (*DeleteOrgRequest) ProtoMessage

func (*DeleteOrgRequest) ProtoMessage()

func (*DeleteOrgRequest) ProtoReflect

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

func (*DeleteOrgRequest) Reset

func (x *DeleteOrgRequest) Reset()

func (*DeleteOrgRequest) String

func (x *DeleteOrgRequest) String() string

type DeleteOrgResponse

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

func (*DeleteOrgResponse) Descriptor deprecated

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

Deprecated: Use DeleteOrgResponse.ProtoReflect.Descriptor instead.

func (*DeleteOrgResponse) ProtoMessage

func (*DeleteOrgResponse) ProtoMessage()

func (*DeleteOrgResponse) ProtoReflect

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

func (*DeleteOrgResponse) Reset

func (x *DeleteOrgResponse) Reset()

func (*DeleteOrgResponse) String

func (x *DeleteOrgResponse) String() string

type DeleteRoleRequest

type DeleteRoleRequest struct {
	Id    int32  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name  string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	OrgId string `protobuf:"bytes,4,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteRoleRequest) Descriptor deprecated

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

Deprecated: Use DeleteRoleRequest.ProtoReflect.Descriptor instead.

func (*DeleteRoleRequest) GetId

func (x *DeleteRoleRequest) GetId() int32

func (*DeleteRoleRequest) GetName

func (x *DeleteRoleRequest) GetName() string

func (*DeleteRoleRequest) GetOrgId

func (x *DeleteRoleRequest) GetOrgId() 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 DeleteRoleResponse

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

func (*DeleteRoleResponse) Descriptor deprecated

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

Deprecated: Use DeleteRoleResponse.ProtoReflect.Descriptor instead.

func (*DeleteRoleResponse) ProtoMessage

func (*DeleteRoleResponse) ProtoMessage()

func (*DeleteRoleResponse) ProtoReflect

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

func (*DeleteRoleResponse) Reset

func (x *DeleteRoleResponse) Reset()

func (*DeleteRoleResponse) String

func (x *DeleteRoleResponse) String() string

type EnforceRequest

type EnforceRequest struct {

	// organization
	OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"`
	// user_id or role_id must be selected
	UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	RoleId string `protobuf:"bytes,3,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"`
	// resource type, e.g. "box", "camera", "api", etc.
	ResType   string `protobuf:"bytes,4,opt,name=res_type,json=resType,proto3" json:"res_type,omitempty"`
	GroupType string `protobuf:"bytes,5,opt,name=group_type,json=groupType,proto3" json:"group_type,omitempty"`
	// resource id, e.g. "123", "/api/cameras", etc.
	ResId string `protobuf:"bytes,6,opt,name=res_id,json=resId,proto3" json:"res_id,omitempty"`
	// resource act, e.g. "post", "export", "play", "download", etc.
	Act string `protobuf:"bytes,7,opt,name=act,proto3" json:"act,omitempty"`
	// contains filtered or unexported fields
}

func (*EnforceRequest) Descriptor deprecated

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

Deprecated: Use EnforceRequest.ProtoReflect.Descriptor instead.

func (*EnforceRequest) GetAct

func (x *EnforceRequest) GetAct() string

func (*EnforceRequest) GetGroupType

func (x *EnforceRequest) GetGroupType() string

func (*EnforceRequest) GetOrgId

func (x *EnforceRequest) GetOrgId() string

func (*EnforceRequest) GetResId

func (x *EnforceRequest) GetResId() string

func (*EnforceRequest) GetResType

func (x *EnforceRequest) GetResType() string

func (*EnforceRequest) GetRoleId

func (x *EnforceRequest) GetRoleId() string

func (*EnforceRequest) GetUserId

func (x *EnforceRequest) GetUserId() string

func (*EnforceRequest) ProtoMessage

func (*EnforceRequest) ProtoMessage()

func (*EnforceRequest) ProtoReflect

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

func (*EnforceRequest) Reset

func (x *EnforceRequest) Reset()

func (*EnforceRequest) String

func (x *EnforceRequest) String() string

type EnforceResponse

type EnforceResponse struct {
	Ok   bool   `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
	Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"`
	// contains filtered or unexported fields
}

func (*EnforceResponse) Descriptor deprecated

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

Deprecated: Use EnforceResponse.ProtoReflect.Descriptor instead.

func (*EnforceResponse) GetCode

func (x *EnforceResponse) GetCode() string

func (*EnforceResponse) GetOk

func (x *EnforceResponse) GetOk() bool

func (*EnforceResponse) ProtoMessage

func (*EnforceResponse) ProtoMessage()

func (*EnforceResponse) ProtoReflect

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

func (*EnforceResponse) Reset

func (x *EnforceResponse) Reset()

func (*EnforceResponse) String

func (x *EnforceResponse) String() string

type GetRoleRequest

type GetRoleRequest struct {
	Id int32 `protobuf:"varint,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() int32

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 GetRolesForUserRequest

type GetRolesForUserRequest struct {
	OrgId  string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"`
	UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetRolesForUserRequest) Descriptor deprecated

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

Deprecated: Use GetRolesForUserRequest.ProtoReflect.Descriptor instead.

func (*GetRolesForUserRequest) GetOrgId

func (x *GetRolesForUserRequest) GetOrgId() string

func (*GetRolesForUserRequest) GetUserId

func (x *GetRolesForUserRequest) GetUserId() string

func (*GetRolesForUserRequest) ProtoMessage

func (*GetRolesForUserRequest) ProtoMessage()

func (*GetRolesForUserRequest) ProtoReflect

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

func (*GetRolesForUserRequest) Reset

func (x *GetRolesForUserRequest) Reset()

func (*GetRolesForUserRequest) String

func (x *GetRolesForUserRequest) String() string

type GetRolesForUserResponse

type GetRolesForUserResponse struct {
	Roles []string `protobuf:"bytes,1,rep,name=roles,proto3" json:"roles,omitempty"`
	// contains filtered or unexported fields
}

func (*GetRolesForUserResponse) Descriptor deprecated

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

Deprecated: Use GetRolesForUserResponse.ProtoReflect.Descriptor instead.

func (*GetRolesForUserResponse) GetRoles

func (x *GetRolesForUserResponse) GetRoles() []string

func (*GetRolesForUserResponse) ProtoMessage

func (*GetRolesForUserResponse) ProtoMessage()

func (*GetRolesForUserResponse) ProtoReflect

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

func (*GetRolesForUserResponse) Reset

func (x *GetRolesForUserResponse) Reset()

func (*GetRolesForUserResponse) String

func (x *GetRolesForUserResponse) String() string

type GetUsersForRoleRequest

type GetUsersForRoleRequest struct {
	OrgId  string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"`
	RoleId string `protobuf:"bytes,2,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUsersForRoleRequest) Descriptor deprecated

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

Deprecated: Use GetUsersForRoleRequest.ProtoReflect.Descriptor instead.

func (*GetUsersForRoleRequest) GetOrgId

func (x *GetUsersForRoleRequest) GetOrgId() string

func (*GetUsersForRoleRequest) GetRoleId

func (x *GetUsersForRoleRequest) GetRoleId() string

func (*GetUsersForRoleRequest) ProtoMessage

func (*GetUsersForRoleRequest) ProtoMessage()

func (*GetUsersForRoleRequest) ProtoReflect

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

func (*GetUsersForRoleRequest) Reset

func (x *GetUsersForRoleRequest) Reset()

func (*GetUsersForRoleRequest) String

func (x *GetUsersForRoleRequest) String() string

type GetUsersForRoleResponse

type GetUsersForRoleResponse struct {
	Users []string `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUsersForRoleResponse) Descriptor deprecated

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

Deprecated: Use GetUsersForRoleResponse.ProtoReflect.Descriptor instead.

func (*GetUsersForRoleResponse) GetUsers

func (x *GetUsersForRoleResponse) GetUsers() []string

func (*GetUsersForRoleResponse) ProtoMessage

func (*GetUsersForRoleResponse) ProtoMessage()

func (*GetUsersForRoleResponse) ProtoReflect

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

func (*GetUsersForRoleResponse) Reset

func (x *GetUsersForRoleResponse) Reset()

func (*GetUsersForRoleResponse) String

func (x *GetUsersForRoleResponse) String() string

type Group

type Group struct {
	ResType   string   `protobuf:"bytes,1,opt,name=res_type,json=resType,proto3" json:"res_type,omitempty"`
	GroupType string   `protobuf:"bytes,2,opt,name=group_type,json=groupType,proto3" json:"group_type,omitempty"`
	GroupId   string   `protobuf:"bytes,3,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
	Resources []string `protobuf:"bytes,4,rep,name=resources,proto3" json:"resources,omitempty"`
	Children  []*Group `protobuf:"bytes,5,rep,name=children,proto3" json:"children,omitempty"`
	// contains filtered or unexported fields
}

func (*Group) Descriptor deprecated

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

Deprecated: Use Group.ProtoReflect.Descriptor instead.

func (*Group) GetChildren

func (x *Group) GetChildren() []*Group

func (*Group) GetGroupId

func (x *Group) GetGroupId() string

func (*Group) GetGroupType

func (x *Group) GetGroupType() string

func (*Group) GetResType

func (x *Group) GetResType() string

func (*Group) GetResources

func (x *Group) GetResources() []string

func (*Group) ProtoMessage

func (*Group) ProtoMessage()

func (*Group) ProtoReflect

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

func (*Group) Reset

func (x *Group) Reset()

func (*Group) String

func (x *Group) String() string

type GroupService

type GroupService interface {
	// create group node, if parent is null, parent is root node
	// each resource has a root under each org
	// root node => group/{res_type}/org/org_{org_id}
	CreateGroup(context.Context, *CreateGroupRequest) (*CreateGroupResponse, error)

	// delete group node, if parent is null, parent is root node
	DeleteGroup(context.Context, *DeleteGroupRequest) (*DeleteGroupResponse, error)

	// move group node, if to_group is null, to_group is root node
	MoveGroup(context.Context, *MoveGroupRequest) (*MoveGroupResponse, error)

	// list group tree
	// The returned result is a tree structure
	// {org_id} and {res_type} are a required
	ListGroups(context.Context, *ListGroupsRequest) (*ListGroupsResponse, error)

	// add resource to group node, if parent is null, parent is root node
	AddResForGroup(context.Context, *AddResForGroupRequest) (*AddResForGroupResponse, error)

	// delete resource from group node, if parent is null, parent is root node
	DelResForGroup(context.Context, *DelResForGroupRequest) (*DelResForGroupResponse, error)
}

group grpc service, group is a tree managed by casbin

func NewGroupServiceJSONClient

func NewGroupServiceJSONClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) GroupService

NewGroupServiceJSONClient creates a JSON client that implements the GroupService interface. It communicates using JSON and can be configured with a custom HTTPClient.

func NewGroupServiceProtobufClient

func NewGroupServiceProtobufClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) GroupService

NewGroupServiceProtobufClient creates a Protobuf client that implements the GroupService interface. It communicates using Protobuf and can be configured with a custom HTTPClient.

type GroupServiceClient

type GroupServiceClient interface {
	// create group node, if parent is null, parent is root node
	// each resource has a root under each org
	// root node => group/{res_type}/org/org_{org_id}
	CreateGroup(ctx context.Context, in *CreateGroupRequest, opts ...grpc.CallOption) (*CreateGroupResponse, error)
	// delete group node, if parent is null, parent is root node
	DeleteGroup(ctx context.Context, in *DeleteGroupRequest, opts ...grpc.CallOption) (*DeleteGroupResponse, error)
	// move group node, if to_group is null, to_group is root node
	MoveGroup(ctx context.Context, in *MoveGroupRequest, opts ...grpc.CallOption) (*MoveGroupResponse, error)
	// list group tree
	// The returned result is a tree structure
	// {org_id} and {res_type} are a required
	ListGroups(ctx context.Context, in *ListGroupsRequest, opts ...grpc.CallOption) (*ListGroupsResponse, error)
	// add resource to group node, if parent is null, parent is root node
	AddResForGroup(ctx context.Context, in *AddResForGroupRequest, opts ...grpc.CallOption) (*AddResForGroupResponse, error)
	// delete resource from group node, if parent is null, parent is root node
	DelResForGroup(ctx context.Context, in *DelResForGroupRequest, opts ...grpc.CallOption) (*DelResForGroupResponse, error)
}

GroupServiceClient is the client API for GroupService 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 GroupServiceServer

type GroupServiceServer interface {
	// create group node, if parent is null, parent is root node
	// each resource has a root under each org
	// root node => group/{res_type}/org/org_{org_id}
	CreateGroup(context.Context, *CreateGroupRequest) (*CreateGroupResponse, error)
	// delete group node, if parent is null, parent is root node
	DeleteGroup(context.Context, *DeleteGroupRequest) (*DeleteGroupResponse, error)
	// move group node, if to_group is null, to_group is root node
	MoveGroup(context.Context, *MoveGroupRequest) (*MoveGroupResponse, error)
	// list group tree
	// The returned result is a tree structure
	// {org_id} and {res_type} are a required
	ListGroups(context.Context, *ListGroupsRequest) (*ListGroupsResponse, error)
	// add resource to group node, if parent is null, parent is root node
	AddResForGroup(context.Context, *AddResForGroupRequest) (*AddResForGroupResponse, error)
	// delete resource from group node, if parent is null, parent is root node
	DelResForGroup(context.Context, *DelResForGroupRequest) (*DelResForGroupResponse, error)
}

GroupServiceServer is the server API for GroupService service. All implementations should embed UnimplementedGroupServiceServer for forward compatibility

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

HTTPClient is the interface used by generated clients to send HTTP requests. It is fulfilled by *(net/http).Client, which is sufficient for most users. Users can provide their own implementation for special retry policies.

HTTPClient implementations should not follow redirects. Redirects are automatically disabled if *(net/http).Client is passed to client constructors. See the withoutRedirects function in this file for more details.

type ListGroupsRequest

type ListGroupsRequest struct {
	OrgId   string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"`
	ResType string `protobuf:"bytes,2,opt,name=res_type,json=resType,proto3" json:"res_type,omitempty"`
	// contains filtered or unexported fields
}

func (*ListGroupsRequest) Descriptor deprecated

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

Deprecated: Use ListGroupsRequest.ProtoReflect.Descriptor instead.

func (*ListGroupsRequest) GetOrgId

func (x *ListGroupsRequest) GetOrgId() string

func (*ListGroupsRequest) GetResType

func (x *ListGroupsRequest) GetResType() string

func (*ListGroupsRequest) ProtoMessage

func (*ListGroupsRequest) ProtoMessage()

func (*ListGroupsRequest) ProtoReflect

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

func (*ListGroupsRequest) Reset

func (x *ListGroupsRequest) Reset()

func (*ListGroupsRequest) String

func (x *ListGroupsRequest) String() string

type ListGroupsResponse

type ListGroupsResponse struct {
	Groups []*Group `protobuf:"bytes,1,rep,name=groups,proto3" json:"groups,omitempty"`
	// contains filtered or unexported fields
}

func (*ListGroupsResponse) Descriptor deprecated

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

Deprecated: Use ListGroupsResponse.ProtoReflect.Descriptor instead.

func (*ListGroupsResponse) GetGroups

func (x *ListGroupsResponse) GetGroups() []*Group

func (*ListGroupsResponse) ProtoMessage

func (*ListGroupsResponse) ProtoMessage()

func (*ListGroupsResponse) ProtoReflect

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

func (*ListGroupsResponse) Reset

func (x *ListGroupsResponse) Reset()

func (*ListGroupsResponse) String

func (x *ListGroupsResponse) String() string

type ListMenusRequest

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

func (*ListMenusRequest) Descriptor deprecated

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

Deprecated: Use ListMenusRequest.ProtoReflect.Descriptor instead.

func (*ListMenusRequest) GetPlatform

func (x *ListMenusRequest) GetPlatform() string

func (*ListMenusRequest) ProtoMessage

func (*ListMenusRequest) ProtoMessage()

func (*ListMenusRequest) ProtoReflect

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

func (*ListMenusRequest) Reset

func (x *ListMenusRequest) Reset()

func (*ListMenusRequest) String

func (x *ListMenusRequest) String() string

type ListMenusResponse

type ListMenusResponse struct {
	Items []*MenuItem `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

func (*ListMenusResponse) Descriptor deprecated

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

Deprecated: Use ListMenusResponse.ProtoReflect.Descriptor instead.

func (*ListMenusResponse) GetItems

func (x *ListMenusResponse) GetItems() []*MenuItem

func (*ListMenusResponse) ProtoMessage

func (*ListMenusResponse) ProtoMessage()

func (*ListMenusResponse) ProtoReflect

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

func (*ListMenusResponse) Reset

func (x *ListMenusResponse) Reset()

func (*ListMenusResponse) String

func (x *ListMenusResponse) String() string

type ListOrgRequest

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

func (*ListOrgRequest) Descriptor deprecated

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

Deprecated: Use ListOrgRequest.ProtoReflect.Descriptor instead.

func (*ListOrgRequest) ProtoMessage

func (*ListOrgRequest) ProtoMessage()

func (*ListOrgRequest) ProtoReflect

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

func (*ListOrgRequest) Reset

func (x *ListOrgRequest) Reset()

func (*ListOrgRequest) String

func (x *ListOrgRequest) String() string

type ListOrgResponse

type ListOrgResponse struct {
	Orgs []string `protobuf:"bytes,1,rep,name=orgs,proto3" json:"orgs,omitempty"`
	// contains filtered or unexported fields
}

func (*ListOrgResponse) Descriptor deprecated

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

Deprecated: Use ListOrgResponse.ProtoReflect.Descriptor instead.

func (*ListOrgResponse) GetOrgs

func (x *ListOrgResponse) GetOrgs() []string

func (*ListOrgResponse) ProtoMessage

func (*ListOrgResponse) ProtoMessage()

func (*ListOrgResponse) ProtoReflect

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

func (*ListOrgResponse) Reset

func (x *ListOrgResponse) Reset()

func (*ListOrgResponse) String

func (x *ListOrgResponse) String() string

type ListRolesRequest

type ListRolesRequest struct {
	OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"`
	// contains filtered or unexported fields
}

func (*ListRolesRequest) Descriptor deprecated

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

Deprecated: Use ListRolesRequest.ProtoReflect.Descriptor instead.

func (*ListRolesRequest) GetOrgId

func (x *ListRolesRequest) GetOrgId() string

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"`
	// contains filtered or unexported fields
}

func (*ListRolesResponse) Descriptor deprecated

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

Deprecated: Use ListRolesResponse.ProtoReflect.Descriptor instead.

func (*ListRolesResponse) GetRoles

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

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 MenuItem struct {
	Code     string      `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
	Type     string      `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	Name     string      `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	Children []*MenuItem `protobuf:"bytes,4,rep,name=children,proto3" json:"children,omitempty"`
	// contains filtered or unexported fields
}
func (*MenuItem) Descriptor() ([]byte, []int)

Deprecated: Use MenuItem.ProtoReflect.Descriptor instead.

func (x *MenuItem) GetChildren() []*MenuItem
func (x *MenuItem) GetCode() string
func (x *MenuItem) GetName() string
func (x *MenuItem) GetType() string
func (*MenuItem) ProtoMessage()
func (x *MenuItem) ProtoReflect() protoreflect.Message
func (x *MenuItem) Reset()
func (x *MenuItem) String() string
type MenuService interface {
	// ListMenus returns available menus with hierarchy.
	ListMenus(context.Context, *ListMenusRequest) (*ListMenusResponse, error)
}

func NewMenuServiceJSONClient

func NewMenuServiceJSONClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) MenuService

NewMenuServiceJSONClient creates a JSON client that implements the MenuService interface. It communicates using JSON and can be configured with a custom HTTPClient.

func NewMenuServiceProtobufClient

func NewMenuServiceProtobufClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) MenuService

NewMenuServiceProtobufClient creates a Protobuf client that implements the MenuService interface. It communicates using Protobuf and can be configured with a custom HTTPClient.

type MenuServiceClient interface {
	// ListMenus returns available menus with hierarchy.
	ListMenus(ctx context.Context, in *ListMenusRequest, opts ...grpc.CallOption) (*ListMenusResponse, error)
}

MenuServiceClient is the client API for MenuService 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 MenuServiceServer interface {
	// ListMenus returns available menus with hierarchy.
	ListMenus(context.Context, *ListMenusRequest) (*ListMenusResponse, error)
}

MenuServiceServer is the server API for MenuService service. All implementations should embed UnimplementedMenuServiceServer for forward compatibility

type MoveGroupRequest

type MoveGroupRequest struct {
	OrgId         string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"`
	ResType       string `protobuf:"bytes,2,opt,name=res_type,json=resType,proto3" json:"res_type,omitempty"`
	FromGroupType string `protobuf:"bytes,3,opt,name=from_group_type,json=fromGroupType,proto3" json:"from_group_type,omitempty"`
	FromGroupId   string `protobuf:"bytes,4,opt,name=from_group_id,json=fromGroupId,proto3" json:"from_group_id,omitempty"`
	CurGroupType  string `protobuf:"bytes,5,opt,name=cur_group_type,json=curGroupType,proto3" json:"cur_group_type,omitempty"`
	CurGroupId    string `protobuf:"bytes,6,opt,name=cur_group_id,json=curGroupId,proto3" json:"cur_group_id,omitempty"`
	ToGroupType   string `protobuf:"bytes,7,opt,name=to_group_type,json=toGroupType,proto3" json:"to_group_type,omitempty"`
	ToGroupId     string `protobuf:"bytes,8,opt,name=to_group_id,json=toGroupId,proto3" json:"to_group_id,omitempty"`
	// contains filtered or unexported fields
}

func (*MoveGroupRequest) Descriptor deprecated

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

Deprecated: Use MoveGroupRequest.ProtoReflect.Descriptor instead.

func (*MoveGroupRequest) GetCurGroupId

func (x *MoveGroupRequest) GetCurGroupId() string

func (*MoveGroupRequest) GetCurGroupType

func (x *MoveGroupRequest) GetCurGroupType() string

func (*MoveGroupRequest) GetFromGroupId

func (x *MoveGroupRequest) GetFromGroupId() string

func (*MoveGroupRequest) GetFromGroupType

func (x *MoveGroupRequest) GetFromGroupType() string

func (*MoveGroupRequest) GetOrgId

func (x *MoveGroupRequest) GetOrgId() string

func (*MoveGroupRequest) GetResType

func (x *MoveGroupRequest) GetResType() string

func (*MoveGroupRequest) GetToGroupId

func (x *MoveGroupRequest) GetToGroupId() string

func (*MoveGroupRequest) GetToGroupType

func (x *MoveGroupRequest) GetToGroupType() string

func (*MoveGroupRequest) ProtoMessage

func (*MoveGroupRequest) ProtoMessage()

func (*MoveGroupRequest) ProtoReflect

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

func (*MoveGroupRequest) Reset

func (x *MoveGroupRequest) Reset()

func (*MoveGroupRequest) String

func (x *MoveGroupRequest) String() string

type MoveGroupResponse

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

func (*MoveGroupResponse) Descriptor deprecated

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

Deprecated: Use MoveGroupResponse.ProtoReflect.Descriptor instead.

func (*MoveGroupResponse) ProtoMessage

func (*MoveGroupResponse) ProtoMessage()

func (*MoveGroupResponse) ProtoReflect

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

func (*MoveGroupResponse) Reset

func (x *MoveGroupResponse) Reset()

func (*MoveGroupResponse) String

func (x *MoveGroupResponse) String() string

type OrgService

type OrgService interface {
	// CreateOrg init org, create org role and bind all function permissions, the method is idempotent
	// {org_id} is required
	// when {user_id} is set, {user_id} will be admin
	CreateOrg(context.Context, *CreateOrgRequest) (*CreateOrgResponse, error)

	// delete org all perms and data
	// {org_id} is required
	DeleteOrg(context.Context, *DeleteOrgRequest) (*DeleteOrgResponse, error)

	// transfer org admin to {new_user_id}, then {user_id} will only lose the admin role, and other roles will be retained
	// all parameters are required
	TransferOrg(context.Context, *TransferOrgRequest) (*TransferOrgResponse, error)

	// list all org
	ListOrg(context.Context, *ListOrgRequest) (*ListOrgResponse, error)
}

org grpc service, OrgSrv provides org info inside RBAC instead of global

func NewOrgServiceJSONClient

func NewOrgServiceJSONClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) OrgService

NewOrgServiceJSONClient creates a JSON client that implements the OrgService interface. It communicates using JSON and can be configured with a custom HTTPClient.

func NewOrgServiceProtobufClient

func NewOrgServiceProtobufClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) OrgService

NewOrgServiceProtobufClient creates a Protobuf client that implements the OrgService interface. It communicates using Protobuf and can be configured with a custom HTTPClient.

type OrgServiceClient

type OrgServiceClient interface {
	// CreateOrg init org, create org role and bind all function permissions, the method is idempotent
	// {org_id} is required
	// when {user_id} is set, {user_id} will be admin
	CreateOrg(ctx context.Context, in *CreateOrgRequest, opts ...grpc.CallOption) (*CreateOrgResponse, error)
	// delete org all perms and data
	// {org_id} is required
	DeleteOrg(ctx context.Context, in *DeleteOrgRequest, opts ...grpc.CallOption) (*DeleteOrgResponse, error)
	// transfer org admin to {new_user_id}, then {user_id} will only lose the admin role, and other roles will be retained
	// all parameters are required
	TransferOrg(ctx context.Context, in *TransferOrgRequest, opts ...grpc.CallOption) (*TransferOrgResponse, error)
	// list all org
	ListOrg(ctx context.Context, in *ListOrgRequest, opts ...grpc.CallOption) (*ListOrgResponse, error)
}

OrgServiceClient is the client API for OrgService 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 NewOrgServiceClient

func NewOrgServiceClient(cc grpc.ClientConnInterface) OrgServiceClient

type OrgServiceServer

type OrgServiceServer interface {
	// CreateOrg init org, create org role and bind all function permissions, the method is idempotent
	// {org_id} is required
	// when {user_id} is set, {user_id} will be admin
	CreateOrg(context.Context, *CreateOrgRequest) (*CreateOrgResponse, error)
	// delete org all perms and data
	// {org_id} is required
	DeleteOrg(context.Context, *DeleteOrgRequest) (*DeleteOrgResponse, error)
	// transfer org admin to {new_user_id}, then {user_id} will only lose the admin role, and other roles will be retained
	// all parameters are required
	TransferOrg(context.Context, *TransferOrgRequest) (*TransferOrgResponse, error)
	// list all org
	ListOrg(context.Context, *ListOrgRequest) (*ListOrgResponse, error)
}

OrgServiceServer is the server API for OrgService service. All implementations should embed UnimplementedOrgServiceServer for forward compatibility

type PermGroup

type PermGroup struct {
	ResType   string       `protobuf:"bytes,1,opt,name=res_type,json=resType,proto3" json:"res_type,omitempty"`
	GroupType string       `protobuf:"bytes,2,opt,name=group_type,json=groupType,proto3" json:"group_type,omitempty"`
	GroupId   string       `protobuf:"bytes,3,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
	Resources []string     `protobuf:"bytes,4,rep,name=resources,proto3" json:"resources,omitempty"`
	Children  []*PermGroup `protobuf:"bytes,5,rep,name=children,proto3" json:"children,omitempty"`
	Acts      []string     `protobuf:"bytes,6,rep,name=acts,proto3" json:"acts,omitempty"`
	// contains filtered or unexported fields
}

func (*PermGroup) Descriptor deprecated

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

Deprecated: Use PermGroup.ProtoReflect.Descriptor instead.

func (*PermGroup) GetActs

func (x *PermGroup) GetActs() []string

func (*PermGroup) GetChildren

func (x *PermGroup) GetChildren() []*PermGroup

func (*PermGroup) GetGroupId

func (x *PermGroup) GetGroupId() string

func (*PermGroup) GetGroupType

func (x *PermGroup) GetGroupType() string

func (*PermGroup) GetResType

func (x *PermGroup) GetResType() string

func (*PermGroup) GetResources

func (x *PermGroup) GetResources() []string

func (*PermGroup) ProtoMessage

func (*PermGroup) ProtoMessage()

func (*PermGroup) ProtoReflect

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

func (*PermGroup) Reset

func (x *PermGroup) Reset()

func (*PermGroup) String

func (x *PermGroup) String() string

type PermService

Perm grpc service, Perm for authentication and resource list

func NewPermServiceJSONClient

func NewPermServiceJSONClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) PermService

NewPermServiceJSONClient creates a JSON client that implements the PermService interface. It communicates using JSON and can be configured with a custom HTTPClient.

func NewPermServiceProtobufClient

func NewPermServiceProtobufClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) PermService

NewPermServiceProtobufClient creates a Protobuf client that implements the PermService interface. It communicates using Protobuf and can be configured with a custom HTTPClient.

type PermServiceClient

PermServiceClient is the client API for PermService 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 PermServiceListGroupsRequest

type PermServiceListGroupsRequest struct {
	OrgId   string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"`
	UserId  string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	RoleId  string `protobuf:"bytes,3,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"`
	ResType string `protobuf:"bytes,4,opt,name=res_type,json=resType,proto3" json:"res_type,omitempty"`
	Act     string `protobuf:"bytes,5,opt,name=act,proto3" json:"act,omitempty"`
	// contains filtered or unexported fields
}

func (*PermServiceListGroupsRequest) Descriptor deprecated

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

Deprecated: Use PermServiceListGroupsRequest.ProtoReflect.Descriptor instead.

func (*PermServiceListGroupsRequest) GetAct

func (*PermServiceListGroupsRequest) GetOrgId

func (x *PermServiceListGroupsRequest) GetOrgId() string

func (*PermServiceListGroupsRequest) GetResType

func (x *PermServiceListGroupsRequest) GetResType() string

func (*PermServiceListGroupsRequest) GetRoleId

func (x *PermServiceListGroupsRequest) GetRoleId() string

func (*PermServiceListGroupsRequest) GetUserId

func (x *PermServiceListGroupsRequest) GetUserId() string

func (*PermServiceListGroupsRequest) ProtoMessage

func (*PermServiceListGroupsRequest) ProtoMessage()

func (*PermServiceListGroupsRequest) ProtoReflect

func (*PermServiceListGroupsRequest) Reset

func (x *PermServiceListGroupsRequest) Reset()

func (*PermServiceListGroupsRequest) String

type PermServiceListGroupsResponse

type PermServiceListGroupsResponse struct {
	Groups []*PermGroup `protobuf:"bytes,1,rep,name=groups,proto3" json:"groups,omitempty"`
	// contains filtered or unexported fields
}

func (*PermServiceListGroupsResponse) Descriptor deprecated

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

Deprecated: Use PermServiceListGroupsResponse.ProtoReflect.Descriptor instead.

func (*PermServiceListGroupsResponse) GetGroups

func (x *PermServiceListGroupsResponse) GetGroups() []*PermGroup

func (*PermServiceListGroupsResponse) ProtoMessage

func (*PermServiceListGroupsResponse) ProtoMessage()

func (*PermServiceListGroupsResponse) ProtoReflect

func (*PermServiceListGroupsResponse) Reset

func (x *PermServiceListGroupsResponse) Reset()

func (*PermServiceListGroupsResponse) String

type PermServiceListMenusRequest

type PermServiceListMenusRequest struct {
	OrgId    string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"`
	UserId   string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	RoleId   string `protobuf:"bytes,3,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"`
	Platform string `protobuf:"bytes,4,opt,name=platform,proto3" json:"platform,omitempty"`
	// contains filtered or unexported fields
}

func (*PermServiceListMenusRequest) Descriptor deprecated

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

Deprecated: Use PermServiceListMenusRequest.ProtoReflect.Descriptor instead.

func (*PermServiceListMenusRequest) GetOrgId

func (x *PermServiceListMenusRequest) GetOrgId() string

func (*PermServiceListMenusRequest) GetPlatform

func (x *PermServiceListMenusRequest) GetPlatform() string

func (*PermServiceListMenusRequest) GetRoleId

func (x *PermServiceListMenusRequest) GetRoleId() string

func (*PermServiceListMenusRequest) GetUserId

func (x *PermServiceListMenusRequest) GetUserId() string

func (*PermServiceListMenusRequest) ProtoMessage

func (*PermServiceListMenusRequest) ProtoMessage()

func (*PermServiceListMenusRequest) ProtoReflect

func (*PermServiceListMenusRequest) Reset

func (x *PermServiceListMenusRequest) Reset()

func (*PermServiceListMenusRequest) String

func (x *PermServiceListMenusRequest) String() string

type PermServiceListMenusResponse

type PermServiceListMenusResponse struct {
	Items []*MenuItem `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

func (*PermServiceListMenusResponse) Descriptor deprecated

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

Deprecated: Use PermServiceListMenusResponse.ProtoReflect.Descriptor instead.

func (*PermServiceListMenusResponse) GetItems

func (x *PermServiceListMenusResponse) GetItems() []*MenuItem

func (*PermServiceListMenusResponse) ProtoMessage

func (*PermServiceListMenusResponse) ProtoMessage()

func (*PermServiceListMenusResponse) ProtoReflect

func (*PermServiceListMenusResponse) Reset

func (x *PermServiceListMenusResponse) Reset()

func (*PermServiceListMenusResponse) String

type PermServiceListResourcesRequest

type PermServiceListResourcesRequest struct {
	OrgId   string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"`
	UserId  string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	RoleId  string `protobuf:"bytes,3,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"`
	ResType string `protobuf:"bytes,4,opt,name=res_type,json=resType,proto3" json:"res_type,omitempty"`
	Act     string `protobuf:"bytes,5,opt,name=act,proto3" json:"act,omitempty"`
	// contains filtered or unexported fields
}

func (*PermServiceListResourcesRequest) Descriptor deprecated

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

Deprecated: Use PermServiceListResourcesRequest.ProtoReflect.Descriptor instead.

func (*PermServiceListResourcesRequest) GetAct

func (*PermServiceListResourcesRequest) GetOrgId

func (*PermServiceListResourcesRequest) GetResType

func (x *PermServiceListResourcesRequest) GetResType() string

func (*PermServiceListResourcesRequest) GetRoleId

func (x *PermServiceListResourcesRequest) GetRoleId() string

func (*PermServiceListResourcesRequest) GetUserId

func (x *PermServiceListResourcesRequest) GetUserId() string

func (*PermServiceListResourcesRequest) ProtoMessage

func (*PermServiceListResourcesRequest) ProtoMessage()

func (*PermServiceListResourcesRequest) ProtoReflect

func (*PermServiceListResourcesRequest) Reset

func (*PermServiceListResourcesRequest) String

type PermServiceListResourcesResponse

type PermServiceListResourcesResponse struct {
	Resources []*Resource `protobuf:"bytes,1,rep,name=resources,proto3" json:"resources,omitempty"`
	// contains filtered or unexported fields
}

func (*PermServiceListResourcesResponse) Descriptor deprecated

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

Deprecated: Use PermServiceListResourcesResponse.ProtoReflect.Descriptor instead.

func (*PermServiceListResourcesResponse) GetResources

func (x *PermServiceListResourcesResponse) GetResources() []*Resource

func (*PermServiceListResourcesResponse) ProtoMessage

func (*PermServiceListResourcesResponse) ProtoMessage()

func (*PermServiceListResourcesResponse) ProtoReflect

func (*PermServiceListResourcesResponse) Reset

func (*PermServiceListResourcesResponse) String

type PermServiceSaveRolePermRequest

type PermServiceSaveRolePermRequest struct {
	OrgId  string                                  `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"`
	RoleId string                                  `protobuf:"bytes,2,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"`
	Menus  []string                                `protobuf:"bytes,3,rep,name=menus,proto3" json:"menus,omitempty"`
	Groups []*PermServiceSaveRolePermRequest_Group `protobuf:"bytes,4,rep,name=groups,proto3" json:"groups,omitempty"`
	// contains filtered or unexported fields
}

func (*PermServiceSaveRolePermRequest) Descriptor deprecated

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

Deprecated: Use PermServiceSaveRolePermRequest.ProtoReflect.Descriptor instead.

func (*PermServiceSaveRolePermRequest) GetGroups

func (*PermServiceSaveRolePermRequest) GetMenus

func (x *PermServiceSaveRolePermRequest) GetMenus() []string

func (*PermServiceSaveRolePermRequest) GetOrgId

func (x *PermServiceSaveRolePermRequest) GetOrgId() string

func (*PermServiceSaveRolePermRequest) GetRoleId

func (x *PermServiceSaveRolePermRequest) GetRoleId() string

func (*PermServiceSaveRolePermRequest) ProtoMessage

func (*PermServiceSaveRolePermRequest) ProtoMessage()

func (*PermServiceSaveRolePermRequest) ProtoReflect

func (*PermServiceSaveRolePermRequest) Reset

func (x *PermServiceSaveRolePermRequest) Reset()

func (*PermServiceSaveRolePermRequest) String

type PermServiceSaveRolePermRequest_Group

type PermServiceSaveRolePermRequest_Group struct {
	ResType   string `protobuf:"bytes,1,opt,name=res_type,json=resType,proto3" json:"res_type,omitempty"`
	GroupType string `protobuf:"bytes,2,opt,name=group_type,json=groupType,proto3" json:"group_type,omitempty"`
	GroupId   string `protobuf:"bytes,3,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
	// contains filtered or unexported fields
}

func (*PermServiceSaveRolePermRequest_Group) Descriptor deprecated

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

Deprecated: Use PermServiceSaveRolePermRequest_Group.ProtoReflect.Descriptor instead.

func (*PermServiceSaveRolePermRequest_Group) GetGroupId

func (*PermServiceSaveRolePermRequest_Group) GetGroupType

func (x *PermServiceSaveRolePermRequest_Group) GetGroupType() string

func (*PermServiceSaveRolePermRequest_Group) GetResType

func (*PermServiceSaveRolePermRequest_Group) ProtoMessage

func (*PermServiceSaveRolePermRequest_Group) ProtoMessage()

func (*PermServiceSaveRolePermRequest_Group) ProtoReflect

func (*PermServiceSaveRolePermRequest_Group) Reset

func (*PermServiceSaveRolePermRequest_Group) String

type PermServiceSaveRolePermResponse

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

func (*PermServiceSaveRolePermResponse) Descriptor deprecated

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

Deprecated: Use PermServiceSaveRolePermResponse.ProtoReflect.Descriptor instead.

func (*PermServiceSaveRolePermResponse) ProtoMessage

func (*PermServiceSaveRolePermResponse) ProtoMessage()

func (*PermServiceSaveRolePermResponse) ProtoReflect

func (*PermServiceSaveRolePermResponse) Reset

func (*PermServiceSaveRolePermResponse) String

type PermServiceServer

PermServiceServer is the server API for PermService service. All implementations should embed UnimplementedPermServiceServer for forward compatibility

type Resource

type Resource struct {
	ResId string   `protobuf:"bytes,1,opt,name=res_id,json=resId,proto3" json:"res_id,omitempty"`
	Acts  []string `protobuf:"bytes,2,rep,name=acts,proto3" json:"acts,omitempty"`
	// contains filtered or unexported fields
}

func (*Resource) Descriptor deprecated

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

Deprecated: Use Resource.ProtoReflect.Descriptor instead.

func (*Resource) GetActs

func (x *Resource) GetActs() []string

func (*Resource) GetResId

func (x *Resource) GetResId() string

func (*Resource) ProtoMessage

func (*Resource) ProtoMessage()

func (*Resource) ProtoReflect

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

func (*Resource) Reset

func (x *Resource) Reset()

func (*Resource) String

func (x *Resource) String() string

type Role

type Role struct {

	// role id
	Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// role name, e.g. "admin or 123456"
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// role status
	Status string `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"`
	// org id,
	OrgId string `protobuf:"bytes,4,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"`
	// role display name, e.g. "administrators"
	DisplayName string `protobuf:"bytes,6,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
	// contains filtered or unexported fields
}

func (*Role) Descriptor deprecated

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

Deprecated: Use Role.ProtoReflect.Descriptor instead.

func (*Role) GetDisplayName

func (x *Role) GetDisplayName() string

func (*Role) GetId

func (x *Role) GetId() int32

func (*Role) GetName

func (x *Role) GetName() string

func (*Role) GetOrgId

func (x *Role) GetOrgId() string

func (*Role) GetStatus

func (x *Role) GetStatus() 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 RoleService

type RoleService interface {
	// create role
	CreateRole(context.Context, *CreateRoleRequest) (*CreateRoleResponse, error)

	// *
	// - delete role by id or name
	// - req: id=12
	// - req: name=admin,org_id=ka
	DeleteRole(context.Context, *DeleteRoleRequest) (*DeleteRoleResponse, error)

	// *
	// - update role by id or name
	// - req: id=12
	// - req: name=admin,org_id=ka
	UpdateRole(context.Context, *UpdateRoleRequest) (*UpdateRoleResponse, error)

	// get role by id
	GetRole(context.Context, *GetRoleRequest) (*GetRoleResponse, error)

	// list role by org_id
	ListRoles(context.Context, *ListRolesRequest) (*ListRolesResponse, error)

	// add role to user
	// all parameters are required
	AddRoleForUser(context.Context, *AddRoleForUserRequest) (*AddRoleForUserResponse, error)

	// delete user org
	// all parameters are required
	// if {role_id} is *, it will delete all role about the user
	DelRoleForUser(context.Context, *DelRoleForUserRequest) (*DelRoleForUserResponse, error)

	// get user all roles
	// {org_id} and {user_id} are required
	GetRolesForUser(context.Context, *GetRolesForUserRequest) (*GetRolesForUserResponse, error)

	// get users from a {role_id}
	// if {role_id} is null, you will get all users of the {org_id}
	GetUsersForRole(context.Context, *GetUsersForRoleRequest) (*GetUsersForRoleResponse, error)
}

role grpc service, RoleService provides role management and user role management

func NewRoleServiceJSONClient

func NewRoleServiceJSONClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) RoleService

NewRoleServiceJSONClient creates a JSON client that implements the RoleService interface. It communicates using JSON and can be configured with a custom HTTPClient.

func NewRoleServiceProtobufClient

func NewRoleServiceProtobufClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) RoleService

NewRoleServiceProtobufClient creates a Protobuf client that implements the RoleService interface. It communicates using Protobuf and can be configured with a custom HTTPClient.

type RoleServiceClient

type RoleServiceClient interface {
	// create role
	CreateRole(ctx context.Context, in *CreateRoleRequest, opts ...grpc.CallOption) (*CreateRoleResponse, error)
	//*
	//- delete role by id or name
	//- req: id=12
	//- req: name=admin,org_id=ka
	DeleteRole(ctx context.Context, in *DeleteRoleRequest, opts ...grpc.CallOption) (*DeleteRoleResponse, error)
	//*
	//- update role by id or name
	//- req: id=12
	//- req: name=admin,org_id=ka
	UpdateRole(ctx context.Context, in *UpdateRoleRequest, opts ...grpc.CallOption) (*UpdateRoleResponse, error)
	// get role by id
	GetRole(ctx context.Context, in *GetRoleRequest, opts ...grpc.CallOption) (*GetRoleResponse, error)
	// list role by org_id
	ListRoles(ctx context.Context, in *ListRolesRequest, opts ...grpc.CallOption) (*ListRolesResponse, error)
	// add role to user
	// all parameters are required
	AddRoleForUser(ctx context.Context, in *AddRoleForUserRequest, opts ...grpc.CallOption) (*AddRoleForUserResponse, error)
	// delete user org
	// all parameters are required
	// if {role_id} is *, it will delete all role about the user
	DelRoleForUser(ctx context.Context, in *DelRoleForUserRequest, opts ...grpc.CallOption) (*DelRoleForUserResponse, error)
	// get user all roles
	// {org_id} and {user_id} are required
	GetRolesForUser(ctx context.Context, in *GetRolesForUserRequest, opts ...grpc.CallOption) (*GetRolesForUserResponse, error)
	// get users from a {role_id}
	// if {role_id} is null, you will get all users of the {org_id}
	GetUsersForRole(ctx context.Context, in *GetUsersForRoleRequest, opts ...grpc.CallOption) (*GetUsersForRoleResponse, 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

type RoleServiceServer interface {
	// create role
	CreateRole(context.Context, *CreateRoleRequest) (*CreateRoleResponse, error)
	//*
	//- delete role by id or name
	//- req: id=12
	//- req: name=admin,org_id=ka
	DeleteRole(context.Context, *DeleteRoleRequest) (*DeleteRoleResponse, error)
	//*
	//- update role by id or name
	//- req: id=12
	//- req: name=admin,org_id=ka
	UpdateRole(context.Context, *UpdateRoleRequest) (*UpdateRoleResponse, error)
	// get role by id
	GetRole(context.Context, *GetRoleRequest) (*GetRoleResponse, error)
	// list role by org_id
	ListRoles(context.Context, *ListRolesRequest) (*ListRolesResponse, error)
	// add role to user
	// all parameters are required
	AddRoleForUser(context.Context, *AddRoleForUserRequest) (*AddRoleForUserResponse, error)
	// delete user org
	// all parameters are required
	// if {role_id} is *, it will delete all role about the user
	DelRoleForUser(context.Context, *DelRoleForUserRequest) (*DelRoleForUserResponse, error)
	// get user all roles
	// {org_id} and {user_id} are required
	GetRolesForUser(context.Context, *GetRolesForUserRequest) (*GetRolesForUserResponse, error)
	// get users from a {role_id}
	// if {role_id} is null, you will get all users of the {org_id}
	GetUsersForRole(context.Context, *GetUsersForRoleRequest) (*GetUsersForRoleResponse, error)
}

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

type TransferOrgRequest

type TransferOrgRequest struct {
	OrgId     string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"`
	UserId    string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	NewUserId string `protobuf:"bytes,3,opt,name=new_user_id,json=newUserId,proto3" json:"new_user_id,omitempty"`
	// contains filtered or unexported fields
}

func (*TransferOrgRequest) Descriptor deprecated

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

Deprecated: Use TransferOrgRequest.ProtoReflect.Descriptor instead.

func (*TransferOrgRequest) GetNewUserId

func (x *TransferOrgRequest) GetNewUserId() string

func (*TransferOrgRequest) GetOrgId

func (x *TransferOrgRequest) GetOrgId() string

func (*TransferOrgRequest) GetUserId

func (x *TransferOrgRequest) GetUserId() string

func (*TransferOrgRequest) ProtoMessage

func (*TransferOrgRequest) ProtoMessage()

func (*TransferOrgRequest) ProtoReflect

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

func (*TransferOrgRequest) Reset

func (x *TransferOrgRequest) Reset()

func (*TransferOrgRequest) String

func (x *TransferOrgRequest) String() string

type TransferOrgResponse

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

func (*TransferOrgResponse) Descriptor deprecated

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

Deprecated: Use TransferOrgResponse.ProtoReflect.Descriptor instead.

func (*TransferOrgResponse) ProtoMessage

func (*TransferOrgResponse) ProtoMessage()

func (*TransferOrgResponse) ProtoReflect

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

func (*TransferOrgResponse) Reset

func (x *TransferOrgResponse) Reset()

func (*TransferOrgResponse) String

func (x *TransferOrgResponse) String() string

type TwirpServer

type TwirpServer interface {
	http.Handler

	// ServiceDescriptor returns gzipped bytes describing the .proto file that
	// this service was generated from. Once unzipped, the bytes can be
	// unmarshalled as a
	// google.golang.org/protobuf/types/descriptorpb.FileDescriptorProto.
	//
	// The returned integer is the index of this particular service within that
	// FileDescriptorProto's 'Service' slice of ServiceDescriptorProtos. This is a
	// low-level field, expected to be used for reflection.
	ServiceDescriptor() ([]byte, int)

	// ProtocGenTwirpVersion is the semantic version string of the version of
	// twirp used to generate this file.
	ProtocGenTwirpVersion() string

	// PathPrefix returns the HTTP URL path prefix for all methods handled by this
	// service. This can be used with an HTTP mux to route Twirp requests.
	// The path prefix is in the form: "/<prefix>/<package>.<Service>/"
	// that is, everything in a Twirp route except for the <Method> at the end.
	PathPrefix() string
}

TwirpServer is the interface generated server structs will support: they're HTTP handlers with additional methods for accessing metadata about the service. Those accessors are a low-level API for building reflection tools. Most people can think of TwirpServers as just http.Handlers.

func NewGroupServiceServer

func NewGroupServiceServer(svc GroupService, opts ...interface{}) TwirpServer

NewGroupServiceServer builds a TwirpServer that can be used as an http.Handler to handle HTTP requests that are routed to the right method in the provided svc implementation. The opts are twirp.ServerOption modifiers, for example twirp.WithServerHooks(hooks).

func NewMenuServiceServer

func NewMenuServiceServer(svc MenuService, opts ...interface{}) TwirpServer

NewMenuServiceServer builds a TwirpServer that can be used as an http.Handler to handle HTTP requests that are routed to the right method in the provided svc implementation. The opts are twirp.ServerOption modifiers, for example twirp.WithServerHooks(hooks).

func NewOrgServiceServer

func NewOrgServiceServer(svc OrgService, opts ...interface{}) TwirpServer

NewOrgServiceServer builds a TwirpServer that can be used as an http.Handler to handle HTTP requests that are routed to the right method in the provided svc implementation. The opts are twirp.ServerOption modifiers, for example twirp.WithServerHooks(hooks).

func NewPermServiceServer

func NewPermServiceServer(svc PermService, opts ...interface{}) TwirpServer

NewPermServiceServer builds a TwirpServer that can be used as an http.Handler to handle HTTP requests that are routed to the right method in the provided svc implementation. The opts are twirp.ServerOption modifiers, for example twirp.WithServerHooks(hooks).

func NewRoleServiceServer

func NewRoleServiceServer(svc RoleService, opts ...interface{}) TwirpServer

NewRoleServiceServer builds a TwirpServer that can be used as an http.Handler to handle HTTP requests that are routed to the right method in the provided svc implementation. The opts are twirp.ServerOption modifiers, for example twirp.WithServerHooks(hooks).

type UnimplementedGroupServiceServer

type UnimplementedGroupServiceServer struct {
}

UnimplementedGroupServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedGroupServiceServer) AddResForGroup

func (UnimplementedGroupServiceServer) CreateGroup

func (UnimplementedGroupServiceServer) DelResForGroup

func (UnimplementedGroupServiceServer) DeleteGroup

func (UnimplementedGroupServiceServer) ListGroups

func (UnimplementedGroupServiceServer) MoveGroup

type UnimplementedMenuServiceServer

type UnimplementedMenuServiceServer struct {
}

UnimplementedMenuServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedMenuServiceServer) ListMenus

type UnimplementedOrgServiceServer

type UnimplementedOrgServiceServer struct {
}

UnimplementedOrgServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedOrgServiceServer) CreateOrg

func (UnimplementedOrgServiceServer) DeleteOrg

func (UnimplementedOrgServiceServer) ListOrg

func (UnimplementedOrgServiceServer) TransferOrg

type UnimplementedPermServiceServer

type UnimplementedPermServiceServer struct {
}

UnimplementedPermServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedPermServiceServer) Enforce

type UnimplementedRoleServiceServer

type UnimplementedRoleServiceServer struct {
}

UnimplementedRoleServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedRoleServiceServer) AddRoleForUser

func (UnimplementedRoleServiceServer) CreateRole

func (UnimplementedRoleServiceServer) DelRoleForUser

func (UnimplementedRoleServiceServer) DeleteRole

func (UnimplementedRoleServiceServer) GetRole

func (UnimplementedRoleServiceServer) GetRolesForUser

func (UnimplementedRoleServiceServer) GetUsersForRole

func (UnimplementedRoleServiceServer) ListRoles

func (UnimplementedRoleServiceServer) UpdateRole

type UnsafeGroupServiceServer

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

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

type UnsafeMenuServiceServer

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

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

type UnsafeOrgServiceServer

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

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

type UnsafePermServiceServer

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

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

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

type UserRoleRequest

type UserRoleRequest struct {
	OrgId  string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"`
	UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	RoleId string `protobuf:"bytes,3,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"`
	// contains filtered or unexported fields
}

func (*UserRoleRequest) Descriptor deprecated

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

Deprecated: Use UserRoleRequest.ProtoReflect.Descriptor instead.

func (*UserRoleRequest) GetOrgId

func (x *UserRoleRequest) GetOrgId() string

func (*UserRoleRequest) GetRoleId

func (x *UserRoleRequest) GetRoleId() string

func (*UserRoleRequest) GetUserId

func (x *UserRoleRequest) GetUserId() string

func (*UserRoleRequest) ProtoMessage

func (*UserRoleRequest) ProtoMessage()

func (*UserRoleRequest) ProtoReflect

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

func (*UserRoleRequest) Reset

func (x *UserRoleRequest) Reset()

func (*UserRoleRequest) String

func (x *UserRoleRequest) String() string

Jump to

Keyboard shortcuts

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