27 lines
523 B
Go
27 lines
523 B
Go
|
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"`
|
||
|
}
|