Documentation ¶
Index ¶
- Constants
- type Postgres
- func (p *Postgres) GetSavedResponse(ctx context.Context, inputType, requestParam string) (string, error)
- func (p *Postgres) SaveResponse(ctx context.Context, responseJson, inputType, requestParam string) error
- func (p *Postgres) SaveUserResponse(ctx context.Context, userID int, zone, inputType, requestParam string) error
Constants ¶
View Source
const ( GetScanResults = ` SELECT response FROM scan_results WHERE input_type = $1 AND request = $2 FOR UPDATE ` UpdateScanResults = ` UPDATE scan_results SET access_count = access_count + 1 WHERE input_type = $1 AND request = $2 ` SaveScanResults = `` /* 311-byte string literal not displayed */ SaveUserScanStats = `` /* 305-byte string literal not displayed */ )
View Source
const (
PostgresMaxRecords = 10000
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Postgres ¶
type Postgres struct {
// contains filtered or unexported fields
}
func (*Postgres) GetSavedResponse ¶
func (p *Postgres) GetSavedResponse(ctx context.Context, inputType, requestParam string) (string, error)
GetSavedResponse берем сохраненный ответ из PostgreSQL и обновляем access_count
func (*Postgres) SaveResponse ¶
Click to show internal directories.
Click to hide internal directories.