clients

package
v0.4.6 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package clients provides the client related business logic.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidClientKey is returned when the given Key is not valid ClientKey.
	ErrInvalidClientKey = errors.New("invalid client key")

	// ErrInvalidClientID is returned when the given Key is not valid ClientID.
	ErrInvalidClientID = errors.New("invalid client id")
)

Functions

func Activate

func Activate(
	ctx context.Context,
	db database.Database,
	project *types.Project,
	clientKey string,
) (*database.ClientInfo, error)

Activate activates the given client.

func Deactivate

func Deactivate(
	ctx context.Context,
	db database.Database,
	projectID types.ID,
	clientID types.ID,
) (*database.ClientInfo, error)

Deactivate deactivates the given client.

func FindClientInfo

func FindClientInfo(
	ctx context.Context,
	db database.Database,
	project *types.Project,
	clientID *time.ActorID,
) (*database.ClientInfo, error)

FindClientInfo finds the client with the given id.

Types

This section is empty.

Jump to

Keyboard shortcuts

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