database

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2022 License: AGPL-3.0-or-later Imports: 10 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) (*string, error)

func (*Service) CreateInvocation

func (s *Service) CreateInvocation(ctx context.Context, fn model.Function, clientName string, input *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) 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) 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