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.
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.
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.
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.
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.
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.
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.
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.
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 ¶
- Variables
- type ByCreatedAt
- type Datastore
- func (d *Datastore) ChangePassword(ctx context.Context, account *api.Account, password []byte) error
- func (d *Datastore) ClearCacheObject(ctx context.Context, key string) error
- func (d *Datastore) ClearLatestRenderCache(ctx context.Context, jobID string, frame int64) error
- func (d *Datastore) CompositeFrameRender(ctx context.Context, jobID string, frame int64) ([]byte, error)
- func (d *Datastore) CreateAccount(ctx context.Context, account *api.Account) error
- func (d *Datastore) CreateJobArchive(ctx context.Context, jobID string) error
- func (d *Datastore) DeleteAccount(ctx context.Context, username string) error
- func (d *Datastore) DeleteJob(ctx context.Context, jobID string) error
- func (d *Datastore) DeleteRenders(ctx context.Context, id string) error
- func (d *Datastore) GetAccount(ctx context.Context, username string) (*api.Account, error)
- func (d *Datastore) GetAccounts(ctx context.Context) ([]*api.Account, error)
- func (d *Datastore) GetAuthenticatorKey(ctx context.Context, a auth.Authenticator, key string) ([]byte, error)
- func (d *Datastore) GetCacheObject(ctx context.Context, key string) ([]byte, error)
- func (d *Datastore) GetCompositeRender(ctx context.Context, jobID string, frame int64, ttl time.Duration) (string, error)
- func (d *Datastore) GetJob(ctx context.Context, jobID string) (*api.Job, error)
- func (d *Datastore) GetJobArchiveStatus(ctx context.Context, jobID string) (*api.JobArchive, error)
- func (d *Datastore) GetJobLog(ctx context.Context, jobID string) (*api.JobLog, error)
- func (d *Datastore) GetJobs(ctx context.Context) ([]*api.Job, error)
- func (d *Datastore) GetLatestRender(ctx context.Context, jobID string, frame int64, ttl time.Duration) (string, error)
- func (d *Datastore) GetRenderLog(ctx context.Context, jobID string, frame int64, slice int64) (*api.RenderLog, error)
- func (d *Datastore) GetWorker(ctx context.Context, name string) (*api.Worker, error)
- func (d *Datastore) GetWorkers(ctx context.Context) ([]*api.Worker, error)
- func (d *Datastore) ResolveJob(ctx context.Context, jobID string) error
- func (d *Datastore) SetAuthenticatorKey(ctx context.Context, a auth.Authenticator, key string, value []byte, ...) error
- func (d *Datastore) SetCacheObject(ctx context.Context, key string, value []byte, ttl time.Duration) error
- func (d *Datastore) UpdateAccount(ctx context.Context, account *api.Account) error
- func (d *Datastore) UpdateJob(ctx context.Context, jobID string, o interface{}) error
- func (d *Datastore) UpdateJobLog(ctx context.Context, log *api.JobLog) error
- func (d *Datastore) UpdateWorkerInfo(ctx context.Context, w *api.Worker) error
Constants ¶
This section is empty.
Variables ¶
var ( // ErrAccountDoesNotExist is returned when an account cannot be found ErrAccountDoesNotExist = errors.New("account does not exist") )
var ( // ErrJobNotFound is returned when the specified job cannot be found ErrJobNotFound = errors.New("job not found") )
Functions ¶
This section is empty.
Types ¶
type ByCreatedAt ¶
func (ByCreatedAt) Len ¶
func (s ByCreatedAt) Len() int
func (ByCreatedAt) Less ¶
func (s ByCreatedAt) Less(i, j int) bool
func (ByCreatedAt) Swap ¶
func (s ByCreatedAt) Swap(i, j int)
type Datastore ¶
type Datastore struct {
// contains filtered or unexported fields
}
func (*Datastore) ChangePassword ¶
func (*Datastore) ClearCacheObject ¶
func (*Datastore) ClearLatestRenderCache ¶
func (*Datastore) CompositeFrameRender ¶
func (*Datastore) CreateAccount ¶
func (*Datastore) CreateJobArchive ¶
CreateJobArchive creates a zip archive of the job and stores a signed url from the storage service
func (*Datastore) DeleteAccount ¶
func (*Datastore) DeleteRenders ¶
func (*Datastore) GetAccount ¶
func (*Datastore) GetAccounts ¶
func (*Datastore) GetAuthenticatorKey ¶
func (d *Datastore) GetAuthenticatorKey(ctx context.Context, a auth.Authenticator, key string) ([]byte, error)
GetAuthenticatorKey is a helper func for authenticators to get authenticator specific keys
func (*Datastore) GetCacheObject ¶
func (*Datastore) GetCompositeRender ¶
func (*Datastore) GetJobArchiveStatus ¶
func (*Datastore) GetLatestRender ¶
func (*Datastore) GetRenderLog ¶
func (d *Datastore) GetRenderLog(ctx context.Context, jobID string, frame int64, slice int64) (*api.RenderLog, error)
GetRenderLog gets the specified render log for the job
func (*Datastore) GetWorkers ¶
func (*Datastore) ResolveJob ¶
ResolveJob resolves a job from all frame and slice jobs and stores the result in the database
func (*Datastore) SetAuthenticatorKey ¶
func (d *Datastore) SetAuthenticatorKey(ctx context.Context, a auth.Authenticator, key string, value []byte, ttl time.Duration) error
SetAuthenticatorKey is a helper func for authenticators to store authenticator specific data
func (*Datastore) SetCacheObject ¶
func (*Datastore) UpdateAccount ¶
func (*Datastore) UpdateJobLog ¶
UpdateJobLog updates the specified job log