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.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Datastore ¶
type Datastore interface {
GetAccounts(ctx context.Context) ([]*accountsapi.Account, error)
GetAccount(ctx context.Context, username string) (*accountsapi.Account, error)
GetAccountByID(ctx context.Context, id string) (*accountsapi.Account, error)
CreateAccount(ctx context.Context, account *accountsapi.Account) error
UpdateAccount(ctx context.Context, account *accountsapi.Account) error
ChangePassword(ctx context.Context, account *accountsapi.Account, password []byte) error
DeleteAccount(ctx context.Context, username string) error
GetAuthenticatorKey(ctx context.Context, a auth.Authenticator, key string) ([]byte, error)
SetAuthenticatorKey(ctx context.Context, a auth.Authenticator, key string, value []byte, ttl time.Duration) error
GetAuthenticatorKeys(ctx context.Context, a auth.Authenticator, prefix string) ([][]byte, error)
GetNamespaces(ctx context.Context) ([]*accountsapi.Namespace, error)
GetNamespace(ctx context.Context, id string) (*accountsapi.Namespace, error)
CreateNamespace(ctx context.Context, namespace *accountsapi.Namespace) (string, error)
UpdateNamespace(ctx context.Context, namespace *accountsapi.Namespace) error
DeleteNamespace(ctx context.Context, id string) error
GetWorkflows(ctx context.Context) ([]*workflowsapi.Workflow, error)
GetWorkflow(ctx context.Context, id string) (*workflowsapi.Workflow, error)
CreateWorkflow(ctx context.Context, workflow *workflowsapi.Workflow) error
UpdateWorkflow(ctx context.Context, workflow *workflowsapi.Workflow) error
DeleteWorkflow(ctx context.Context, id string) error
GetServiceTokens(ctx context.Context) ([]*accountsapi.ServiceToken, error)
GetServiceToken(ctx context.Context, token string) (*accountsapi.ServiceToken, error)
CreateServiceToken(ctx context.Context, t *accountsapi.ServiceToken) error
UpdateServiceToken(ctx context.Context, t *accountsapi.ServiceToken) error
DeleteServiceToken(ctx context.Context, token string) error
GetAPITokens(ctx context.Context) ([]*accountsapi.APIToken, error)
GetAPIToken(ctx context.Context, token string) (*accountsapi.APIToken, error)
CreateAPIToken(ctx context.Context, t *accountsapi.APIToken) error
UpdateAPIToken(ctx context.Context, t *accountsapi.APIToken) error
DeleteAPIToken(ctx context.Context, token string) error
GetNextQueueWorkflow(ctx context.Context, queueType string, scope *workflowsapi.ProcessorScope) (*workflowsapi.Workflow, error)
CreateQueueWorkflow(ctx context.Context, w *workflowsapi.Workflow) error
DeleteQueueWorkflow(ctx context.Context, id string) error
}
func NewDatastore ¶
Click to show internal directories.
Click to hide internal directories.