Some checks failed
Build Push and Restart Compose / deploy (push) Failing after 1m47s
- `github.com/lib/pq` PostgreSQL 드라이버 vendor 디렉토리에 추가. - PostgreSQL 관련 내부 패키지(`pqsql`, `proto`, `pqtime`, `pgpass`, `pgservice`, `pqutil`) 구현: - SQL 어휘 처리, 프로토콜 상수 및 구조 정의, 시간 파서/포맷터(`Parse`, `Format`). - `.pgpass` 파일 및 `pg_service.conf` 관리 기능 추가. - 파일/사용자 권한 검증 및 플랫폼별 사용자 정보 조회 기능 포함. - 데이터베이스 초기화 로직 추가 (`services/db.go`): - PostgreSQL 연결 설정 및 초기 스키마 생성. - 자동매매 관련 DB 레포지토리(`services/autotrade_repo.go`) 구현: - 자동매매 규칙 및 포지션 관리 로직 추가 (`dbInsertRule`, `dbLoadRules` 등).
36 lines
1.0 KiB
Go
36 lines
1.0 KiB
Go
//go:generate go run gen.go
|
|
|
|
// Package pqerror contains PostgreSQL error codes for use with pq.Error.
|
|
package pqerror
|
|
|
|
// Code is a five-character error code.
|
|
type Code string
|
|
|
|
// Name returns a more human friendly rendering of the error code, namely the
|
|
// "condition name".
|
|
func (ec Code) Name() string { return errorCodeNames[ec] }
|
|
|
|
// Class returns the error class, e.g. "28".
|
|
func (ec Code) Class() Class { return Class(ec[:2]) }
|
|
|
|
// Class is only the class part of an error code.
|
|
type Class string
|
|
|
|
// Name returns the condition name of an error class. It is equivalent to the
|
|
// condition name of the "standard" error code (i.e. the one having the last
|
|
// three characters "000").
|
|
func (ec Class) Name() string { return errorCodeNames[Code(ec+"000")] }
|
|
|
|
// TODO(v2): use "type Severity string" for the below.
|
|
|
|
// Error severity values.
|
|
const (
|
|
SeverityFatal = "FATAL"
|
|
SeverityPanic = "PANIC"
|
|
SeverityWarning = "WARNING"
|
|
SeverityNotice = "NOTICE"
|
|
SeverityDebug = "DEBUG"
|
|
SeverityInfo = "INFO"
|
|
SeverityLog = "LOG"
|
|
)
|