db

package
v0.0.0-...-d530472 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const InsertSoraConnection = `` /* 551-byte string literal not displayed */
View Source
const InsertSoraUserAgentStats = `` /* 1097-byte string literal not displayed */
View Source
const TestDropSoraConnection = `-- name: TestDropSoraConnection :exec
DELETE FROM sora_connection
`
View Source
const TestDropSoraUserAgentStats = `-- name: TestDropSoraUserAgentStats :exec
DELETE FROM sora_user_agent_stats
`
View Source
const TestGetSoraConnection = `` /* 264-byte string literal not displayed */
View Source
const TestGetSoraConnectionCount = `-- name: TestGetSoraConnectionCount :one
SELECT count(*)
FROM sora_connection
`
View Source
const TestGetUserAgentStatsType = `` /* 168-byte string literal not displayed */
View Source
const TestGetUserAgentStatsTypeCount = `` /* 161-byte string literal not displayed */

Variables

This section is empty.

Functions

This section is empty.

Types

type DBTX

type DBTX interface {
	Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
	Query(context.Context, string, ...interface{}) (pgx.Rows, error)
	QueryRow(context.Context, string, ...interface{}) pgx.Row
}

type InsertSoraConnectionParams

type InsertSoraConnectionParams struct {
	Timestamp    time.Time          `json:"timestamp"`
	Label        string             `json:"label"`
	Version      string             `json:"version"`
	NodeName     string             `json:"node_name"`
	Multistream  bool               `json:"multistream"`
	Simulcast    bool               `json:"simulcast"`
	Spotlight    bool               `json:"spotlight"`
	Role         SoraConnectionRole `json:"role"`
	ChannelID    string             `json:"channel_id"`
	SessionID    string             `json:"session_id"`
	ClientID     string             `json:"client_id"`
	ConnectionID string             `json:"connection_id"`
}

type InsertSoraUserAgentStatsParams

type InsertSoraUserAgentStatsParams struct {
	Timestamp         time.Time    `json:"timestamp"`
	ChannelID         string       `json:"channel_id"`
	ConnectionID      string       `json:"connection_id"`
	RtcStatsTimestamp float64      `json:"rtc_stats_timestamp"`
	RtcStatsType      string       `json:"rtc_stats_type"`
	RtcStatsID        string       `json:"rtc_stats_id"`
	RtcStatsData      pgtype.JSONB `json:"rtc_stats_data"`
}

type NullSoraConnectionRole

type NullSoraConnectionRole struct {
	SoraConnectionRole SoraConnectionRole `json:"sora_connection_role"`
	Valid              bool               `json:"valid"` // Valid is true if SoraConnectionRole is not NULL
}

func (*NullSoraConnectionRole) Scan

func (ns *NullSoraConnectionRole) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullSoraConnectionRole) Value

func (ns NullSoraConnectionRole) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type Queries

type Queries struct {
	// contains filtered or unexported fields
}

func New

func New(db DBTX) *Queries

func (*Queries) InsertSoraConnection

func (q *Queries) InsertSoraConnection(ctx context.Context, arg InsertSoraConnectionParams) error

func (*Queries) InsertSoraUserAgentStats

func (q *Queries) InsertSoraUserAgentStats(ctx context.Context, arg InsertSoraUserAgentStatsParams) error

func (*Queries) TestDropSoraConnection

func (q *Queries) TestDropSoraConnection(ctx context.Context) error

func (*Queries) TestDropSoraUserAgentStats

func (q *Queries) TestDropSoraUserAgentStats(ctx context.Context) error

func (*Queries) TestGetSoraConnection

func (q *Queries) TestGetSoraConnection(ctx context.Context, arg TestGetSoraConnectionParams) (SoraConnection, error)

test query

func (*Queries) TestGetSoraConnectionCount

func (q *Queries) TestGetSoraConnectionCount(ctx context.Context) (int64, error)

func (*Queries) TestGetUserAgentStatsType

func (q *Queries) TestGetUserAgentStatsType(ctx context.Context, arg TestGetUserAgentStatsTypeParams) (string, error)

func (*Queries) TestGetUserAgentStatsTypeCount

func (q *Queries) TestGetUserAgentStatsTypeCount(ctx context.Context, arg TestGetUserAgentStatsTypeCountParams) (int64, error)

指定した channel_id と connection_id と rtc_stats_type のレコードがいくつあるかどうか

func (*Queries) WithTx

func (q *Queries) WithTx(tx pgx.Tx) *Queries

type SoraConnection

type SoraConnection struct {
	Pk           int64              `json:"pk"`
	Timestamp    time.Time          `json:"timestamp"`
	Version      string             `json:"version"`
	Label        string             `json:"label"`
	NodeName     string             `json:"node_name"`
	Multistream  bool               `json:"multistream"`
	Simulcast    bool               `json:"simulcast"`
	Spotlight    bool               `json:"spotlight"`
	Role         SoraConnectionRole `json:"role"`
	ChannelID    string             `json:"channel_id"`
	SessionID    string             `json:"session_id"`
	ClientID     string             `json:"client_id"`
	ConnectionID string             `json:"connection_id"`
	CreatedAt    time.Time          `json:"created_at"`
}

type SoraConnectionRole

type SoraConnectionRole string
const (
	SoraConnectionRoleSendrecv SoraConnectionRole = "sendrecv"
	SoraConnectionRoleSendonly SoraConnectionRole = "sendonly"
	SoraConnectionRoleRecvonly SoraConnectionRole = "recvonly"
)

func (*SoraConnectionRole) Scan

func (e *SoraConnectionRole) Scan(src interface{}) error

type SoraUserAgentStats

type SoraUserAgentStats struct {
	Timestamp         time.Time    `json:"timestamp"`
	ChannelID         string       `json:"channel_id"`
	ConnectionID      string       `json:"connection_id"`
	RtcStatsTimestamp float64      `json:"rtc_stats_timestamp"`
	RtcStatsType      string       `json:"rtc_stats_type"`
	RtcStatsID        string       `json:"rtc_stats_id"`
	RtcStatsData      pgtype.JSONB `json:"rtc_stats_data"`
	CreatedAt         time.Time    `json:"created_at"`
}

type TestGetSoraConnectionParams

type TestGetSoraConnectionParams struct {
	ChannelID    string `json:"channel_id"`
	ConnectionID string `json:"connection_id"`
}

type TestGetUserAgentStatsTypeCountParams

type TestGetUserAgentStatsTypeCountParams struct {
	RtcTypeStats string `json:"rtc_type_stats"`
	ChannelID    string `json:"channel_id"`
	ConnectionID string `json:"connection_id"`
}

type TestGetUserAgentStatsTypeParams

type TestGetUserAgentStatsTypeParams struct {
	ChannelID    string `json:"channel_id"`
	ConnectionID string `json:"connection_id"`
}

Jump to

Keyboard shortcuts

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