SrvRole

package
v0.0.0-...-8e1814b Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterSrvRoleHandler

func RegisterSrvRoleHandler(s server.Server, hdlr SrvRoleHandler, opts ...server.HandlerOption) error

Types

type AddGroupingPolicyRequest

type AddGroupingPolicyRequest struct {
	User                 string   `protobuf:"bytes,1,opt,name=User,proto3" json:"User,omitempty"`
	UserGroup            []string `protobuf:"bytes,2,rep,name=UserGroup,proto3" json:"UserGroup,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*AddGroupingPolicyRequest) Descriptor

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

func (*AddGroupingPolicyRequest) GetUser

func (m *AddGroupingPolicyRequest) GetUser() string

func (*AddGroupingPolicyRequest) GetUserGroup

func (m *AddGroupingPolicyRequest) GetUserGroup() []string

func (*AddGroupingPolicyRequest) ProtoMessage

func (*AddGroupingPolicyRequest) ProtoMessage()

func (*AddGroupingPolicyRequest) Reset

func (m *AddGroupingPolicyRequest) Reset()

func (*AddGroupingPolicyRequest) String

func (m *AddGroupingPolicyRequest) String() string

func (*AddGroupingPolicyRequest) XXX_DiscardUnknown

func (m *AddGroupingPolicyRequest) XXX_DiscardUnknown()

func (*AddGroupingPolicyRequest) XXX_Marshal

func (m *AddGroupingPolicyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AddGroupingPolicyRequest) XXX_Merge

func (m *AddGroupingPolicyRequest) XXX_Merge(src proto.Message)

func (*AddGroupingPolicyRequest) XXX_Size

func (m *AddGroupingPolicyRequest) XXX_Size() int

func (*AddGroupingPolicyRequest) XXX_Unmarshal

func (m *AddGroupingPolicyRequest) XXX_Unmarshal(b []byte) error

type AddPolicyRequest

type AddPolicyRequest struct {
	S1                   string   `protobuf:"bytes,1,opt,name=s1,proto3" json:"s1,omitempty"`
	S2                   string   `protobuf:"bytes,2,opt,name=s2,proto3" json:"s2,omitempty"`
	S3                   string   `protobuf:"bytes,3,opt,name=s3,proto3" json:"s3,omitempty"`
	S4                   string   `protobuf:"bytes,4,opt,name=s4,proto3" json:"s4,omitempty"`
	S5                   string   `protobuf:"bytes,5,opt,name=s5,proto3" json:"s5,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*AddPolicyRequest) Descriptor

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

func (*AddPolicyRequest) GetS1

func (m *AddPolicyRequest) GetS1() string

func (*AddPolicyRequest) GetS2

func (m *AddPolicyRequest) GetS2() string

func (*AddPolicyRequest) GetS3

func (m *AddPolicyRequest) GetS3() string

func (*AddPolicyRequest) GetS4

func (m *AddPolicyRequest) GetS4() string

func (*AddPolicyRequest) GetS5

func (m *AddPolicyRequest) GetS5() string

func (*AddPolicyRequest) ProtoMessage

func (*AddPolicyRequest) ProtoMessage()

func (*AddPolicyRequest) Reset

func (m *AddPolicyRequest) Reset()

func (*AddPolicyRequest) String

func (m *AddPolicyRequest) String() string

func (*AddPolicyRequest) XXX_DiscardUnknown

func (m *AddPolicyRequest) XXX_DiscardUnknown()

func (*AddPolicyRequest) XXX_Marshal

func (m *AddPolicyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AddPolicyRequest) XXX_Merge

func (m *AddPolicyRequest) XXX_Merge(src proto.Message)

func (*AddPolicyRequest) XXX_Size

func (m *AddPolicyRequest) XXX_Size() int

func (*AddPolicyRequest) XXX_Unmarshal

func (m *AddPolicyRequest) XXX_Unmarshal(b []byte) error

type DeletePermissionsForUserResponse

type DeletePermissionsForUserResponse struct {
	IsDel                bool     `protobuf:"varint,1,opt,name=IsDel,proto3" json:"IsDel,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*DeletePermissionsForUserResponse) Descriptor

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

func (*DeletePermissionsForUserResponse) GetIsDel

func (m *DeletePermissionsForUserResponse) GetIsDel() bool

func (*DeletePermissionsForUserResponse) ProtoMessage

func (*DeletePermissionsForUserResponse) ProtoMessage()

func (*DeletePermissionsForUserResponse) Reset

func (*DeletePermissionsForUserResponse) String

func (*DeletePermissionsForUserResponse) XXX_DiscardUnknown

func (m *DeletePermissionsForUserResponse) XXX_DiscardUnknown()

func (*DeletePermissionsForUserResponse) XXX_Marshal

func (m *DeletePermissionsForUserResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DeletePermissionsForUserResponse) XXX_Merge

func (*DeletePermissionsForUserResponse) XXX_Size

func (m *DeletePermissionsForUserResponse) XXX_Size() int

func (*DeletePermissionsForUserResponse) XXX_Unmarshal

func (m *DeletePermissionsForUserResponse) XXX_Unmarshal(b []byte) error

type Empty

type Empty struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Empty) Descriptor

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

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) Reset

func (m *Empty) Reset()

func (*Empty) String

func (m *Empty) String() string

func (*Empty) XXX_DiscardUnknown

func (m *Empty) XXX_DiscardUnknown()

func (*Empty) XXX_Marshal

func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Empty) XXX_Merge

func (m *Empty) XXX_Merge(src proto.Message)

func (*Empty) XXX_Size

func (m *Empty) XXX_Size() int

func (*Empty) XXX_Unmarshal

func (m *Empty) XXX_Unmarshal(b []byte) error

type ForUserRequest

type ForUserRequest struct {
	User                 string   `protobuf:"bytes,1,opt,name=User,proto3" json:"User,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ForUserRequest) Descriptor

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

func (*ForUserRequest) GetUser

func (m *ForUserRequest) GetUser() string

func (*ForUserRequest) ProtoMessage

func (*ForUserRequest) ProtoMessage()

func (*ForUserRequest) Reset

func (m *ForUserRequest) Reset()

func (*ForUserRequest) String

func (m *ForUserRequest) String() string

func (*ForUserRequest) XXX_DiscardUnknown

func (m *ForUserRequest) XXX_DiscardUnknown()

func (*ForUserRequest) XXX_Marshal

func (m *ForUserRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ForUserRequest) XXX_Merge

func (m *ForUserRequest) XXX_Merge(src proto.Message)

func (*ForUserRequest) XXX_Size

func (m *ForUserRequest) XXX_Size() int

func (*ForUserRequest) XXX_Unmarshal

func (m *ForUserRequest) XXX_Unmarshal(b []byte) error

type GetPermissionsForUserResponse

type GetPermissionsForUserResponse struct {
	One                  []*TwoString `protobuf:"bytes,1,rep,name=One,proto3" json:"One,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (*GetPermissionsForUserResponse) Descriptor

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

func (*GetPermissionsForUserResponse) GetOne

func (*GetPermissionsForUserResponse) ProtoMessage

func (*GetPermissionsForUserResponse) ProtoMessage()

func (*GetPermissionsForUserResponse) Reset

func (m *GetPermissionsForUserResponse) Reset()

func (*GetPermissionsForUserResponse) String

func (*GetPermissionsForUserResponse) XXX_DiscardUnknown

func (m *GetPermissionsForUserResponse) XXX_DiscardUnknown()

func (*GetPermissionsForUserResponse) XXX_Marshal

func (m *GetPermissionsForUserResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetPermissionsForUserResponse) XXX_Merge

func (m *GetPermissionsForUserResponse) XXX_Merge(src proto.Message)

func (*GetPermissionsForUserResponse) XXX_Size

func (m *GetPermissionsForUserResponse) XXX_Size() int

func (*GetPermissionsForUserResponse) XXX_Unmarshal

func (m *GetPermissionsForUserResponse) XXX_Unmarshal(b []byte) error

type GetRolesForUserRequest

type GetRolesForUserRequest struct {
	Name                 string   `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetRolesForUserRequest) Descriptor

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

func (*GetRolesForUserRequest) GetName

func (m *GetRolesForUserRequest) GetName() string

func (*GetRolesForUserRequest) ProtoMessage

func (*GetRolesForUserRequest) ProtoMessage()

func (*GetRolesForUserRequest) Reset

func (m *GetRolesForUserRequest) Reset()

func (*GetRolesForUserRequest) String

func (m *GetRolesForUserRequest) String() string

func (*GetRolesForUserRequest) XXX_DiscardUnknown

func (m *GetRolesForUserRequest) XXX_DiscardUnknown()

func (*GetRolesForUserRequest) XXX_Marshal

func (m *GetRolesForUserRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetRolesForUserRequest) XXX_Merge

func (m *GetRolesForUserRequest) XXX_Merge(src proto.Message)

func (*GetRolesForUserRequest) XXX_Size

func (m *GetRolesForUserRequest) XXX_Size() int

func (*GetRolesForUserRequest) XXX_Unmarshal

func (m *GetRolesForUserRequest) XXX_Unmarshal(b []byte) error

type GetRolesForUserResponse

type GetRolesForUserResponse struct {
	Roles                []string `protobuf:"bytes,1,rep,name=Roles,proto3" json:"Roles,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetRolesForUserResponse) Descriptor

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

func (*GetRolesForUserResponse) GetRoles

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

func (*GetRolesForUserResponse) ProtoMessage

func (*GetRolesForUserResponse) ProtoMessage()

func (*GetRolesForUserResponse) Reset

func (m *GetRolesForUserResponse) Reset()

func (*GetRolesForUserResponse) String

func (m *GetRolesForUserResponse) String() string

func (*GetRolesForUserResponse) XXX_DiscardUnknown

func (m *GetRolesForUserResponse) XXX_DiscardUnknown()

func (*GetRolesForUserResponse) XXX_Marshal

func (m *GetRolesForUserResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetRolesForUserResponse) XXX_Merge

func (m *GetRolesForUserResponse) XXX_Merge(src proto.Message)

func (*GetRolesForUserResponse) XXX_Size

func (m *GetRolesForUserResponse) XXX_Size() int

func (*GetRolesForUserResponse) XXX_Unmarshal

func (m *GetRolesForUserResponse) XXX_Unmarshal(b []byte) error

type RemoveFilteredPolicyRequest

type RemoveFilteredPolicyRequest struct {
	Role                 string   `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*RemoveFilteredPolicyRequest) Descriptor

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

func (*RemoveFilteredPolicyRequest) GetRole

func (m *RemoveFilteredPolicyRequest) GetRole() string

func (*RemoveFilteredPolicyRequest) ProtoMessage

func (*RemoveFilteredPolicyRequest) ProtoMessage()

func (*RemoveFilteredPolicyRequest) Reset

func (m *RemoveFilteredPolicyRequest) Reset()

func (*RemoveFilteredPolicyRequest) String

func (m *RemoveFilteredPolicyRequest) String() string

func (*RemoveFilteredPolicyRequest) XXX_DiscardUnknown

func (m *RemoveFilteredPolicyRequest) XXX_DiscardUnknown()

func (*RemoveFilteredPolicyRequest) XXX_Marshal

func (m *RemoveFilteredPolicyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RemoveFilteredPolicyRequest) XXX_Merge

func (m *RemoveFilteredPolicyRequest) XXX_Merge(src proto.Message)

func (*RemoveFilteredPolicyRequest) XXX_Size

func (m *RemoveFilteredPolicyRequest) XXX_Size() int

func (*RemoveFilteredPolicyRequest) XXX_Unmarshal

func (m *RemoveFilteredPolicyRequest) XXX_Unmarshal(b []byte) error

type SrvRoleHandler

type SrvRoleHandler interface {
	// 根据用户组获取权限
	GetPermissionsForUser(context.Context, *ForUserRequest, *GetPermissionsForUserResponse) error
	// 获取用户组列表
	DeletePermissionsForUser(context.Context, *ForUserRequest, *DeletePermissionsForUserResponse) error
	// 获取单个用户组
	RemoveFilteredPolicy(context.Context, *RemoveFilteredPolicyRequest, *Empty) error
	// 修改用户组信息
	AddPolicy(context.Context, *AddPolicyRequest, *Empty) error
	// 批量删除用户组
	GetRolesForUser(context.Context, *GetRolesForUserRequest, *GetRolesForUserResponse) error
	// 根据用户删除角色
	DeleteRolesForUser(context.Context, *ForUserRequest, *Empty) error
	// 添加用户和用户角色(组)关系
	AddGroupingPolicy(context.Context, *AddGroupingPolicyRequest, *Empty) error
}

type SrvRoleService

type SrvRoleService interface {
	// 根据用户组获取权限
	GetPermissionsForUser(ctx context.Context, in *ForUserRequest, opts ...client.CallOption) (*GetPermissionsForUserResponse, error)
	// 获取用户组列表
	DeletePermissionsForUser(ctx context.Context, in *ForUserRequest, opts ...client.CallOption) (*DeletePermissionsForUserResponse, error)
	// 获取单个用户组
	RemoveFilteredPolicy(ctx context.Context, in *RemoveFilteredPolicyRequest, opts ...client.CallOption) (*Empty, error)
	// 修改用户组信息
	AddPolicy(ctx context.Context, in *AddPolicyRequest, opts ...client.CallOption) (*Empty, error)
	// 批量删除用户组
	GetRolesForUser(ctx context.Context, in *GetRolesForUserRequest, opts ...client.CallOption) (*GetRolesForUserResponse, error)
	// 根据用户删除角色
	DeleteRolesForUser(ctx context.Context, in *ForUserRequest, opts ...client.CallOption) (*Empty, error)
	// 添加用户和用户角色(组)关系
	AddGroupingPolicy(ctx context.Context, in *AddGroupingPolicyRequest, opts ...client.CallOption) (*Empty, error)
}

func NewSrvRoleService

func NewSrvRoleService(name string, c client.Client) SrvRoleService

type TwoString

type TwoString struct {
	Two                  []string `protobuf:"bytes,1,rep,name=Two,proto3" json:"Two,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*TwoString) Descriptor

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

func (*TwoString) GetTwo

func (m *TwoString) GetTwo() []string

func (*TwoString) ProtoMessage

func (*TwoString) ProtoMessage()

func (*TwoString) Reset

func (m *TwoString) Reset()

func (*TwoString) String

func (m *TwoString) String() string

func (*TwoString) XXX_DiscardUnknown

func (m *TwoString) XXX_DiscardUnknown()

func (*TwoString) XXX_Marshal

func (m *TwoString) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TwoString) XXX_Merge

func (m *TwoString) XXX_Merge(src proto.Message)

func (*TwoString) XXX_Size

func (m *TwoString) XXX_Size() int

func (*TwoString) XXX_Unmarshal

func (m *TwoString) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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