/
oas_server_gen.go
48 lines (43 loc) · 973 Bytes
/
oas_server_gen.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// Code generated by ogen, DO NOT EDIT.
package api
import (
"context"
)
// Handler handles operations described by OpenAPI v3 specification.
type Handler interface {
// Auth implements auth operation.
//
// OIDC Authorization.
//
// GET /auth
Auth(ctx context.Context) (AuthRes, error)
// Callback implements callback operation.
//
// OIDC Callback.
//
// GET /callback
Callback(ctx context.Context, params CallbackParams) (CallbackRes, error)
// Get implements GET / operation.
//
// Login.
//
// GET /
Get(ctx context.Context) (GetOK, error)
}
// 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
}