2024-12-14 19:55:56 +00:00
|
|
|
// Code generated by ogen, DO NOT EDIT.
|
|
|
|
|
|
|
|
package api
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Handler handles operations described by OpenAPI v3 specification.
|
|
|
|
type Handler interface {
|
2024-12-18 02:12:00 +00:00
|
|
|
// ActionSubmissionAccepted implements actionSubmissionAccepted operation.
|
|
|
|
//
|
|
|
|
// (Internal endpoint) Role Validator changes status from Validating -> Accepted.
|
|
|
|
//
|
|
|
|
// POST /submissions/{SubmissionID}/status/validator-failed
|
|
|
|
ActionSubmissionAccepted(ctx context.Context, params ActionSubmissionAcceptedParams) error
|
2024-12-14 19:55:56 +00:00
|
|
|
// ActionSubmissionReleased implements actionSubmissionReleased operation.
|
|
|
|
//
|
|
|
|
// (Internal endpoint) Role Releaser changes status from releasing -> released.
|
|
|
|
//
|
|
|
|
// POST /submissions/{SubmissionID}/status/releaser-released
|
|
|
|
ActionSubmissionReleased(ctx context.Context, params ActionSubmissionReleasedParams) error
|
|
|
|
// ActionSubmissionUploaded implements actionSubmissionUploaded operation.
|
|
|
|
//
|
|
|
|
// (Internal endpoint) Role Validator changes status from Uploading -> Uploaded.
|
|
|
|
//
|
|
|
|
// POST /submissions/{SubmissionID}/status/validator-uploaded
|
|
|
|
ActionSubmissionUploaded(ctx context.Context, params ActionSubmissionUploadedParams) error
|
|
|
|
// ActionSubmissionValidated implements actionSubmissionValidated operation.
|
|
|
|
//
|
|
|
|
// (Internal endpoint) Role Validator changes status from Validating -> Validated.
|
|
|
|
//
|
|
|
|
// POST /submissions/{SubmissionID}/status/validator-validated
|
|
|
|
ActionSubmissionValidated(ctx context.Context, params ActionSubmissionValidatedParams) error
|
2024-12-18 02:12:00 +00:00
|
|
|
// CreateScript implements createScript operation.
|
|
|
|
//
|
|
|
|
// Create a new script.
|
|
|
|
//
|
|
|
|
// POST /scripts
|
|
|
|
CreateScript(ctx context.Context, req *ScriptCreate) (*ID, error)
|
|
|
|
// CreateScriptPolicy implements createScriptPolicy operation.
|
|
|
|
//
|
|
|
|
// Create a new script policy.
|
|
|
|
//
|
|
|
|
// POST /script-policy
|
|
|
|
CreateScriptPolicy(ctx context.Context, req *ScriptPolicyCreate) (*ID, error)
|
|
|
|
// GetScript implements getScript operation.
|
|
|
|
//
|
|
|
|
// Get the specified script by ID.
|
|
|
|
//
|
|
|
|
// GET /scripts/{ScriptID}
|
|
|
|
GetScript(ctx context.Context, params GetScriptParams) (*Script, error)
|
2024-12-18 23:06:39 +00:00
|
|
|
// ListScriptPolicy implements listScriptPolicy operation.
|
2024-12-18 02:12:00 +00:00
|
|
|
//
|
2024-12-18 23:06:39 +00:00
|
|
|
// Get list of script policies.
|
2024-12-18 02:12:00 +00:00
|
|
|
//
|
2024-12-18 23:06:39 +00:00
|
|
|
// GET /script-policy
|
|
|
|
ListScriptPolicy(ctx context.Context, params ListScriptPolicyParams) ([]ScriptPolicy, error)
|
|
|
|
// ListScripts implements listScripts operation.
|
|
|
|
//
|
|
|
|
// Get list of scripts.
|
|
|
|
//
|
|
|
|
// GET /scripts
|
|
|
|
ListScripts(ctx context.Context, params ListScriptsParams) ([]Script, error)
|
2024-12-18 02:12:00 +00:00
|
|
|
// UpdateSubmissionModel implements updateSubmissionModel operation.
|
|
|
|
//
|
|
|
|
// Update model following role restrictions.
|
|
|
|
//
|
|
|
|
// POST /submissions/{SubmissionID}/model
|
|
|
|
UpdateSubmissionModel(ctx context.Context, params UpdateSubmissionModelParams) error
|
2024-12-14 19:55:56 +00:00
|
|
|
// NewError creates *ErrorStatusCode from error returned by handler.
|
|
|
|
//
|
|
|
|
// Used for common default response.
|
|
|
|
NewError(ctx context.Context, err error) *ErrorStatusCode
|
|
|
|
}
|
|
|
|
|
|
|
|
// Server implements http server based on OpenAPI v3 specification and
|
|
|
|
// calls Handler to handle requests.
|
|
|
|
type Server struct {
|
|
|
|
h Handler
|
|
|
|
baseServer
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewServer creates new Server.
|
|
|
|
func NewServer(h Handler, opts ...ServerOption) (*Server, error) {
|
|
|
|
s, err := newServerConfig(opts...).baseServer()
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return &Server{
|
|
|
|
h: h,
|
|
|
|
baseServer: s,
|
|
|
|
}, nil
|
|
|
|
}
|