version1

package
v0.0.0-...-cc2b428 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2021 License: MIT Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IRolesClientV1

type IRolesClientV1 interface {
	GetRolesByFilter(correlationId string, filter *data.FilterParams,
		paging *data.PagingParams) (result *data.DataPage, err error)

	GetRolesById(correlationId string, userId string) (result []string, err error)

	SetRoles(correlationId string, userId string, roles []string) (result []string, err error)

	GrantRoles(correlationId string, userId string, roles []string) (result []string, err error)

	RevokeRoles(correlationId string, userId string, roles []string) (result []string, err error)

	Authorize(correlationId string, userId string, roles []string) (result bool, err error)
}

type RoleGrpcClientV1

type RoleGrpcClientV1 struct {
	clients.GrpcClient
}

func NewRoleGrpcClientV1

func NewRoleGrpcClientV1() *RoleGrpcClientV1

func (*RoleGrpcClientV1) Authorize

func (c *RoleGrpcClientV1) Authorize(correlationId string, userId string, roles []string) (result bool, err error)

func (*RoleGrpcClientV1) GetRolesByFilter

func (c *RoleGrpcClientV1) GetRolesByFilter(correlationId string, filter *data.FilterParams,
	paging *data.PagingParams) (result *data.DataPage, err error)

func (*RoleGrpcClientV1) GetRolesById

func (c *RoleGrpcClientV1) GetRolesById(correlationId string, userId string) (result []string, err error)

func (*RoleGrpcClientV1) GrantRoles

func (c *RoleGrpcClientV1) GrantRoles(correlationId string, userId string, roles []string) (result []string, err error)

func (*RoleGrpcClientV1) RevokeRoles

func (c *RoleGrpcClientV1) RevokeRoles(correlationId string, userId string, roles []string) (result []string, err error)

func (*RoleGrpcClientV1) SetRoles

func (c *RoleGrpcClientV1) SetRoles(correlationId string, userId string, roles []string) (result []string, err error)

type RolesHttpCommandableClientV1

type RolesHttpCommandableClientV1 struct {
	*cclients.CommandableHttpClient
	// contains filtered or unexported fields
}

func NewRolesHttpCommandableClientV1

func NewRolesHttpCommandableClientV1() *RolesHttpCommandableClientV1

func (*RolesHttpCommandableClientV1) Authorize

func (c *RolesHttpCommandableClientV1) Authorize(correlationId string, userId string, roles []string) (result bool, err error)

func (*RolesHttpCommandableClientV1) GetRolesByFilter

func (c *RolesHttpCommandableClientV1) GetRolesByFilter(correlationId string, filter *data.FilterParams,
	paging *data.PagingParams) (result *cdata.DataPage, err error)

func (*RolesHttpCommandableClientV1) GetRolesById

func (c *RolesHttpCommandableClientV1) GetRolesById(correlationId string, userId string) (result []string, err error)

func (*RolesHttpCommandableClientV1) GrantRoles

func (c *RolesHttpCommandableClientV1) GrantRoles(correlationId string, userId string, roles []string) (result []string, err error)

func (*RolesHttpCommandableClientV1) RevokeRoles

func (c *RolesHttpCommandableClientV1) RevokeRoles(correlationId string, userId string, roles []string) (result []string, err error)

func (*RolesHttpCommandableClientV1) SetRoles

func (c *RolesHttpCommandableClientV1) SetRoles(correlationId string, userId string, roles []string) (result []string, err error)

type RolesMemoryClientV1

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

func NewRolesMemoryClientV1

func NewRolesMemoryClientV1() *RolesMemoryClientV1

func (*RolesMemoryClientV1) Authorize

func (c *RolesMemoryClientV1) Authorize(correlationId string, userId string, roles []string) (result bool, err error)

func (*RolesMemoryClientV1) GetRolesByFilter

func (c *RolesMemoryClientV1) GetRolesByFilter(correlationId string, filter *data.FilterParams,
	paging *data.PagingParams) (result *data.DataPage, err error)

func (*RolesMemoryClientV1) GetRolesById

func (c *RolesMemoryClientV1) GetRolesById(correlationId string, userId string) (result []string, err error)

func (*RolesMemoryClientV1) GrantRoles

func (c *RolesMemoryClientV1) GrantRoles(correlationId string, userId string, roles []string) (result []string, err error)

func (*RolesMemoryClientV1) RevokeRoles

func (c *RolesMemoryClientV1) RevokeRoles(correlationId string, userId string, roles []string) (result []string, err error)

func (*RolesMemoryClientV1) SetRoles

func (c *RolesMemoryClientV1) SetRoles(correlationId string, userId string, roles []string) (result []string, err error)

type UserRolesV1

type UserRolesV1 struct {
	Id         string    `json:"id"`
	Roles      []string  `json:"roles"`
	UpdateTime time.Time `json:"update_time"`
}

func EmptyUserRolesV1

func EmptyUserRolesV1() *UserRolesV1

func NewUserRolesV1

func NewUserRolesV1(id string, roles []string) *UserRolesV1

Jump to

Keyboard shortcuts

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