service

package
v0.0.1-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthServicer

type AuthServicer interface {
	Login(userCredentials *UserCredentials) (bool, error)
}

type DefaultSession

type DefaultSession struct {
	Session
	// contains filtered or unexported fields
}

func (*DefaultSession) Close

func (session *DefaultSession) Close()

func (*DefaultSession) Error

func (session *DefaultSession) Error(err error)

func (*DefaultSession) GetLogger

func (session *DefaultSession) GetLogger() *logging.Logger

func (*DefaultSession) GetRequestedServiceID

func (session *DefaultSession) GetRequestedServiceID() uint64

func (*DefaultSession) IsMemberOfOrganization

func (session *DefaultSession) IsMemberOfOrganization(organizationID uint64) bool

func (*DefaultSession) SetLogger

func (session *DefaultSession) SetLogger(logger *logging.Logger)

func (*DefaultSession) String

func (session *DefaultSession) String() string

type ServiceClaim

type ServiceClaim struct {
	ID   uint64 `json:"id"`
	Name string `json:"name"`
}

type Session

type Session interface {
	GetLogger() *logging.Logger
	SetLogger(*logging.Logger)
	GetRequestedServiceID() uint64
	Close()
}

func CreateSession

func CreateSession(
	logger *logging.Logger,
	serviceClaims []ServiceClaim,
	requestedServiceID uint64) Session

func CreateSystemSession

func CreateSystemSession(logger *logging.Logger) Session

type UserCredentials

type UserCredentials struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

Jump to

Keyboard shortcuts

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