postgres

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Overview

Copyright 2022 Evan Hazlett

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

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) 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) 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) 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