postgres

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Postgres

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

func NewPostgres

func NewPostgres(addr string) (*Postgres, error)

func (*Postgres) ChangePassword

func (p *Postgres) ChangePassword(ctx context.Context, account *api.Account, password []byte) error

func (*Postgres) CreateAPIToken

func (p *Postgres) CreateAPIToken(ctx context.Context, apiToken *api.APIToken) error

func (*Postgres) CreateAccount

func (p *Postgres) CreateAccount(ctx context.Context, account *api.Account) error

func (*Postgres) CreateNamespace

func (p *Postgres) CreateNamespace(ctx context.Context, namespace *api.Namespace) (string, error)

func (*Postgres) CreateQueueWorkflow

func (p *Postgres) CreateQueueWorkflow(ctx context.Context, workflow *api.Workflow) error

func (*Postgres) CreateServiceToken

func (p *Postgres) CreateServiceToken(ctx context.Context, serviceToken *api.ServiceToken) error

func (*Postgres) CreateWorkflow

func (p *Postgres) CreateWorkflow(ctx context.Context, workflow *api.Workflow) error

func (*Postgres) DeleteAPIToken

func (p *Postgres) DeleteAPIToken(ctx context.Context, token string) error

func (*Postgres) DeleteAccount

func (p *Postgres) DeleteAccount(ctx context.Context, username string) error

func (*Postgres) DeleteAuthenticatorKey added in v0.3.1

func (p *Postgres) DeleteAuthenticatorKey(ctx context.Context, key string) error

func (*Postgres) DeleteNamespace

func (p *Postgres) DeleteNamespace(ctx context.Context, id string) error

func (*Postgres) DeleteQueueWorkflow

func (p *Postgres) DeleteQueueWorkflow(ctx context.Context, id string) error

func (*Postgres) DeleteServiceToken

func (p *Postgres) DeleteServiceToken(ctx context.Context, token string) error

func (*Postgres) DeleteWorkflow

func (p *Postgres) DeleteWorkflow(ctx context.Context, id string) error

func (*Postgres) GetAPIToken

func (p *Postgres) GetAPIToken(ctx context.Context, token string) (*api.APIToken, error)

func (*Postgres) GetAPITokens

func (p *Postgres) GetAPITokens(ctx context.Context) ([]*api.APIToken, error)

func (*Postgres) GetAccount

func (p *Postgres) GetAccount(ctx context.Context, username string) (*api.Account, error)

func (*Postgres) GetAccountByID

func (p *Postgres) GetAccountByID(ctx context.Context, id string) (*api.Account, error)

func (*Postgres) GetAccounts

func (p *Postgres) GetAccounts(ctx context.Context) ([]*api.Account, error)

func (*Postgres) GetAuthenticatorKey

func (p *Postgres) GetAuthenticatorKey(ctx context.Context, a auth.Authenticator, key string) ([]byte, error)

func (*Postgres) GetAuthenticatorKeys

func (p *Postgres) GetAuthenticatorKeys(ctx context.Context, a auth.Authenticator, prefix string) ([][]byte, error)

func (*Postgres) GetNamespace

func (p *Postgres) GetNamespace(ctx context.Context, id string) (*api.Namespace, error)

func (*Postgres) GetNamespaces

func (p *Postgres) GetNamespaces(ctx context.Context) ([]*api.Namespace, error)

func (*Postgres) GetNextQueueWorkflow

func (p *Postgres) GetNextQueueWorkflow(ctx context.Context, queueType string, scope *api.ProcessorScope) (*api.Workflow, error)

func (*Postgres) GetPendingWorkflowsCount added in v0.3.1

func (p *Postgres) GetPendingWorkflowsCount(ctx context.Context) (uint64, error)

func (*Postgres) GetServiceToken

func (p *Postgres) GetServiceToken(ctx context.Context, token string) (*api.ServiceToken, error)

func (*Postgres) GetServiceTokens

func (p *Postgres) GetServiceTokens(ctx context.Context) ([]*api.ServiceToken, error)

func (*Postgres) GetTotalProcessorsCount added in v0.3.1

func (p *Postgres) GetTotalProcessorsCount(ctx context.Context) (uint64, error)

func (*Postgres) GetTotalWorkflowsCount added in v0.3.1

func (p *Postgres) GetTotalWorkflowsCount(ctx context.Context) (uint64, error)

func (*Postgres) GetWorkflow

func (p *Postgres) GetWorkflow(ctx context.Context, id string) (*api.Workflow, error)

func (*Postgres) GetWorkflows

func (p *Postgres) GetWorkflows(ctx context.Context) ([]*api.Workflow, error)

func (*Postgres) SetAuthenticatorKey

func (p *Postgres) SetAuthenticatorKey(ctx context.Context, a auth.Authenticator, key string, value []byte, ttl time.Duration) error

func (*Postgres) UpdateAPIToken

func (p *Postgres) UpdateAPIToken(ctx context.Context, apiToken *api.APIToken) error

func (*Postgres) UpdateAccount

func (p *Postgres) UpdateAccount(ctx context.Context, account *api.Account) error

func (*Postgres) UpdateNamespace

func (p *Postgres) UpdateNamespace(ctx context.Context, namespace *api.Namespace) error

func (*Postgres) UpdateServiceToken

func (p *Postgres) UpdateServiceToken(ctx context.Context, serviceToken *api.ServiceToken) error

func (*Postgres) UpdateWorkflow

func (p *Postgres) UpdateWorkflow(ctx context.Context, workflow *api.Workflow) error

Jump to

Keyboard shortcuts

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