server

package
v1.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

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 (*HealthChecker) Watch

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL