github.com/circl-dev/go-swagger@v0.31.0/examples/auto-configure/implementation/handler.go (about) 1 package implementation 2 3 import ( 4 "sync" 5 6 "github.com/circl-dev/go-swagger/examples/auto-configure/models" 7 ) 8 9 // HandlerImpl implements all required configuration and api handling 10 // functionalities for todo list server backend 11 type HandlerImpl struct { 12 TodosHandlerImpl 13 ConfigureImpl 14 AuthImpl 15 } 16 17 func New() *HandlerImpl { 18 return &HandlerImpl{ 19 TodosHandlerImpl: TodosHandlerImpl{ 20 lock: sync.Mutex{}, 21 items: make(map[int64]*models.Item), 22 idx: 0, 23 }, 24 ConfigureImpl: ConfigureImpl{ 25 flags: Flags{}, 26 }, 27 AuthImpl: AuthImpl{}, 28 } 29 }