database

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2023 License: AGPL-3.0-or-later Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidPagination = errors.New("invalid page request")

Functions

This section is empty.

Types

type Config

type Config struct {
	ConnectionString string
}

type Service

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

func New

func New(cfg Config) (*Service, error)

func (*Service) AutoMigrate

func (s *Service) AutoMigrate() error

func (*Service) CreateAPIToken added in v1.1.0

func (s *Service) CreateAPIToken(ctx context.Context, clientName string, token string) (*string, error)

func (*Service) CreateFunction

func (s *Service) CreateFunction(
	ctx context.Context,
	name string,
	image string,
	skipLogging bool,
	environment map[string]string,
	secrets map[string]string,
) (*string, error)

func (*Service) CreateInvocation

func (s *Service) CreateInvocation(ctx context.Context, fn model.Function, clientName string, input *string) (*string, error)

func (*Service) CreateUser added in v1.3.0

func (s *Service) CreateUser(ctx context.Context, username string, encryptedPassword string, email *string, name *string) (*string, error)

func (*Service) DeleteAPIToken added in v1.1.0

func (s *Service) DeleteAPIToken(ctx context.Context, id string) error

func (*Service) FetchAPIToken added in v1.1.0

func (s *Service) FetchAPIToken(ctx context.Context, tokenString string) (*model.APIToken, error)

func (*Service) FetchAPITokenByID added in v1.5.0

func (s *Service) FetchAPITokenByID(ctx context.Context, id string) (*model.APIToken, error)

func (*Service) FetchAPITokens added in v1.1.0

func (s *Service) FetchAPITokens(ctx context.Context, pageNumber uint32, pageSize uint32) ([]model.APIToken, error)

func (*Service) FetchFunction

func (s *Service) FetchFunction(ctx context.Context, name string) (*model.Function, error)

func (*Service) FetchFunctionInvocations

func (s *Service) FetchFunctionInvocations(ctx context.Context, functionID string, pageNumber uint32, pageSize uint32) ([]model.Invocation, error)

func (*Service) FetchFunctions

func (s *Service) FetchFunctions(ctx context.Context, pageNumber uint32, pageSize uint32) ([]model.Function, error)

func (*Service) FetchInvocation

func (s *Service) FetchInvocation(ctx context.Context, id string) (*model.Invocation, error)

func (*Service) FetchInvocations added in v1.4.0

func (s *Service) FetchInvocations(ctx context.Context, pageNumber uint32, pageSize uint32) ([]model.Invocation, error)

func (*Service) FetchUser added in v1.3.0

func (s *Service) FetchUser(ctx context.Context, username string) (*model.User, error)

func (*Service) UpdateInvocationFailed

func (s *Service) UpdateInvocationFailed(ctx context.Context, id string, endedAt time.Time, errorMessage *string) error

func (*Service) UpdateInvocationStarted

func (s *Service) UpdateInvocationStarted(ctx context.Context, id string, startedAt time.Time) error

func (*Service) UpdateInvocationSucceeded

func (s *Service) UpdateInvocationSucceeded(ctx context.Context, id string, endedAt time.Time, output *string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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