session

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Actor added in v0.9.0

type Actor struct {
	User        *model.UserEntity
	Session     *mnemosynerpc.Session
	Permissions charon.Permissions
	IsLocal     bool
}

type ActorID

type ActorID string

ActorID is globally unique identifier that in format "charon:user:<user_id>".

func ActorIDFromInt64

func ActorIDFromInt64(userID int64) ActorID

ActorIDFromInt64 allocate ActorID using given user id.

func (ActorID) String

func (ai ActorID) String() string

String implements fmt.Stringer interface.

func (ActorID) UserID

func (ai ActorID) UserID() (int64, error)

UserID returns user id if possible, otherwise an error.

type ActorProvider added in v0.18.0

type ActorProvider interface {
	Actor(context.Context) (*Actor, error)
}

type MnemosyneActorProvider added in v0.18.0

type MnemosyneActorProvider struct {
	Client             mnemosynerpc.SessionManagerClient
	UserProvider       model.UserProvider
	PermissionProvider model.PermissionProvider
}

func (*MnemosyneActorProvider) Actor added in v0.18.0

func (p *MnemosyneActorProvider) Actor(ctx context.Context) (*Actor, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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