sender

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OwnerPath

type OwnerPath string

${group_path}:${user_id}

func (OwnerPath) CheckOwnerPathPermission

func (o OwnerPath) CheckOwnerPathPermission(ownerPaths ...string) bool

func (OwnerPath) CheckPermission

func (o OwnerPath) CheckPermission(s *Sender) bool

func (OwnerPath) Owner

func (o OwnerPath) Owner() string

func (OwnerPath) ToProtoString

func (o OwnerPath) ToProtoString() *wrappers.StringValue

type Sender

type Sender struct {
	UserId     string    `json:"user_id,omitempty"`
	OwnerPath  OwnerPath `json:"owner_path,omitempty"`
	AccessPath OwnerPath `json:"access_path,omitempty"`
}

func GetSystemSender

func GetSystemSender() *Sender

func New

func New(userId string, ownerPath, accessPath OwnerPath) *Sender

func (Sender) GetAccessPath

func (s Sender) GetAccessPath() OwnerPath

func (Sender) GetOwnerPath

func (s Sender) GetOwnerPath() OwnerPath

func (*Sender) ToJson

func (s *Sender) ToJson() string

Jump to

Keyboard shortcuts

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