db

package
v0.13.0-pre5 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ComponentVersion

type ComponentVersion struct {
	ID        int32     `json:"id"`
	Component string    `json:"component"`
	Version   string    `json:"version"`
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
}

type DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type DiscordServer added in v0.12.1

type DiscordServer struct {
	ID        int32     `json:"id"`
	ServerID  string    `json:"serverID"`
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
}

type EncodeTask

type EncodeTask struct {
	ID        int32     `json:"id"`
	TaskID    string    `json:"taskID"`
	Status    string    `json:"status"`
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
}

type GetRecordedFilesRow added in v0.13.0

type GetRecordedFilesRow struct {
	ProgramID          int64          `json:"programID"`
	M2tsPath           sql.NullString `json:"m2tsPath"`
	Mp4Path            sql.NullString `json:"mp4Path"`
	Aribb24TxtPath     sql.NullString `json:"aribb24TxtPath"`
	TranscribedTxtPath sql.NullString `json:"transcribedTxtPath"`
	Json               string         `json:"json"`
	StartAt            int64          `json:"startAt"`
	Duration           int32          `json:"duration"`
	Name               string         `json:"name"`
	Description        string         `json:"description"`
	Genre              string         `json:"genre"`
	ServiceName        string         `json:"serviceName"`
}

type InsertComponentVersionParams

type InsertComponentVersionParams struct {
	Component string `json:"component"`
	Version   string `json:"version"`
}

type InsertEncodeTaskParams

type InsertEncodeTaskParams struct {
	TaskID string `json:"taskID"`
	Status string `json:"status"`
}

type InsertProgramMessageParams

type InsertProgramMessageParams struct {
	MessageID string `json:"messageID"`
	ProgramID int64  `json:"programID"`
	ChannelID string `json:"channelID"`
}

type InsertProgramRecordingParams

type InsertProgramRecordingParams struct {
	ProgramID   int64  `json:"programID"`
	ContentPath string `json:"contentPath"`
}

type InsertProgramServiceParams

type InsertProgramServiceParams struct {
	ProgramID int64 `json:"programID"`
	ServiceID int64 `json:"serviceID"`
}

type InsertRecordedFilesParams

type InsertRecordedFilesParams struct {
	ProgramID int64          `json:"programID"`
	M2tsPath  sql.NullString `json:"m2tsPath"`
}

type InsertTranscribeTaskParams

type InsertTranscribeTaskParams struct {
	TaskID string `json:"taskID"`
	Status string `json:"status"`
}

type ListProgramWithMessageAndServiceNameRow added in v0.13.0

type ListProgramWithMessageAndServiceNameRow struct {
	ProgramID   int64  `json:"programID"`
	Json        string `json:"json"`
	EventID     int32  `json:"eventID"`
	ServiceID   int32  `json:"serviceID"`
	NetworkID   int32  `json:"networkID"`
	StartAt     int64  `json:"startAt"`
	Duration    int32  `json:"duration"`
	IsFree      bool   `json:"isFree"`
	Name        string `json:"name"`
	Description string `json:"description"`
	Genre       string `json:"genre"`
	ChannelID   string `json:"channelID"`
	MessageID   string `json:"messageID"`
	ServiceName string `json:"serviceName"`
}

type ListRecordedFilesRow added in v0.13.0

type ListRecordedFilesRow struct {
	ProgramID          int64          `json:"programID"`
	M2tsPath           sql.NullString `json:"m2tsPath"`
	Mp4Path            sql.NullString `json:"mp4Path"`
	Aribb24TxtPath     sql.NullString `json:"aribb24TxtPath"`
	TranscribedTxtPath sql.NullString `json:"transcribedTxtPath"`
	Json               string         `json:"json"`
	StartAt            int64          `json:"startAt"`
	Duration           int32          `json:"duration"`
	Name               string         `json:"name"`
	Description        string         `json:"description"`
	Genre              string         `json:"genre"`
	ServiceName        string         `json:"serviceName"`
}

type Program

type Program struct {
	ID          int64     `json:"id"`
	Json        string    `json:"-"`
	EventID     int32     `json:"eventId"`
	ServiceID   int32     `json:"serviceId"`
	NetworkID   int32     `json:"networkId"`
	StartAt     int64     `json:"startAt"`
	Duration    int32     `json:"duration"`
	IsFree      bool      `json:"isFree"`
	Name        string    `json:"name"`
	Description string    `json:"description"`
	Genre       string    `json:"-"`
	CreatedAt   time.Time `json:"-"`
	UpdatedAt   time.Time `json:"-"`
}

func (*Program) StartTime

func (p *Program) StartTime() time.Time

func (*Program) UnmarshalJSON

func (p *Program) UnmarshalJSON(b []byte) error

type ProgramMessage

type ProgramMessage struct {
	ID        int32     `json:"id"`
	ChannelID string    `json:"channelID"`
	MessageID string    `json:"messageID"`
	ProgramID int64     `json:"programID"`
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
}

type ProgramRecording

type ProgramRecording struct {
	ID          int32     `json:"id"`
	ProgramID   int64     `json:"programID"`
	ContentPath string    `json:"contentPath"`
	CreatedAt   time.Time `json:"createdAt"`
	UpdatedAt   time.Time `json:"updatedAt"`
}

type ProgramService

type ProgramService struct {
	ID        int32     `json:"id"`
	ProgramID int64     `json:"programID"`
	ServiceID int64     `json:"serviceID"`
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) CreateOrUpdateService

func (q *Queries) CreateOrUpdateService(ctx context.Context, service Service) error

func (*Queries) DeleteProgramRecordingByProgramId

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

func (*Queries) GetComponentVersion

func (q *Queries) GetComponentVersion(ctx context.Context, component string) (ComponentVersion, error)

func (*Queries) GetEncodeTaskByTaskID

func (q *Queries) GetEncodeTaskByTaskID(ctx context.Context, taskID string) (EncodeTask, error)

func (*Queries) GetProgram

func (q *Queries) GetProgram(ctx context.Context, id int64) (Program, error)

func (*Queries) GetProgramMessageByMessageID

func (q *Queries) GetProgramMessageByMessageID(ctx context.Context, messageID string) (ProgramMessage, error)

func (*Queries) GetProgramMessageByProgramID

func (q *Queries) GetProgramMessageByProgramID(ctx context.Context, programID int64) (ProgramMessage, error)

func (*Queries) GetProgramRecording

func (q *Queries) GetProgramRecording(ctx context.Context, id int32) (ProgramRecording, error)

func (*Queries) GetProgramRecordingByProgramId

func (q *Queries) GetProgramRecordingByProgramId(ctx context.Context, programID int64) (ProgramRecording, error)

func (*Queries) GetProgramServiceByProgramID

func (q *Queries) GetProgramServiceByProgramID(ctx context.Context, programID int64) (ProgramService, error)

func (*Queries) GetProgramServiceByServiceID

func (q *Queries) GetProgramServiceByServiceID(ctx context.Context, serviceID int64) (ProgramService, error)

func (*Queries) GetRecordedFiles added in v0.13.0

func (q *Queries) GetRecordedFiles(ctx context.Context, programID int64) (GetRecordedFilesRow, error)

func (*Queries) GetService

func (q *Queries) GetService(ctx context.Context, id int64) (Service, error)

func (*Queries) GetServiceByProgramID

func (q *Queries) GetServiceByProgramID(ctx context.Context, programID int64) (Service, error)

func (*Queries) GetTranscribeTaskByTaskID

func (q *Queries) GetTranscribeTaskByTaskID(ctx context.Context, taskID string) (TranscribeTask, error)

func (*Queries) InsertComponentVersion

func (q *Queries) InsertComponentVersion(ctx context.Context, arg InsertComponentVersionParams) error

func (*Queries) InsertEncodeTask

func (q *Queries) InsertEncodeTask(ctx context.Context, arg InsertEncodeTaskParams) error

func (*Queries) InsertProgram

func (q *Queries) InsertProgram(ctx context.Context, p Program) error

func (*Queries) InsertProgramMessage

func (q *Queries) InsertProgramMessage(ctx context.Context, arg InsertProgramMessageParams) error

func (*Queries) InsertProgramRecording

func (q *Queries) InsertProgramRecording(ctx context.Context, arg InsertProgramRecordingParams) error

func (*Queries) InsertProgramService

func (q *Queries) InsertProgramService(ctx context.Context, arg InsertProgramServiceParams) error

func (*Queries) InsertRecordedFiles

func (q *Queries) InsertRecordedFiles(ctx context.Context, arg InsertRecordedFilesParams) error

func (*Queries) InsertServerId added in v0.12.1

func (q *Queries) InsertServerId(ctx context.Context, serverID string) error

func (*Queries) InsertTranscribeTask

func (q *Queries) InsertTranscribeTask(ctx context.Context, arg InsertTranscribeTaskParams) error

func (*Queries) ListProgramWithMessageAndServiceName added in v0.13.0

func (q *Queries) ListProgramWithMessageAndServiceName(ctx context.Context) ([]ListProgramWithMessageAndServiceNameRow, error)

func (*Queries) ListRecordedFiles added in v0.13.0

func (q *Queries) ListRecordedFiles(ctx context.Context) ([]ListRecordedFilesRow, error)

func (*Queries) UpdateComponentVersion

func (q *Queries) UpdateComponentVersion(ctx context.Context, arg UpdateComponentVersionParams) error

func (*Queries) UpdateProgram

func (q *Queries) UpdateProgram(ctx context.Context, p Program) error

func (*Queries) UpdateRecordedFilesAribb24Txt

func (q *Queries) UpdateRecordedFilesAribb24Txt(ctx context.Context, arg UpdateRecordedFilesAribb24TxtParams) error

func (*Queries) UpdateRecordedFilesMp4

func (q *Queries) UpdateRecordedFilesMp4(ctx context.Context, arg UpdateRecordedFilesMp4Params) error

func (*Queries) UpdateRecordedFilesTranscribedTxt

func (q *Queries) UpdateRecordedFilesTranscribedTxt(ctx context.Context, arg UpdateRecordedFilesTranscribedTxtParams) error

func (*Queries) WithTx

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

type RecordedFile

type RecordedFile struct {
	ID                 int32          `json:"id"`
	ProgramID          int64          `json:"programID"`
	M2tsPath           sql.NullString `json:"m2tsPath"`
	Mp4Path            sql.NullString `json:"mp4Path"`
	Aribb24TxtPath     sql.NullString `json:"aribb24TxtPath"`
	TranscribedTxtPath sql.NullString `json:"transcribedTxtPath"`
	CreatedAt          time.Time      `json:"createdAt"`
	UpdatedAt          time.Time      `json:"updatedAt"`
}

type Service

type Service struct {
	ID                 int64     `json:"id"`
	ServiceID          int32     `json:"serviceId"`
	NetworkID          int32     `json:"networkId"`
	Type               int32     `json:"type"`
	LogoID             int32     `json:"logoID"`
	RemoteControlKeyID int32     `json:"remoteControlKeyId"`
	Name               string    `json:"name"`
	ChannelType        string    `json:"-"`
	Channel            string    `json:"-"`
	HasLogoData        bool      `json:"hasLogoData"`
	CreatedAt          time.Time `json:"-"`
	UpdatedAt          time.Time `json:"-"`
}

func (*Service) UnmarshalJSON

func (s *Service) UnmarshalJSON(b []byte) error

type TranscribeTask

type TranscribeTask struct {
	ID        int32     `json:"id"`
	TaskID    string    `json:"taskID"`
	Status    string    `json:"status"`
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
}

type UpdateComponentVersionParams

type UpdateComponentVersionParams struct {
	Version   string `json:"version"`
	Component string `json:"component"`
}

type UpdateRecordedFilesAribb24TxtParams

type UpdateRecordedFilesAribb24TxtParams struct {
	Aribb24TxtPath sql.NullString `json:"aribb24TxtPath"`
	ProgramID      int64          `json:"programID"`
}

type UpdateRecordedFilesMp4Params

type UpdateRecordedFilesMp4Params struct {
	Mp4Path   sql.NullString `json:"mp4Path"`
	ProgramID int64          `json:"programID"`
}

type UpdateRecordedFilesTranscribedTxtParams

type UpdateRecordedFilesTranscribedTxtParams struct {
	TranscribedTxtPath sql.NullString `json:"transcribedTxtPath"`
	ProgramID          int64          `json:"programID"`
}

Jump to

Keyboard shortcuts

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