mirror of
https://github.com/mayswind/ezbookkeeping
synced 2026-04-21 21:47:54 +00:00
24 lines
586 B
Go
24 lines
586 B
Go
package api
|
|
|
|
import (
|
|
"github.com/mayswind/ezbookkeeping/pkg/core"
|
|
"github.com/mayswind/ezbookkeeping/pkg/errs"
|
|
)
|
|
|
|
// DefaultApi represents default api
|
|
type DefaultApi struct{}
|
|
|
|
// Initialize a default api singleton instance
|
|
var (
|
|
Default = &DefaultApi{}
|
|
)
|
|
|
|
// ApiNotFound returns api not found error
|
|
func (a *DefaultApi) ApiNotFound(c *core.WebContext) (any, *errs.Error) {
|
|
return nil, errs.ErrApiNotFound
|
|
}
|
|
|
|
// MethodNotAllowed returns method not allowed error
|
|
func (a *DefaultApi) MethodNotAllowed(c *core.WebContext) (any, *errs.Error) {
|
|
return nil, errs.ErrMethodNotAllowed
|
|
}
|