53 lines
1.7 KiB
Go
53 lines
1.7 KiB
Go
|
// Code generated by ogen, DO NOT EDIT.
|
||
|
|
||
|
package api
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
)
|
||
|
|
||
|
// Handler handles operations described by OpenAPI v3 specification.
|
||
|
type Handler interface {
|
||
|
// 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
|
||
|
// 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
|
||
|
}
|