This repository has been archived on 2024-04-25. You can view files and clone it, but cannot push or open issues or pull requests.
golang-rest-example/pkg/api/healthz.go
2024-02-02 15:39:13 +01:00

15 lines
270 B
Go

package api
import (
"context"
"github.com/mentos1386/golang-rest-example/pkg/openapi"
)
func (u *ApiService) HealthzGet(ctx context.Context) (*openapi.Ok, error) {
err := u.db.Ping()
if err != nil {
return nil, err
}
return &openapi.Ok{Message: "OK"}, nil
}