login

package
v1.8.3 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrLoginNotFound = errors.New("login not found")
)

Functions

This section is empty.

Types

type MultiRecord

type MultiRecord struct {
	AppInstallId  string
	Owners        []string
	LastUpdatedAt time.Time
}

func (*MultiRecord) Clone

func (r *MultiRecord) Clone() MultiRecord

func (*MultiRecord) CopyTo

func (r *MultiRecord) CopyTo(dst *MultiRecord)

func (*MultiRecord) Validate

func (r *MultiRecord) Validate() error

type Record

type Record struct {
	AppInstallId  string
	Owner         string
	LastUpdatedAt time.Time
}

func (*Record) Validate

func (r *Record) Validate() error

type Store

type Store interface {
	// Save saves a multi login record in a single DB tx
	Save(ctx context.Context, record *MultiRecord) error

	// GetAllByInstallId gets a multi login record for an app install. If no
	// logins are detected, ErrLoginNotFound is returned.
	GetAllByInstallId(ctx context.Context, appInstallId string) (*MultiRecord, error)

	// GetLatestByOwner gets the latest login record for an owner. If no
	// login is detected, ErrLoginNotFound is returned.
	GetLatestByOwner(ctx context.Context, owner string) (*Record, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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