platform

package
v2.17.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 7, 2021 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package platform provides authentication/authorization functionality.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service is responsible for interactions with Percona Platform.

func New

func New(db *reform.DB) (*Service, error)

New returns platform Service.

func (*Service) Run

func (s *Service) Run(ctx context.Context)

Run refreshes Percona Platform session every interval until context is canceled.

func (*Service) SignIn

func (s *Service) SignIn(ctx context.Context, email, password string) error

SignIn checks Percona Platform user authentication and creates session.

func (*Service) SignOut

func (s *Service) SignOut(ctx context.Context) error

SignOut logouts that instance from Percona Platform account and removes session id.

func (*Service) SignUp

func (s *Service) SignUp(ctx context.Context, email, firstName, lastName string) error

SignUp creates new Percona Platform user with given email and password.

Jump to

Keyboard shortcuts

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