server/pkg/loafer/web/annotation/pgx.go

27 lines
523 B
Go
Raw Permalink Normal View History

2019-11-19 14:23:33 +00:00
package annotation
import (
"reflect"
"git.loafle.net/loafer/annotation-go"
)
var PgxAnnotationType = reflect.TypeOf((*PgxAnnotation)(nil))
func init() {
if err := annotation.Register(PgxAnnotationType); nil != err {
panic(err)
}
}
type PgxAnnotation struct {
annotation.TypeAnnotation `@annotation:"@web:Pgx"`
Host string `json:"host"`
Port uint16 `json:"port"`
Database string `json:"database"`
User string `json:"user"`
Password string `json:"password"`
SSLMode bool `json:"sslMode"`
}