Documentation
¶
Index ¶
- func StartPostgresServer(connConfig lib.PostgresConfig, host string, port int, tables ...interface{}) error
- type HealthChecker
- type PostgresDB
- func (p *PostgresDB) Create(ctx context.Context, params *pb.CreateParams) (*pb.RecordResponse, error)
- func (p *PostgresDB) Delete(ctx context.Context, params *pb.IdParams) (*pb.DeleteResponse, error)
- func (p *PostgresDB) Exec(ctx context.Context, params *pb.ExecParams) (*pb.ExecResponse, error)
- func (p *PostgresDB) Find(ctx context.Context, params *pb.FilterParams) (*pb.RecordsResponse, error)
- func (p *PostgresDB) Get(ctx context.Context, params *pb.FilterParams) (*pb.RecordResponse, error)
- func (p *PostgresDB) GetById(ctx context.Context, params *pb.IdParams) (*pb.RecordResponse, error)
- func (p *PostgresDB) Query(ctx context.Context, params *pb.QueryParams) (*pb.QueryResponse, error)
- func (p *PostgresDB) Sync(tables ...interface{}) error
- func (p *PostgresDB) Update(ctx context.Context, params *pb.UpdateParams) (*pb.RecordResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartPostgresServer ¶
func StartPostgresServer(connConfig lib.PostgresConfig, host string, port int, tables ...interface{}) error
Types ¶
type HealthChecker ¶
type HealthChecker struct {
// contains filtered or unexported fields
}
func NewHealthChecker ¶
func NewHealthChecker() *HealthChecker
func (*HealthChecker) Check ¶
func (s *HealthChecker) Check(ctx context.Context, req *health.HealthCheckRequest) (*health.HealthCheckResponse, error)
func (*HealthChecker) Watch ¶
func (s *HealthChecker) Watch(req *health.HealthCheckRequest, server health.Health_WatchServer) error
type PostgresDB ¶
type PostgresDB struct { pb.UnimplementedPostgresServer // contains filtered or unexported fields }
func NewPostgresDB ¶
func NewPostgresDB(conn *sql.Conn) *PostgresDB
func (*PostgresDB) Create ¶
func (p *PostgresDB) Create(ctx context.Context, params *pb.CreateParams) (*pb.RecordResponse, error)
func (*PostgresDB) Delete ¶
func (p *PostgresDB) Delete(ctx context.Context, params *pb.IdParams) (*pb.DeleteResponse, error)
func (*PostgresDB) Exec ¶
func (p *PostgresDB) Exec(ctx context.Context, params *pb.ExecParams) (*pb.ExecResponse, error)
func (*PostgresDB) Find ¶
func (p *PostgresDB) Find(ctx context.Context, params *pb.FilterParams) (*pb.RecordsResponse, error)
func (*PostgresDB) Get ¶
func (p *PostgresDB) Get(ctx context.Context, params *pb.FilterParams) (*pb.RecordResponse, error)
func (*PostgresDB) GetById ¶
func (p *PostgresDB) GetById(ctx context.Context, params *pb.IdParams) (*pb.RecordResponse, error)
func (*PostgresDB) Query ¶
func (p *PostgresDB) Query(ctx context.Context, params *pb.QueryParams) (*pb.QueryResponse, error)
func (*PostgresDB) Sync ¶
func (p *PostgresDB) Sync(tables ...interface{}) error
func (*PostgresDB) Update ¶
func (p *PostgresDB) Update(ctx context.Context, params *pb.UpdateParams) (*pb.RecordResponse, error)
Click to show internal directories.
Click to hide internal directories.