Documentation ¶
Index ¶
- type AddRoomMemberParams
- type Connection
- type CreateConnectionParams
- type CreateMachineParams
- type CreateRoomParams
- type DBTX
- type Machine
- type MachineTypeLeader
- type Queries
- func (q *Queries) AddRoomMember(ctx context.Context, arg AddRoomMemberParams) error
- func (q *Queries) CreateConnection(ctx context.Context, arg CreateConnectionParams) error
- func (q *Queries) CreateLeader(ctx context.Context, machineUuid string) error
- func (q *Queries) CreateMachine(ctx context.Context, arg CreateMachineParams) error
- func (q *Queries) CreateRoom(ctx context.Context, arg CreateRoomParams) error
- func (q *Queries) DeleteConnection(ctx context.Context, uuid string) error
- func (q *Queries) DeleteLeader(ctx context.Context, machineUuid string) error
- func (q *Queries) DeleteMachine(ctx context.Context, uuid string) error
- func (q *Queries) DeleteRoom(ctx context.Context, uuid string) error
- func (q *Queries) FindMachine(ctx context.Context, uuid string) (Connection, error)
- func (q *Queries) GetConnections(ctx context.Context) ([]Connection, error)
- func (q *Queries) GetConnectionsByMachine(ctx context.Context, machineUuid string) ([]Connection, error)
- func (q *Queries) GetLeaderForType(ctx context.Context, machineType string) (string, error)
- func (q *Queries) GetMachine(ctx context.Context, uuid string) (Machine, error)
- func (q *Queries) GetMachineLeaderCountByType(ctx context.Context, machineType string) (int64, error)
- func (q *Queries) GetMachines(ctx context.Context) ([]Machine, error)
- func (q *Queries) GetMachinesByType(ctx context.Context, machineType string) ([]Machine, error)
- func (q *Queries) GetMembershipByConnection(ctx context.Context, connectionUuid string) ([]string, error)
- func (q *Queries) GetOrphanedRooms(ctx context.Context) ([]Room, error)
- func (q *Queries) GetRoomMembers(ctx context.Context, roomUuid string) ([]string, error)
- func (q *Queries) GetRooms(ctx context.Context) ([]Room, error)
- func (q *Queries) GetRoomsByMachine(ctx context.Context, machineUuid string) ([]Room, error)
- func (q *Queries) RemoveRoomMember(ctx context.Context, arg RemoveRoomMemberParams) error
- func (q *Queries) SetMachineAsLeader(ctx context.Context, machineUuid string) error
- func (q *Queries) SetRoomOwner(ctx context.Context, arg SetRoomOwnerParams) error
- func (q *Queries) TouchConnection(ctx context.Context, uuid string) error
- func (q *Queries) TouchMachine(ctx context.Context, uuid string) error
- func (q *Queries) UpdateMachine(ctx context.Context, uuid string) error
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
- type RemoveRoomMemberParams
- type Room
- type RoomDatum
- type RoomMembership
- type SetRoomOwnerParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddRoomMemberParams ¶
type Connection ¶
type Connection struct { Uuid string MachineUuid string CreatedAt pgtype.Timestamptz LastUpdated pgtype.Timestamptz }
type CreateConnectionParams ¶
type CreateMachineParams ¶
type CreateRoomParams ¶
type MachineTypeLeader ¶
type MachineTypeLeader struct {
MachineUuid string
}
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) AddRoomMember ¶
func (q *Queries) AddRoomMember(ctx context.Context, arg AddRoomMemberParams) error
CREATE TABLE room_membership (
connection_uuid TEXT NOT NULL REFERENCES connections(uuid) ON DELETE CASCADE, room_uuid TEXT NOT NULL REFERENCES rooms(uuid) ON DELETE CASCADE
);
func (*Queries) CreateConnection ¶
func (q *Queries) CreateConnection(ctx context.Context, arg CreateConnectionParams) error
CREATE TABLE connections (
uuid TEXT PRIMARY KEY, machine_uuid TEXT NOT NULL REFERENCES machines(uuid) , created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP, last_updated TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP
);
func (*Queries) CreateLeader ¶
func (*Queries) CreateMachine ¶
func (q *Queries) CreateMachine(ctx context.Context, arg CreateMachineParams) error
func (*Queries) CreateRoom ¶
func (q *Queries) CreateRoom(ctx context.Context, arg CreateRoomParams) error
func (*Queries) DeleteConnection ¶
func (*Queries) DeleteLeader ¶
func (*Queries) DeleteMachine ¶
func (*Queries) FindMachine ¶
func (*Queries) GetConnections ¶
func (q *Queries) GetConnections(ctx context.Context) ([]Connection, error)
func (*Queries) GetConnectionsByMachine ¶
func (*Queries) GetLeaderForType ¶
func (*Queries) GetMachine ¶
func (*Queries) GetMachineLeaderCountByType ¶
func (*Queries) GetMachinesByType ¶
func (*Queries) GetMembershipByConnection ¶
func (*Queries) GetOrphanedRooms ¶
func (*Queries) GetRoomMembers ¶
func (*Queries) GetRooms ¶
CREATE TABLE rooms (
uuid TEXT PRIMARY KEY, machine_uuid TEXT NOT NULL REFERENCES machines(uuid) , name TEXT NOT NULL, script TEXT NOT NULL, destroy_on_orphan BOOLEAN NOT NULL
);
func (*Queries) GetRoomsByMachine ¶
func (*Queries) RemoveRoomMember ¶
func (q *Queries) RemoveRoomMember(ctx context.Context, arg RemoveRoomMemberParams) error
func (*Queries) SetMachineAsLeader ¶
func (*Queries) SetRoomOwner ¶
func (q *Queries) SetRoomOwner(ctx context.Context, arg SetRoomOwnerParams) error
func (*Queries) TouchConnection ¶
func (*Queries) TouchMachine ¶
func (*Queries) UpdateMachine ¶
type RemoveRoomMemberParams ¶
type RoomMembership ¶
type SetRoomOwnerParams ¶
Click to show internal directories.
Click to hide internal directories.