rpc

package
v0.0.0-...-ca8de47 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Manager_CurrentStatus_FullMethodName        = "/radio.Manager/CurrentStatus"
	Manager_UpdateFromStorage_FullMethodName    = "/radio.Manager/UpdateFromStorage"
	Manager_CurrentSong_FullMethodName          = "/radio.Manager/CurrentSong"
	Manager_UpdateSong_FullMethodName           = "/radio.Manager/UpdateSong"
	Manager_CurrentThread_FullMethodName        = "/radio.Manager/CurrentThread"
	Manager_UpdateThread_FullMethodName         = "/radio.Manager/UpdateThread"
	Manager_CurrentUser_FullMethodName          = "/radio.Manager/CurrentUser"
	Manager_UpdateUser_FullMethodName           = "/radio.Manager/UpdateUser"
	Manager_CurrentListenerCount_FullMethodName = "/radio.Manager/CurrentListenerCount"
	Manager_UpdateListenerCount_FullMethodName  = "/radio.Manager/UpdateListenerCount"
)
View Source
const (
	Announcer_AnnounceSong_FullMethodName    = "/radio.Announcer/AnnounceSong"
	Announcer_AnnounceRequest_FullMethodName = "/radio.Announcer/AnnounceRequest"
	Announcer_AnnounceUser_FullMethodName    = "/radio.Announcer/AnnounceUser"
)
View Source
const (
	Streamer_Start_FullMethodName       = "/radio.Streamer/Start"
	Streamer_Stop_FullMethodName        = "/radio.Streamer/Stop"
	Streamer_RequestSong_FullMethodName = "/radio.Streamer/RequestSong"
	Streamer_SetConfig_FullMethodName   = "/radio.Streamer/SetConfig"
	Streamer_Queue_FullMethodName       = "/radio.Streamer/Queue"
)
View Source
const (
	Queue_AddRequest_FullMethodName    = "/radio.Queue/AddRequest"
	Queue_ReserveNext_FullMethodName   = "/radio.Queue/ReserveNext"
	Queue_ResetReserved_FullMethodName = "/radio.Queue/ResetReserved"
	Queue_Remove_FullMethodName        = "/radio.Queue/Remove"
	Queue_Entries_FullMethodName       = "/radio.Queue/Entries"
)
View Source
const (
	ListenerTracker_ListClients_FullMethodName  = "/radio.ListenerTracker/ListClients"
	ListenerTracker_RemoveClient_FullMethodName = "/radio.ListenerTracker/RemoveClient"
)

Variables

View Source
var Announcer_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "radio.Announcer",
	HandlerType: (*AnnouncerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "AnnounceSong",
			Handler:    _Announcer_AnnounceSong_Handler,
		},
		{
			MethodName: "AnnounceRequest",
			Handler:    _Announcer_AnnounceRequest_Handler,
		},
		{
			MethodName: "AnnounceUser",
			Handler:    _Announcer_AnnounceUser_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "radio.proto",
}

Announcer_ServiceDesc is the grpc.ServiceDesc for Announcer service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_radio_proto protoreflect.FileDescriptor
View Source
var GrpcDial = grpc.NewClient
View Source
var ListenerTracker_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "radio.ListenerTracker",
	HandlerType: (*ListenerTrackerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ListClients",
			Handler:    _ListenerTracker_ListClients_Handler,
		},
		{
			MethodName: "RemoveClient",
			Handler:    _ListenerTracker_RemoveClient_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "radio.proto",
}

ListenerTracker_ServiceDesc is the grpc.ServiceDesc for ListenerTracker service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var Manager_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "radio.Manager",
	HandlerType: (*ManagerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "UpdateFromStorage",
			Handler:    _Manager_UpdateFromStorage_Handler,
		},
		{
			MethodName: "UpdateSong",
			Handler:    _Manager_UpdateSong_Handler,
		},
		{
			MethodName: "UpdateThread",
			Handler:    _Manager_UpdateThread_Handler,
		},
		{
			MethodName: "UpdateUser",
			Handler:    _Manager_UpdateUser_Handler,
		},
		{
			MethodName: "UpdateListenerCount",
			Handler:    _Manager_UpdateListenerCount_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "CurrentStatus",
			Handler:       _Manager_CurrentStatus_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "CurrentSong",
			Handler:       _Manager_CurrentSong_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "CurrentThread",
			Handler:       _Manager_CurrentThread_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "CurrentUser",
			Handler:       _Manager_CurrentUser_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "CurrentListenerCount",
			Handler:       _Manager_CurrentListenerCount_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "radio.proto",
}

Manager_ServiceDesc is the grpc.ServiceDesc for Manager service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var NewGrpcServer = func(_ context.Context, opts ...grpc.ServerOption) *grpc.Server {
	return grpc.NewServer(opts...)
}
View Source
var Queue_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "radio.Queue",
	HandlerType: (*QueueServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "AddRequest",
			Handler:    _Queue_AddRequest_Handler,
		},
		{
			MethodName: "ReserveNext",
			Handler:    _Queue_ReserveNext_Handler,
		},
		{
			MethodName: "ResetReserved",
			Handler:    _Queue_ResetReserved_Handler,
		},
		{
			MethodName: "Remove",
			Handler:    _Queue_Remove_Handler,
		},
		{
			MethodName: "Entries",
			Handler:    _Queue_Entries_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "radio.proto",
}

Queue_ServiceDesc is the grpc.ServiceDesc for Queue service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var Streamer_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "radio.Streamer",
	HandlerType: (*StreamerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Start",
			Handler:    _Streamer_Start_Handler,
		},
		{
			MethodName: "Stop",
			Handler:    _Streamer_Stop_Handler,
		},
		{
			MethodName: "RequestSong",
			Handler:    _Streamer_RequestSong_Handler,
		},
		{
			MethodName: "SetConfig",
			Handler:    _Streamer_SetConfig_Handler,
		},
		{
			MethodName: "Queue",
			Handler:    _Streamer_Queue_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "radio.proto",
}

Streamer_ServiceDesc is the grpc.ServiceDesc for Streamer service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func DecodeQueueEntry

func DecodeQueueEntry(data []byte) (radio.QueueEntry, error)

func DecodeStatus

func DecodeStatus(data []byte) (radio.Status, error)

func EncodeQueueEntry

func EncodeQueueEntry(entry radio.QueueEntry) ([]byte, error)

func EncodeStatus

func EncodeStatus(status radio.Status) ([]byte, error)

func NewAnnouncerService

func NewAnnouncerService(c *grpc.ClientConn) radio.AnnounceService

NewAnnouncerService returns a new client implementing radio.AnnounceService

func NewListenerTrackerService

func NewListenerTrackerService(c *grpc.ClientConn) radio.ListenerTrackerService

func NewManagerService

func NewManagerService(c *grpc.ClientConn) radio.ManagerService

NewManagerService returns a new client implementing radio.ManagerService

func NewQueueService

func NewQueueService(c *grpc.ClientConn) radio.QueueService

NewQueueService returns a new client implement radio.QueueService

func NewStreamerService

func NewStreamerService(c *grpc.ClientConn) radio.StreamerService

NewStreamerService returns a new client implementing radio.StreamerService

func PrepareConn

func PrepareConn(addr string) *grpc.ClientConn

func RegisterAnnouncerServer

func RegisterAnnouncerServer(s grpc.ServiceRegistrar, srv AnnouncerServer)

func RegisterListenerTrackerServer

func RegisterListenerTrackerServer(s grpc.ServiceRegistrar, srv ListenerTrackerServer)

func RegisterManagerServer

func RegisterManagerServer(s grpc.ServiceRegistrar, srv ManagerServer)

func RegisterQueueServer

func RegisterQueueServer(s grpc.ServiceRegistrar, srv QueueServer)

func RegisterStreamerServer

func RegisterStreamerServer(s grpc.ServiceRegistrar, srv StreamerServer)

Types

type AnnouncerClient

type AnnouncerClient interface {
	AnnounceSong(ctx context.Context, in *SongAnnouncement, opts ...grpc.CallOption) (*emptypb.Empty, error)
	AnnounceRequest(ctx context.Context, in *SongRequestAnnouncement, opts ...grpc.CallOption) (*emptypb.Empty, error)
	AnnounceUser(ctx context.Context, in *UserAnnouncement, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

AnnouncerClient is the client API for Announcer service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewAnnouncerClient

func NewAnnouncerClient(cc grpc.ClientConnInterface) AnnouncerClient

type AnnouncerClientRPC

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

AnnouncerClient is a grpc client that implements radio.AnnounceService

func (AnnouncerClientRPC) AnnounceRequest

func (a AnnouncerClientRPC) AnnounceRequest(ctx context.Context, s radio.Song) error

AnnounceRequest implements radio.AnnounceService

func (AnnouncerClientRPC) AnnounceSong

func (a AnnouncerClientRPC) AnnounceSong(ctx context.Context, s radio.Status) error

AnnounceSong implements radio.AnnounceService

func (AnnouncerClientRPC) AnnounceUser

func (a AnnouncerClientRPC) AnnounceUser(ctx context.Context, u *radio.User) error

type AnnouncerServer

type AnnouncerServer interface {
	AnnounceSong(context.Context, *SongAnnouncement) (*emptypb.Empty, error)
	AnnounceRequest(context.Context, *SongRequestAnnouncement) (*emptypb.Empty, error)
	AnnounceUser(context.Context, *UserAnnouncement) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

AnnouncerServer is the server API for Announcer service. All implementations must embed UnimplementedAnnouncerServer for forward compatibility

func NewAnnouncer

func NewAnnouncer(a radio.AnnounceService) AnnouncerServer

NewAnnouncer returns a new shim around the service given

type AnnouncerShim

type AnnouncerShim struct {
	UnimplementedAnnouncerServer
	// contains filtered or unexported fields
}

AnnouncerShim implements Announcer

func (AnnouncerShim) AnnounceRequest

func (as AnnouncerShim) AnnounceRequest(ctx context.Context, ar *SongRequestAnnouncement) (*emptypb.Empty, error)

AnnounceRequest implements Announcer

func (AnnouncerShim) AnnounceSong

func (as AnnouncerShim) AnnounceSong(ctx context.Context, a *SongAnnouncement) (*emptypb.Empty, error)

AnnounceSong implements Announcer

type DJ

type DJ struct {

	// DJ fields
	Id       uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name     string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Regex    string `protobuf:"bytes,3,opt,name=regex,proto3" json:"regex,omitempty"`
	Text     string `protobuf:"bytes,4,opt,name=text,proto3" json:"text,omitempty"`
	Image    string `protobuf:"bytes,5,opt,name=image,proto3" json:"image,omitempty"`
	Visible  bool   `protobuf:"varint,6,opt,name=visible,proto3" json:"visible,omitempty"`
	Priority int32  `protobuf:"varint,7,opt,name=priority,proto3" json:"priority,omitempty"`
	Role     string `protobuf:"bytes,8,opt,name=role,proto3" json:"role,omitempty"`
	Css      string `protobuf:"bytes,9,opt,name=css,proto3" json:"css,omitempty"`
	Color    string `protobuf:"bytes,10,opt,name=color,proto3" json:"color,omitempty"`
	Theme    *Theme `protobuf:"bytes,11,opt,name=theme,proto3" json:"theme,omitempty"`
	// contains filtered or unexported fields
}

func (*DJ) Descriptor deprecated

func (*DJ) Descriptor() ([]byte, []int)

Deprecated: Use DJ.ProtoReflect.Descriptor instead.

func (*DJ) GetColor

func (x *DJ) GetColor() string

func (*DJ) GetCss

func (x *DJ) GetCss() string

func (*DJ) GetId

func (x *DJ) GetId() uint64

func (*DJ) GetImage

func (x *DJ) GetImage() string

func (*DJ) GetName

func (x *DJ) GetName() string

func (*DJ) GetPriority

func (x *DJ) GetPriority() int32

func (*DJ) GetRegex

func (x *DJ) GetRegex() string

func (*DJ) GetRole

func (x *DJ) GetRole() string

func (*DJ) GetText

func (x *DJ) GetText() string

func (*DJ) GetTheme

func (x *DJ) GetTheme() *Theme

func (*DJ) GetVisible

func (x *DJ) GetVisible() bool

func (*DJ) ProtoMessage

func (*DJ) ProtoMessage()

func (*DJ) ProtoReflect

func (x *DJ) ProtoReflect() protoreflect.Message

func (*DJ) Reset

func (x *DJ) Reset()

func (*DJ) String

func (x *DJ) String() string

type Error

type Error struct {
	Kind    uint32               `protobuf:"varint,1,opt,name=kind,proto3" json:"kind,omitempty"`
	Op      string               `protobuf:"bytes,2,opt,name=op,proto3" json:"op,omitempty"`
	SongId  int32                `protobuf:"varint,3,opt,name=song_id,json=songId,proto3" json:"song_id,omitempty"`
	TrackId int32                `protobuf:"varint,4,opt,name=track_id,json=trackId,proto3" json:"track_id,omitempty"`
	Delay   *durationpb.Duration `protobuf:"bytes,5,opt,name=delay,proto3" json:"delay,omitempty"`
	Info    string               `protobuf:"bytes,6,opt,name=info,proto3" json:"info,omitempty"`
	Error   string               `protobuf:"bytes,7,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*Error) Descriptor deprecated

func (*Error) Descriptor() ([]byte, []int)

Deprecated: Use Error.ProtoReflect.Descriptor instead.

func (*Error) GetDelay

func (x *Error) GetDelay() *durationpb.Duration

func (*Error) GetError

func (x *Error) GetError() string

func (*Error) GetInfo

func (x *Error) GetInfo() string

func (*Error) GetKind

func (x *Error) GetKind() uint32

func (*Error) GetOp

func (x *Error) GetOp() string

func (*Error) GetSongId

func (x *Error) GetSongId() int32

func (*Error) GetTrackId

func (x *Error) GetTrackId() int32

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) ProtoReflect

func (x *Error) ProtoReflect() protoreflect.Message

func (*Error) Reset

func (x *Error) Reset()

func (*Error) String

func (x *Error) String() string

type Listener

type Listener struct {
	Id        uint64                 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Address   string                 `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	UserAgent string                 `protobuf:"bytes,3,opt,name=user_agent,json=userAgent,proto3" json:"user_agent,omitempty"`
	Start     *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=start,proto3" json:"start,omitempty"`
	// contains filtered or unexported fields
}

func (*Listener) Descriptor deprecated

func (*Listener) Descriptor() ([]byte, []int)

Deprecated: Use Listener.ProtoReflect.Descriptor instead.

func (*Listener) GetAddress

func (x *Listener) GetAddress() string

func (*Listener) GetId

func (x *Listener) GetId() uint64

func (*Listener) GetStart

func (x *Listener) GetStart() *timestamppb.Timestamp

func (*Listener) GetUserAgent

func (x *Listener) GetUserAgent() string

func (*Listener) ProtoMessage

func (*Listener) ProtoMessage()

func (*Listener) ProtoReflect

func (x *Listener) ProtoReflect() protoreflect.Message

func (*Listener) Reset

func (x *Listener) Reset()

func (*Listener) String

func (x *Listener) String() string

type ListenerInfo

type ListenerInfo struct {

	// the amount of listeners to the stream
	Listeners int64 `protobuf:"varint,1,opt,name=listeners,proto3" json:"listeners,omitempty"`
	// contains filtered or unexported fields
}

func (*ListenerInfo) Descriptor deprecated

func (*ListenerInfo) Descriptor() ([]byte, []int)

Deprecated: Use ListenerInfo.ProtoReflect.Descriptor instead.

func (*ListenerInfo) GetListeners

func (x *ListenerInfo) GetListeners() int64

func (*ListenerInfo) ProtoMessage

func (*ListenerInfo) ProtoMessage()

func (*ListenerInfo) ProtoReflect

func (x *ListenerInfo) ProtoReflect() protoreflect.Message

func (*ListenerInfo) Reset

func (x *ListenerInfo) Reset()

func (*ListenerInfo) String

func (x *ListenerInfo) String() string

type ListenerTrackerClient

type ListenerTrackerClient interface {
	ListClients(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Listeners, error)
	RemoveClient(ctx context.Context, in *TrackerRemoveClientRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

ListenerTrackerClient is the client API for ListenerTracker service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type ListenerTrackerClientRPC

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

func (ListenerTrackerClientRPC) ListClients

func (lt ListenerTrackerClientRPC) ListClients(ctx context.Context) ([]radio.Listener, error)

func (ListenerTrackerClientRPC) RemoveClient

type ListenerTrackerServer

type ListenerTrackerServer interface {
	ListClients(context.Context, *emptypb.Empty) (*Listeners, error)
	RemoveClient(context.Context, *TrackerRemoveClientRequest) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

ListenerTrackerServer is the server API for ListenerTracker service. All implementations must embed UnimplementedListenerTrackerServer for forward compatibility

type ListenerTrackerShim

type ListenerTrackerShim struct {
	UnimplementedListenerTrackerServer
	// contains filtered or unexported fields
}

ListenerTrackerShim implements ListenerTracker

func (ListenerTrackerShim) ListClients

func (lt ListenerTrackerShim) ListClients(ctx context.Context, _ *emptypb.Empty) (*Listeners, error)

func (ListenerTrackerShim) RemoveClient

type Listeners

type Listeners struct {
	Entries []*Listener `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"`
	// contains filtered or unexported fields
}

func (*Listeners) Descriptor deprecated

func (*Listeners) Descriptor() ([]byte, []int)

Deprecated: Use Listeners.ProtoReflect.Descriptor instead.

func (*Listeners) GetEntries

func (x *Listeners) GetEntries() []*Listener

func (*Listeners) ProtoMessage

func (*Listeners) ProtoMessage()

func (*Listeners) ProtoReflect

func (x *Listeners) ProtoReflect() protoreflect.Message

func (*Listeners) Reset

func (x *Listeners) Reset()

func (*Listeners) String

func (x *Listeners) String() string

type ManagerClient

type ManagerClient interface {
	CurrentStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (Manager_CurrentStatusClient, error)
	UpdateFromStorage(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
	CurrentSong(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (Manager_CurrentSongClient, error)
	UpdateSong(ctx context.Context, in *SongUpdate, opts ...grpc.CallOption) (*emptypb.Empty, error)
	CurrentThread(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (Manager_CurrentThreadClient, error)
	UpdateThread(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*emptypb.Empty, error)
	CurrentUser(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (Manager_CurrentUserClient, error)
	UpdateUser(ctx context.Context, in *User, opts ...grpc.CallOption) (*emptypb.Empty, error)
	CurrentListenerCount(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (Manager_CurrentListenerCountClient, error)
	UpdateListenerCount(ctx context.Context, in *wrapperspb.Int64Value, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

ManagerClient is the client API for Manager service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewManagerClient

func NewManagerClient(cc grpc.ClientConnInterface) ManagerClient

type ManagerClientRPC

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

ManagerClient is a grpc client that implements radio.ManagerService

func (ManagerClientRPC) CurrentListeners

func (m ManagerClientRPC) CurrentListeners(ctx context.Context) (eventstream.Stream[radio.Listeners], error)

func (ManagerClientRPC) CurrentSong

func (ManagerClientRPC) CurrentStatus

Status implements radio.ManagerService

func (ManagerClientRPC) CurrentThread

func (ManagerClientRPC) CurrentUser

func (ManagerClientRPC) UpdateFromStorage

func (m ManagerClientRPC) UpdateFromStorage(ctx context.Context) error

func (ManagerClientRPC) UpdateListeners

func (m ManagerClientRPC) UpdateListeners(ctx context.Context, count radio.Listeners) error

UpdateListeners implements radio.ManagerService

func (ManagerClientRPC) UpdateSong

func (m ManagerClientRPC) UpdateSong(ctx context.Context, u *radio.SongUpdate) error

UpdateSong implements radio.ManagerService

func (ManagerClientRPC) UpdateThread

func (m ManagerClientRPC) UpdateThread(ctx context.Context, thread radio.Thread) error

UpdateThread implements radio.ManagerService

func (ManagerClientRPC) UpdateUser

func (m ManagerClientRPC) UpdateUser(ctx context.Context, u *radio.User) error

UpdateUser implements radio.ManagerService

type ManagerServer

type ManagerServer interface {
	CurrentStatus(*emptypb.Empty, Manager_CurrentStatusServer) error
	UpdateFromStorage(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	CurrentSong(*emptypb.Empty, Manager_CurrentSongServer) error
	UpdateSong(context.Context, *SongUpdate) (*emptypb.Empty, error)
	CurrentThread(*emptypb.Empty, Manager_CurrentThreadServer) error
	UpdateThread(context.Context, *wrapperspb.StringValue) (*emptypb.Empty, error)
	CurrentUser(*emptypb.Empty, Manager_CurrentUserServer) error
	UpdateUser(context.Context, *User) (*emptypb.Empty, error)
	CurrentListenerCount(*emptypb.Empty, Manager_CurrentListenerCountServer) error
	UpdateListenerCount(context.Context, *wrapperspb.Int64Value) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

ManagerServer is the server API for Manager service. All implementations must embed UnimplementedManagerServer for forward compatibility

func NewManager

func NewManager(m radio.ManagerService) ManagerServer

NewManager returns a new shim around the service given

type ManagerShim

type ManagerShim struct {
	UnimplementedManagerServer
	// contains filtered or unexported fields
}

ManagerShim implements Manager

func (ManagerShim) CurrentListenerCount

func (sm ManagerShim) CurrentListenerCount(_ *emptypb.Empty, s Manager_CurrentListenerCountServer) error

func (ManagerShim) CurrentSong

func (ManagerShim) CurrentStatus

func (sm ManagerShim) CurrentStatus(_ *emptypb.Empty, s Manager_CurrentStatusServer) error

Status implements Manager

func (ManagerShim) CurrentThread

func (sm ManagerShim) CurrentThread(_ *emptypb.Empty, s Manager_CurrentThreadServer) error

func (ManagerShim) CurrentUser

func (ManagerShim) UpdateFromStorage

func (m ManagerShim) UpdateFromStorage(ctx context.Context, _ *emptypb.Empty) (*emptypb.Empty, error)

func (ManagerShim) UpdateListenerCount

func (m ManagerShim) UpdateListenerCount(ctx context.Context, i *wrapperspb.Int64Value) (*emptypb.Empty, error)

func (ManagerShim) UpdateSong

func (m ManagerShim) UpdateSong(ctx context.Context, su *SongUpdate) (*emptypb.Empty, error)

func (ManagerShim) UpdateThread

func (m ManagerShim) UpdateThread(ctx context.Context, t *wrapperspb.StringValue) (*emptypb.Empty, error)

func (ManagerShim) UpdateUser

func (m ManagerShim) UpdateUser(ctx context.Context, u *User) (*emptypb.Empty, error)

type Manager_CurrentListenerCountClient

type Manager_CurrentListenerCountClient interface {
	Recv() (*wrapperspb.Int64Value, error)
	grpc.ClientStream
}

type Manager_CurrentListenerCountServer

type Manager_CurrentListenerCountServer interface {
	Send(*wrapperspb.Int64Value) error
	grpc.ServerStream
}

type Manager_CurrentSongClient

type Manager_CurrentSongClient interface {
	Recv() (*SongUpdate, error)
	grpc.ClientStream
}

type Manager_CurrentSongServer

type Manager_CurrentSongServer interface {
	Send(*SongUpdate) error
	grpc.ServerStream
}

type Manager_CurrentStatusClient

type Manager_CurrentStatusClient interface {
	Recv() (*StatusResponse, error)
	grpc.ClientStream
}

type Manager_CurrentStatusServer

type Manager_CurrentStatusServer interface {
	Send(*StatusResponse) error
	grpc.ServerStream
}

type Manager_CurrentThreadClient

type Manager_CurrentThreadClient interface {
	Recv() (*wrapperspb.StringValue, error)
	grpc.ClientStream
}

type Manager_CurrentThreadServer

type Manager_CurrentThreadServer interface {
	Send(*wrapperspb.StringValue) error
	grpc.ServerStream
}

type Manager_CurrentUserClient

type Manager_CurrentUserClient interface {
	Recv() (*User, error)
	grpc.ClientStream
}

type Manager_CurrentUserServer

type Manager_CurrentUserServer interface {
	Send(*User) error
	grpc.ServerStream
}

type QueueClient

type QueueClient interface {
	AddRequest(ctx context.Context, in *QueueEntry, opts ...grpc.CallOption) (*emptypb.Empty, error)
	ReserveNext(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*QueueEntry, error)
	ResetReserved(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
	Remove(ctx context.Context, in *QueueID, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error)
	Entries(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*QueueInfo, error)
}

QueueClient is the client API for Queue service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewQueueClient

func NewQueueClient(cc grpc.ClientConnInterface) QueueClient

type QueueClientRPC

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

QueueClient is a grpc client that implements radio.QueueService

func (QueueClientRPC) AddRequest

func (q QueueClientRPC) AddRequest(ctx context.Context, s radio.Song, identifier string) error

AddRequest implements radio.QueueService

func (QueueClientRPC) Entries

func (q QueueClientRPC) Entries(ctx context.Context) (radio.Queue, error)

Entries implements radio.QueueService

func (QueueClientRPC) Remove

func (q QueueClientRPC) Remove(ctx context.Context, id radio.QueueID) (bool, error)

Remove implements radio.QueueService

func (QueueClientRPC) ReserveNext

func (q QueueClientRPC) ReserveNext(ctx context.Context) (*radio.QueueEntry, error)

ReserveNext implements radio.QueueService

func (QueueClientRPC) ResetReserved

func (q QueueClientRPC) ResetReserved(ctx context.Context) error

type QueueEntry

type QueueEntry struct {
	Song *Song `protobuf:"bytes,1,opt,name=song,proto3" json:"song,omitempty"`
	// is_user_request indicates if this was a request made by a human
	IsUserRequest bool `protobuf:"varint,2,opt,name=is_user_request,json=isUserRequest,proto3" json:"is_user_request,omitempty"`
	// user_identifier is the way we identify the user that added this to the
	// queue; This can be anything that uniquely identifies a user
	UserIdentifier string `protobuf:"bytes,3,opt,name=user_identifier,json=userIdentifier,proto3" json:"user_identifier,omitempty"`
	// expected_start_time is the expected time this song will start playing
	ExpectedStartTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=expected_start_time,json=expectedStartTime,proto3" json:"expected_start_time,omitempty"`
	// unique id of the entry
	QueueId *QueueID `protobuf:"bytes,5,opt,name=queue_id,json=queueId,proto3" json:"queue_id,omitempty"`
	// contains filtered or unexported fields
}

func (*QueueEntry) Descriptor deprecated

func (*QueueEntry) Descriptor() ([]byte, []int)

Deprecated: Use QueueEntry.ProtoReflect.Descriptor instead.

func (*QueueEntry) GetExpectedStartTime

func (x *QueueEntry) GetExpectedStartTime() *timestamppb.Timestamp

func (*QueueEntry) GetIsUserRequest

func (x *QueueEntry) GetIsUserRequest() bool

func (*QueueEntry) GetQueueId

func (x *QueueEntry) GetQueueId() *QueueID

func (*QueueEntry) GetSong

func (x *QueueEntry) GetSong() *Song

func (*QueueEntry) GetUserIdentifier

func (x *QueueEntry) GetUserIdentifier() string

func (*QueueEntry) ProtoMessage

func (*QueueEntry) ProtoMessage()

func (*QueueEntry) ProtoReflect

func (x *QueueEntry) ProtoReflect() protoreflect.Message

func (*QueueEntry) Reset

func (x *QueueEntry) Reset()

func (*QueueEntry) String

func (x *QueueEntry) String() string

type QueueID

type QueueID struct {
	ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
	// contains filtered or unexported fields
}

func (*QueueID) Descriptor deprecated

func (*QueueID) Descriptor() ([]byte, []int)

Deprecated: Use QueueID.ProtoReflect.Descriptor instead.

func (*QueueID) GetID

func (x *QueueID) GetID() string

func (*QueueID) ProtoMessage

func (*QueueID) ProtoMessage()

func (*QueueID) ProtoReflect

func (x *QueueID) ProtoReflect() protoreflect.Message

func (*QueueID) Reset

func (x *QueueID) Reset()

func (*QueueID) String

func (x *QueueID) String() string

type QueueInfo

type QueueInfo struct {

	// the name of the queue implementation
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// the entries in the queue
	Entries []*QueueEntry `protobuf:"bytes,2,rep,name=entries,proto3" json:"entries,omitempty"`
	// contains filtered or unexported fields
}

func (*QueueInfo) Descriptor deprecated

func (*QueueInfo) Descriptor() ([]byte, []int)

Deprecated: Use QueueInfo.ProtoReflect.Descriptor instead.

func (*QueueInfo) GetEntries

func (x *QueueInfo) GetEntries() []*QueueEntry

func (*QueueInfo) GetName

func (x *QueueInfo) GetName() string

func (*QueueInfo) ProtoMessage

func (*QueueInfo) ProtoMessage()

func (*QueueInfo) ProtoReflect

func (x *QueueInfo) ProtoReflect() protoreflect.Message

func (*QueueInfo) Reset

func (x *QueueInfo) Reset()

func (*QueueInfo) String

func (x *QueueInfo) String() string

type QueueServer

type QueueServer interface {
	AddRequest(context.Context, *QueueEntry) (*emptypb.Empty, error)
	ReserveNext(context.Context, *emptypb.Empty) (*QueueEntry, error)
	ResetReserved(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	Remove(context.Context, *QueueID) (*wrapperspb.BoolValue, error)
	Entries(context.Context, *emptypb.Empty) (*QueueInfo, error)
	// contains filtered or unexported methods
}

QueueServer is the server API for Queue service. All implementations must embed UnimplementedQueueServer for forward compatibility

func NewQueue

func NewQueue(q radio.QueueService) QueueServer

NewQueue returns a new shim around the service given

type QueueShim

type QueueShim struct {
	UnimplementedQueueServer
	// contains filtered or unexported fields
}

QueueShim implements Queue

func (QueueShim) AddRequest

func (q QueueShim) AddRequest(ctx context.Context, e *QueueEntry) (*emptypb.Empty, error)

AddRequest implements Queue

func (QueueShim) Entries

func (q QueueShim) Entries(ctx context.Context, _ *emptypb.Empty) (*QueueInfo, error)

Entries implements Queue

func (QueueShim) Remove

func (q QueueShim) Remove(ctx context.Context, id *QueueID) (*wrapperspb.BoolValue, error)

Remove implements Queue

func (QueueShim) ReserveNext

func (q QueueShim) ReserveNext(ctx context.Context, _ *emptypb.Empty) (*QueueEntry, error)

ReserveNext implements Queue

func (QueueShim) ResetReserved

func (q QueueShim) ResetReserved(ctx context.Context, _ *emptypb.Empty) (*emptypb.Empty, error)

type RequestResponse

type RequestResponse struct {
	Error []*Error `protobuf:"bytes,1,rep,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*RequestResponse) Descriptor deprecated

func (*RequestResponse) Descriptor() ([]byte, []int)

Deprecated: Use RequestResponse.ProtoReflect.Descriptor instead.

func (*RequestResponse) GetError

func (x *RequestResponse) GetError() []*Error

func (*RequestResponse) ProtoMessage

func (*RequestResponse) ProtoMessage()

func (*RequestResponse) ProtoReflect

func (x *RequestResponse) ProtoReflect() protoreflect.Message

func (*RequestResponse) Reset

func (x *RequestResponse) Reset()

func (*RequestResponse) String

func (x *RequestResponse) String() string

type Song

type Song struct {

	// song identifier (esong.id)
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// sha1 hexdigest of metadata contents
	Hash string `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
	// short metadata
	Metadata string `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` // required
	// song length
	Length *durationpb.Duration `protobuf:"bytes,4,opt,name=length,proto3" json:"length,omitempty"`
	// last time this song was played
	LastPlayed *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=last_played,json=lastPlayed,proto3" json:"last_played,omitempty"`
	HashLink   string                 `protobuf:"bytes,6,opt,name=hash_link,json=hashLink,proto3" json:"hash_link,omitempty"`
	// the user that last played this song
	LastPlayedBy *User `protobuf:"bytes,7,opt,name=last_played_by,json=lastPlayedBy,proto3" json:"last_played_by,omitempty"`
	// DatabaseTrack fields
	TrackId         uint64                 `protobuf:"varint,16,opt,name=track_id,json=trackId,proto3" json:"track_id,omitempty"`
	Artist          string                 `protobuf:"bytes,17,opt,name=artist,proto3" json:"artist,omitempty"`
	Title           string                 `protobuf:"bytes,18,opt,name=title,proto3" json:"title,omitempty"`
	Album           string                 `protobuf:"bytes,19,opt,name=album,proto3" json:"album,omitempty"`
	FilePath        string                 `protobuf:"bytes,20,opt,name=file_path,json=filePath,proto3" json:"file_path,omitempty"`
	Tags            string                 `protobuf:"bytes,21,opt,name=tags,proto3" json:"tags,omitempty"`
	Acceptor        string                 `protobuf:"bytes,22,opt,name=acceptor,proto3" json:"acceptor,omitempty"`
	LastEditor      string                 `protobuf:"bytes,23,opt,name=last_editor,json=lastEditor,proto3" json:"last_editor,omitempty"`
	Priority        int32                  `protobuf:"varint,24,opt,name=priority,proto3" json:"priority,omitempty"`
	Usable          bool                   `protobuf:"varint,25,opt,name=usable,proto3" json:"usable,omitempty"`
	NeedReplacement bool                   `protobuf:"varint,29,opt,name=need_replacement,json=needReplacement,proto3" json:"need_replacement,omitempty"`
	LastRequested   *timestamppb.Timestamp `protobuf:"bytes,26,opt,name=last_requested,json=lastRequested,proto3" json:"last_requested,omitempty"`
	RequestCount    int32                  `protobuf:"varint,27,opt,name=request_count,json=requestCount,proto3" json:"request_count,omitempty"`
	RequestDelay    *durationpb.Duration   `protobuf:"bytes,28,opt,name=request_delay,json=requestDelay,proto3" json:"request_delay,omitempty"`
	// the time the fields above were acquired from the database
	SyncTime *timestamppb.Timestamp `protobuf:"bytes,100,opt,name=sync_time,json=syncTime,proto3" json:"sync_time,omitempty"`
	// contains filtered or unexported fields
}

func (*Song) Descriptor deprecated

func (*Song) Descriptor() ([]byte, []int)

Deprecated: Use Song.ProtoReflect.Descriptor instead.

func (*Song) GetAcceptor

func (x *Song) GetAcceptor() string

func (*Song) GetAlbum

func (x *Song) GetAlbum() string

func (*Song) GetArtist

func (x *Song) GetArtist() string

func (*Song) GetFilePath

func (x *Song) GetFilePath() string

func (*Song) GetHash

func (x *Song) GetHash() string
func (x *Song) GetHashLink() string

func (*Song) GetId

func (x *Song) GetId() uint64

func (*Song) GetLastEditor

func (x *Song) GetLastEditor() string

func (*Song) GetLastPlayed

func (x *Song) GetLastPlayed() *timestamppb.Timestamp

func (*Song) GetLastPlayedBy

func (x *Song) GetLastPlayedBy() *User

func (*Song) GetLastRequested

func (x *Song) GetLastRequested() *timestamppb.Timestamp

func (*Song) GetLength

func (x *Song) GetLength() *durationpb.Duration

func (*Song) GetMetadata

func (x *Song) GetMetadata() string

func (*Song) GetNeedReplacement

func (x *Song) GetNeedReplacement() bool

func (*Song) GetPriority

func (x *Song) GetPriority() int32

func (*Song) GetRequestCount

func (x *Song) GetRequestCount() int32

func (*Song) GetRequestDelay

func (x *Song) GetRequestDelay() *durationpb.Duration

func (*Song) GetSyncTime

func (x *Song) GetSyncTime() *timestamppb.Timestamp

func (*Song) GetTags

func (x *Song) GetTags() string

func (*Song) GetTitle

func (x *Song) GetTitle() string

func (*Song) GetTrackId

func (x *Song) GetTrackId() uint64

func (*Song) GetUsable

func (x *Song) GetUsable() bool

func (*Song) ProtoMessage

func (*Song) ProtoMessage()

func (*Song) ProtoReflect

func (x *Song) ProtoReflect() protoreflect.Message

func (*Song) Reset

func (x *Song) Reset()

func (*Song) String

func (x *Song) String() string

type SongAnnouncement

type SongAnnouncement struct {
	Song         *Song         `protobuf:"bytes,1,opt,name=song,proto3" json:"song,omitempty"`
	Info         *SongInfo     `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"`
	ListenerInfo *ListenerInfo `protobuf:"bytes,3,opt,name=listener_info,json=listenerInfo,proto3" json:"listener_info,omitempty"`
	// contains filtered or unexported fields
}

func (*SongAnnouncement) Descriptor deprecated

func (*SongAnnouncement) Descriptor() ([]byte, []int)

Deprecated: Use SongAnnouncement.ProtoReflect.Descriptor instead.

func (*SongAnnouncement) GetInfo

func (x *SongAnnouncement) GetInfo() *SongInfo

func (*SongAnnouncement) GetListenerInfo

func (x *SongAnnouncement) GetListenerInfo() *ListenerInfo

func (*SongAnnouncement) GetSong

func (x *SongAnnouncement) GetSong() *Song

func (*SongAnnouncement) ProtoMessage

func (*SongAnnouncement) ProtoMessage()

func (*SongAnnouncement) ProtoReflect

func (x *SongAnnouncement) ProtoReflect() protoreflect.Message

func (*SongAnnouncement) Reset

func (x *SongAnnouncement) Reset()

func (*SongAnnouncement) String

func (x *SongAnnouncement) String() string

type SongInfo

type SongInfo struct {

	// the time this song started playing
	StartTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
	// the time this song will end playing
	EndTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
	// contains filtered or unexported fields
}

func (*SongInfo) Descriptor deprecated

func (*SongInfo) Descriptor() ([]byte, []int)

Deprecated: Use SongInfo.ProtoReflect.Descriptor instead.

func (*SongInfo) GetEndTime

func (x *SongInfo) GetEndTime() *timestamppb.Timestamp

func (*SongInfo) GetStartTime

func (x *SongInfo) GetStartTime() *timestamppb.Timestamp

func (*SongInfo) ProtoMessage

func (*SongInfo) ProtoMessage()

func (*SongInfo) ProtoReflect

func (x *SongInfo) ProtoReflect() protoreflect.Message

func (*SongInfo) Reset

func (x *SongInfo) Reset()

func (*SongInfo) String

func (x *SongInfo) String() string

type SongRequest

type SongRequest struct {
	UserIdentifier string `protobuf:"bytes,1,opt,name=user_identifier,json=userIdentifier,proto3" json:"user_identifier,omitempty"`
	Song           *Song  `protobuf:"bytes,2,opt,name=song,proto3" json:"song,omitempty"`
	// contains filtered or unexported fields
}

func (*SongRequest) Descriptor deprecated

func (*SongRequest) Descriptor() ([]byte, []int)

Deprecated: Use SongRequest.ProtoReflect.Descriptor instead.

func (*SongRequest) GetSong

func (x *SongRequest) GetSong() *Song

func (*SongRequest) GetUserIdentifier

func (x *SongRequest) GetUserIdentifier() string

func (*SongRequest) ProtoMessage

func (*SongRequest) ProtoMessage()

func (*SongRequest) ProtoReflect

func (x *SongRequest) ProtoReflect() protoreflect.Message

func (*SongRequest) Reset

func (x *SongRequest) Reset()

func (*SongRequest) String

func (x *SongRequest) String() string

type SongRequestAnnouncement

type SongRequestAnnouncement struct {
	Song *Song `protobuf:"bytes,1,opt,name=song,proto3" json:"song,omitempty"`
	// contains filtered or unexported fields
}

func (*SongRequestAnnouncement) Descriptor deprecated

func (*SongRequestAnnouncement) Descriptor() ([]byte, []int)

Deprecated: Use SongRequestAnnouncement.ProtoReflect.Descriptor instead.

func (*SongRequestAnnouncement) GetSong

func (x *SongRequestAnnouncement) GetSong() *Song

func (*SongRequestAnnouncement) ProtoMessage

func (*SongRequestAnnouncement) ProtoMessage()

func (*SongRequestAnnouncement) ProtoReflect

func (x *SongRequestAnnouncement) ProtoReflect() protoreflect.Message

func (*SongRequestAnnouncement) Reset

func (x *SongRequestAnnouncement) Reset()

func (*SongRequestAnnouncement) String

func (x *SongRequestAnnouncement) String() string

type SongUpdate

type SongUpdate struct {
	Song *Song     `protobuf:"bytes,1,opt,name=song,proto3" json:"song,omitempty"`
	Info *SongInfo `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"`
	// contains filtered or unexported fields
}

func (*SongUpdate) Descriptor deprecated

func (*SongUpdate) Descriptor() ([]byte, []int)

Deprecated: Use SongUpdate.ProtoReflect.Descriptor instead.

func (*SongUpdate) GetInfo

func (x *SongUpdate) GetInfo() *SongInfo

func (*SongUpdate) GetSong

func (x *SongUpdate) GetSong() *Song

func (*SongUpdate) ProtoMessage

func (*SongUpdate) ProtoMessage()

func (*SongUpdate) ProtoReflect

func (x *SongUpdate) ProtoReflect() protoreflect.Message

func (*SongUpdate) Reset

func (x *SongUpdate) Reset()

func (*SongUpdate) String

func (x *SongUpdate) String() string

type StatusResponse

type StatusResponse struct {

	// the current user that is streaming (or was streaming)
	User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	// the current song being played
	Song *Song `protobuf:"bytes,2,opt,name=song,proto3" json:"song,omitempty"`
	// information about the current song
	Info *SongInfo `protobuf:"bytes,3,opt,name=info,proto3" json:"info,omitempty"`
	// information about the current listeners
	ListenerInfo *ListenerInfo `protobuf:"bytes,4,opt,name=listener_info,json=listenerInfo,proto3" json:"listener_info,omitempty"`
	// the current thread to be shown on the website or elsewhere
	Thread string `protobuf:"bytes,5,opt,name=thread,proto3" json:"thread,omitempty"`
	// the current configuration of the streamer
	StreamerConfig *StreamerConfig `protobuf:"bytes,6,opt,name=streamer_config,json=streamerConfig,proto3" json:"streamer_config,omitempty"`
	// the display name given to us by the streaming user
	StreamerName string `protobuf:"bytes,7,opt,name=streamer_name,json=streamerName,proto3" json:"streamer_name,omitempty"`
	// the current user that is streaming
	StreamUser *User `protobuf:"bytes,8,opt,name=stream_user,json=streamUser,proto3" json:"stream_user,omitempty"`
	// contains filtered or unexported fields
}

func (*StatusResponse) Descriptor deprecated

func (*StatusResponse) Descriptor() ([]byte, []int)

Deprecated: Use StatusResponse.ProtoReflect.Descriptor instead.

func (*StatusResponse) GetInfo

func (x *StatusResponse) GetInfo() *SongInfo

func (*StatusResponse) GetListenerInfo

func (x *StatusResponse) GetListenerInfo() *ListenerInfo

func (*StatusResponse) GetSong

func (x *StatusResponse) GetSong() *Song

func (*StatusResponse) GetStreamUser

func (x *StatusResponse) GetStreamUser() *User

func (*StatusResponse) GetStreamerConfig

func (x *StatusResponse) GetStreamerConfig() *StreamerConfig

func (*StatusResponse) GetStreamerName

func (x *StatusResponse) GetStreamerName() string

func (*StatusResponse) GetThread

func (x *StatusResponse) GetThread() string

func (*StatusResponse) GetUser

func (x *StatusResponse) GetUser() *User

func (*StatusResponse) ProtoMessage

func (*StatusResponse) ProtoMessage()

func (*StatusResponse) ProtoReflect

func (x *StatusResponse) ProtoReflect() protoreflect.Message

func (*StatusResponse) Reset

func (x *StatusResponse) Reset()

func (*StatusResponse) String

func (x *StatusResponse) String() string

type StreamerClient

type StreamerClient interface {
	// Start starts the streamer
	Start(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*StreamerResponse, error)
	// Stop stops the streamer, the boolean argument indicates if we should stop
	// right away, or wait until the current song ends
	Stop(ctx context.Context, in *wrapperspb.BoolValue, opts ...grpc.CallOption) (*StreamerResponse, error)
	// RequestSong requests a song to be played by the streamer
	RequestSong(ctx context.Context, in *SongRequest, opts ...grpc.CallOption) (*RequestResponse, error)
	// SetConfig changes the configuration of the streamer
	SetConfig(ctx context.Context, in *StreamerConfig, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Queue returns the current queue contents of the streamer
	Queue(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*QueueInfo, error)
}

StreamerClient is the client API for Streamer service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewStreamerClient

func NewStreamerClient(cc grpc.ClientConnInterface) StreamerClient

type StreamerClientRPC

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

StreamerClient is a grpc client that implements radio.StreamerService

func (StreamerClientRPC) Queue

Queue implements radio.StreamerService

func (StreamerClientRPC) RequestSong

func (s StreamerClientRPC) RequestSong(ctx context.Context, song radio.Song, identifier string) error

RequestSong implements radio.StreamerService

func (StreamerClientRPC) Start

func (s StreamerClientRPC) Start(ctx context.Context) error

Start implements radio.StreamerService

func (StreamerClientRPC) Stop

func (s StreamerClientRPC) Stop(ctx context.Context, force bool) error

Stop implements radio.StreamerService

type StreamerConfig

type StreamerConfig struct {

	// can users request songs to be played right now
	RequestsEnabled bool `protobuf:"varint,1,opt,name=requests_enabled,json=requestsEnabled,proto3" json:"requests_enabled,omitempty"`
	// the queue implementation to use for the streamer
	QueueUsed string `protobuf:"bytes,2,opt,name=queue_used,json=queueUsed,proto3" json:"queue_used,omitempty"`
	// contains filtered or unexported fields
}

func (*StreamerConfig) Descriptor deprecated

func (*StreamerConfig) Descriptor() ([]byte, []int)

Deprecated: Use StreamerConfig.ProtoReflect.Descriptor instead.

func (*StreamerConfig) GetQueueUsed

func (x *StreamerConfig) GetQueueUsed() string

func (*StreamerConfig) GetRequestsEnabled

func (x *StreamerConfig) GetRequestsEnabled() bool

func (*StreamerConfig) ProtoMessage

func (*StreamerConfig) ProtoMessage()

func (*StreamerConfig) ProtoReflect

func (x *StreamerConfig) ProtoReflect() protoreflect.Message

func (*StreamerConfig) Reset

func (x *StreamerConfig) Reset()

func (*StreamerConfig) String

func (x *StreamerConfig) String() string

type StreamerResponse

type StreamerResponse struct {
	Error []*Error `protobuf:"bytes,1,rep,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*StreamerResponse) Descriptor deprecated

func (*StreamerResponse) Descriptor() ([]byte, []int)

Deprecated: Use StreamerResponse.ProtoReflect.Descriptor instead.

func (*StreamerResponse) GetError

func (x *StreamerResponse) GetError() []*Error

func (*StreamerResponse) ProtoMessage

func (*StreamerResponse) ProtoMessage()

func (*StreamerResponse) ProtoReflect

func (x *StreamerResponse) ProtoReflect() protoreflect.Message

func (*StreamerResponse) Reset

func (x *StreamerResponse) Reset()

func (*StreamerResponse) String

func (x *StreamerResponse) String() string

type StreamerServer

type StreamerServer interface {
	// Start starts the streamer
	Start(context.Context, *emptypb.Empty) (*StreamerResponse, error)
	// Stop stops the streamer, the boolean argument indicates if we should stop
	// right away, or wait until the current song ends
	Stop(context.Context, *wrapperspb.BoolValue) (*StreamerResponse, error)
	// RequestSong requests a song to be played by the streamer
	RequestSong(context.Context, *SongRequest) (*RequestResponse, error)
	// SetConfig changes the configuration of the streamer
	SetConfig(context.Context, *StreamerConfig) (*emptypb.Empty, error)
	// Queue returns the current queue contents of the streamer
	Queue(context.Context, *emptypb.Empty) (*QueueInfo, error)
	// contains filtered or unexported methods
}

StreamerServer is the server API for Streamer service. All implementations must embed UnimplementedStreamerServer for forward compatibility

func NewStreamer

func NewStreamer(s radio.StreamerService) StreamerServer

NewStreamer returns a new shim around the service given

type StreamerShim

type StreamerShim struct {
	UnimplementedStreamerServer
	// contains filtered or unexported fields
}

StreamerShim implements Streamer

func (StreamerShim) Queue

func (ss StreamerShim) Queue(ctx context.Context, _ *emptypb.Empty) (*QueueInfo, error)

Queue implements Streamer

func (StreamerShim) RequestSong

func (ss StreamerShim) RequestSong(ctx context.Context, req *SongRequest) (*RequestResponse, error)

RequestSong implements Streamer

func (StreamerShim) SetConfig

func (ss StreamerShim) SetConfig(ctx context.Context, c *StreamerConfig) (*emptypb.Empty, error)

SetConfig implements Streamer

func (StreamerShim) Start

Start implements Streamer

func (StreamerShim) Stop

Stop implements Streamer

type Theme

type Theme struct {
	Id          uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name        string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
	Author      string `protobuf:"bytes,4,opt,name=author,proto3" json:"author,omitempty"`
	// contains filtered or unexported fields
}

func (*Theme) Descriptor deprecated

func (*Theme) Descriptor() ([]byte, []int)

Deprecated: Use Theme.ProtoReflect.Descriptor instead.

func (*Theme) GetAuthor

func (x *Theme) GetAuthor() string

func (*Theme) GetDisplayName

func (x *Theme) GetDisplayName() string

func (*Theme) GetId

func (x *Theme) GetId() uint64

func (*Theme) GetName

func (x *Theme) GetName() string

func (*Theme) ProtoMessage

func (*Theme) ProtoMessage()

func (*Theme) ProtoReflect

func (x *Theme) ProtoReflect() protoreflect.Message

func (*Theme) Reset

func (x *Theme) Reset()

func (*Theme) String

func (x *Theme) String() string

type TrackerRemoveClientRequest

type TrackerRemoveClientRequest struct {
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*TrackerRemoveClientRequest) Descriptor deprecated

func (*TrackerRemoveClientRequest) Descriptor() ([]byte, []int)

Deprecated: Use TrackerRemoveClientRequest.ProtoReflect.Descriptor instead.

func (*TrackerRemoveClientRequest) GetId

func (*TrackerRemoveClientRequest) ProtoMessage

func (*TrackerRemoveClientRequest) ProtoMessage()

func (*TrackerRemoveClientRequest) ProtoReflect

func (*TrackerRemoveClientRequest) Reset

func (x *TrackerRemoveClientRequest) Reset()

func (*TrackerRemoveClientRequest) String

func (x *TrackerRemoveClientRequest) String() string

type UnimplementedAnnouncerServer

type UnimplementedAnnouncerServer struct {
}

UnimplementedAnnouncerServer must be embedded to have forward compatible implementations.

func (UnimplementedAnnouncerServer) AnnounceRequest

func (UnimplementedAnnouncerServer) AnnounceSong

func (UnimplementedAnnouncerServer) AnnounceUser

type UnimplementedListenerTrackerServer

type UnimplementedListenerTrackerServer struct {
}

UnimplementedListenerTrackerServer must be embedded to have forward compatible implementations.

func (UnimplementedListenerTrackerServer) ListClients

func (UnimplementedListenerTrackerServer) RemoveClient

type UnimplementedManagerServer

type UnimplementedManagerServer struct {
}

UnimplementedManagerServer must be embedded to have forward compatible implementations.

func (UnimplementedManagerServer) CurrentListenerCount

func (UnimplementedManagerServer) CurrentSong

func (UnimplementedManagerServer) CurrentStatus

func (UnimplementedManagerServer) CurrentThread

func (UnimplementedManagerServer) CurrentUser

func (UnimplementedManagerServer) UpdateFromStorage

func (UnimplementedManagerServer) UpdateListenerCount

func (UnimplementedManagerServer) UpdateSong

func (UnimplementedManagerServer) UpdateThread

func (UnimplementedManagerServer) UpdateUser

type UnimplementedQueueServer

type UnimplementedQueueServer struct {
}

UnimplementedQueueServer must be embedded to have forward compatible implementations.

func (UnimplementedQueueServer) AddRequest

func (UnimplementedQueueServer) Entries

func (UnimplementedQueueServer) Remove

func (UnimplementedQueueServer) ReserveNext

func (UnimplementedQueueServer) ResetReserved

type UnimplementedStreamerServer

type UnimplementedStreamerServer struct {
}

UnimplementedStreamerServer must be embedded to have forward compatible implementations.

func (UnimplementedStreamerServer) Queue

func (UnimplementedStreamerServer) RequestSong

func (UnimplementedStreamerServer) SetConfig

func (UnimplementedStreamerServer) Start

func (UnimplementedStreamerServer) Stop

type UnsafeAnnouncerServer

type UnsafeAnnouncerServer interface {
	// contains filtered or unexported methods
}

UnsafeAnnouncerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AnnouncerServer will result in compilation errors.

type UnsafeListenerTrackerServer

type UnsafeListenerTrackerServer interface {
	// contains filtered or unexported methods
}

UnsafeListenerTrackerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ListenerTrackerServer will result in compilation errors.

type UnsafeManagerServer

type UnsafeManagerServer interface {
	// contains filtered or unexported methods
}

UnsafeManagerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ManagerServer will result in compilation errors.

type UnsafeQueueServer

type UnsafeQueueServer interface {
	// contains filtered or unexported methods
}

UnsafeQueueServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to QueueServer will result in compilation errors.

type UnsafeStreamerServer

type UnsafeStreamerServer interface {
	// contains filtered or unexported methods
}

UnsafeStreamerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to StreamerServer will result in compilation errors.

type User

type User struct {

	// user fields
	Id              int32                  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Username        string                 `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	Password        string                 `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
	Email           string                 `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"`
	RememberToken   string                 `protobuf:"bytes,5,opt,name=remember_token,json=rememberToken,proto3" json:"remember_token,omitempty"`
	Ip              string                 `protobuf:"bytes,6,opt,name=ip,proto3" json:"ip,omitempty"`
	UpdatedAt       *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	DeletedAt       *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=deleted_at,json=deletedAt,proto3" json:"deleted_at,omitempty"`
	CreatedAt       *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	Dj              *DJ                    `protobuf:"bytes,10,opt,name=dj,proto3" json:"dj,omitempty"`
	UserPermissions []string               `protobuf:"bytes,11,rep,name=user_permissions,json=userPermissions,proto3" json:"user_permissions,omitempty"`
	// contains filtered or unexported fields
}

func (*User) Descriptor deprecated

func (*User) Descriptor() ([]byte, []int)

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetCreatedAt

func (x *User) GetCreatedAt() *timestamppb.Timestamp

func (*User) GetDeletedAt

func (x *User) GetDeletedAt() *timestamppb.Timestamp

func (*User) GetDj

func (x *User) GetDj() *DJ

func (*User) GetEmail

func (x *User) GetEmail() string

func (*User) GetId

func (x *User) GetId() int32

func (*User) GetIp

func (x *User) GetIp() string

func (*User) GetPassword

func (x *User) GetPassword() string

func (*User) GetRememberToken

func (x *User) GetRememberToken() string

func (*User) GetUpdatedAt

func (x *User) GetUpdatedAt() *timestamppb.Timestamp

func (*User) GetUserPermissions

func (x *User) GetUserPermissions() []string

func (*User) GetUsername

func (x *User) GetUsername() string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

func (x *User) ProtoReflect() protoreflect.Message

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

type UserAnnouncement

type UserAnnouncement struct {
	User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	// contains filtered or unexported fields
}

func (*UserAnnouncement) Descriptor deprecated

func (*UserAnnouncement) Descriptor() ([]byte, []int)

Deprecated: Use UserAnnouncement.ProtoReflect.Descriptor instead.

func (*UserAnnouncement) GetUser

func (x *UserAnnouncement) GetUser() *User

func (*UserAnnouncement) ProtoMessage

func (*UserAnnouncement) ProtoMessage()

func (*UserAnnouncement) ProtoReflect

func (x *UserAnnouncement) ProtoReflect() protoreflect.Message

func (*UserAnnouncement) Reset

func (x *UserAnnouncement) Reset()

func (*UserAnnouncement) String

func (x *UserAnnouncement) String() string

type UserUpdate

type UserUpdate struct {
	User         *User  `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	StreamerName string `protobuf:"bytes,2,opt,name=streamer_name,json=streamerName,proto3" json:"streamer_name,omitempty"`
	// contains filtered or unexported fields
}

func (*UserUpdate) Descriptor deprecated

func (*UserUpdate) Descriptor() ([]byte, []int)

Deprecated: Use UserUpdate.ProtoReflect.Descriptor instead.

func (*UserUpdate) GetStreamerName

func (x *UserUpdate) GetStreamerName() string

func (*UserUpdate) GetUser

func (x *UserUpdate) GetUser() *User

func (*UserUpdate) ProtoMessage

func (*UserUpdate) ProtoMessage()

func (*UserUpdate) ProtoReflect

func (x *UserUpdate) ProtoReflect() protoreflect.Message

func (*UserUpdate) Reset

func (x *UserUpdate) Reset()

func (*UserUpdate) String

func (x *UserUpdate) String() string

Jump to

Keyboard shortcuts

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