rpc

package
v0.0.0-...-a65692c Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2025 License: MIT Imports: 22 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 (
	Guest_Create_FullMethodName = "/radio.Guest/Create"
	Guest_Auth_FullMethodName   = "/radio.Guest/Auth"
	Guest_Deauth_FullMethodName = "/radio.Guest/Deauth"
	Guest_CanDo_FullMethodName  = "/radio.Guest/CanDo"
	Guest_Do_FullMethodName     = "/radio.Guest/Do"
)
View Source
const (
	Proxy_SourceStream_FullMethodName   = "/radio.Proxy/SourceStream"
	Proxy_MetadataStream_FullMethodName = "/radio.Proxy/MetadataStream"
	Proxy_StatusStream_FullMethodName   = "/radio.Proxy/StatusStream"
	Proxy_KickSource_FullMethodName     = "/radio.Proxy/KickSource"
	Proxy_ListSources_FullMethodName    = "/radio.Proxy/ListSources"
)
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 (
	GuestAction_name = map[int32]string{
		0: "None",
		1: "Kick",
		2: "Thread",
	}
	GuestAction_value = map[string]int32{
		"None":   0,
		"Kick":   1,
		"Thread": 2,
	}
)

Enum value maps for GuestAction.

View Source
var (
	ProxySourceEventType_name = map[int32]string{
		0: "Disconnect",
		1: "Connect",
		2: "Live",
	}
	ProxySourceEventType_value = map[string]int32{
		"Disconnect": 0,
		"Connect":    1,
		"Live":       2,
	}
)

Enum value maps for ProxySourceEventType.

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 Guest_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "radio.Guest",
	HandlerType: (*GuestServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Create",
			Handler:    _Guest_Create_Handler,
		},
		{
			MethodName: "Auth",
			Handler:    _Guest_Auth_Handler,
		},
		{
			MethodName: "Deauth",
			Handler:    _Guest_Deauth_Handler,
		},
		{
			MethodName: "CanDo",
			Handler:    _Guest_CanDo_Handler,
		},
		{
			MethodName: "Do",
			Handler:    _Guest_Do_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "radio.proto",
}

Guest_ServiceDesc is the grpc.ServiceDesc for Guest 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 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 Proxy_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "radio.Proxy",
	HandlerType: (*ProxyServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "KickSource",
			Handler:    _Proxy_KickSource_Handler,
		},
		{
			MethodName: "ListSources",
			Handler:    _Proxy_ListSources_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "SourceStream",
			Handler:       _Proxy_SourceStream_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "MetadataStream",
			Handler:       _Proxy_MetadataStream_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "StatusStream",
			Handler:       _Proxy_StatusStream_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "radio.proto",
}

Proxy_ServiceDesc is the grpc.ServiceDesc for Proxy 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 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 NewGuestService

func NewGuestService(c *grpc.ClientConn) radio.GuestService

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 NewProxyService

func NewProxyService(c *grpc.ClientConn) radio.ProxyService

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 RegisterGuestServer

func RegisterGuestServer(s grpc.ServiceRegistrar, srv GuestServer)

func RegisterListenerTrackerServer

func RegisterListenerTrackerServer(s grpc.ServiceRegistrar, srv ListenerTrackerServer)

func RegisterManagerServer

func RegisterManagerServer(s grpc.ServiceRegistrar, srv ManagerServer)

func RegisterProxyServer

func RegisterProxyServer(s grpc.ServiceRegistrar, srv ProxyServer)

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 {
	UnsafeAnnouncerServer
	// 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

func (AnnouncerShim) AnnounceUser

func (as AnnouncerShim) AnnounceUser(ctx context.Context, au *UserAnnouncement) (*emptypb.Empty, error)

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    string `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() string

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 GuestAction

type GuestAction int32
const (
	GuestAction_None   GuestAction = 0
	GuestAction_Kick   GuestAction = 1
	GuestAction_Thread GuestAction = 2
)

func (GuestAction) Descriptor

func (GuestAction) Enum

func (x GuestAction) Enum() *GuestAction

func (GuestAction) EnumDescriptor deprecated

func (GuestAction) EnumDescriptor() ([]byte, []int)

Deprecated: Use GuestAction.Descriptor instead.

func (GuestAction) Number

func (x GuestAction) Number() protoreflect.EnumNumber

func (GuestAction) String

func (x GuestAction) String() string

func (GuestAction) Type

type GuestAuthResponse

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

func (*GuestAuthResponse) Descriptor deprecated

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

Deprecated: Use GuestAuthResponse.ProtoReflect.Descriptor instead.

func (*GuestAuthResponse) GetUser

func (x *GuestAuthResponse) GetUser() *User

func (*GuestAuthResponse) ProtoMessage

func (*GuestAuthResponse) ProtoMessage()

func (*GuestAuthResponse) ProtoReflect

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

func (*GuestAuthResponse) Reset

func (x *GuestAuthResponse) Reset()

func (*GuestAuthResponse) String

func (x *GuestAuthResponse) String() string

type GuestCanDo

type GuestCanDo struct {
	User   *GuestUser  `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	Action GuestAction `protobuf:"varint,2,opt,name=action,proto3,enum=radio.GuestAction" json:"action,omitempty"`
	// contains filtered or unexported fields
}

func (*GuestCanDo) Descriptor deprecated

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

Deprecated: Use GuestCanDo.ProtoReflect.Descriptor instead.

func (*GuestCanDo) GetAction

func (x *GuestCanDo) GetAction() GuestAction

func (*GuestCanDo) GetUser

func (x *GuestCanDo) GetUser() *GuestUser

func (*GuestCanDo) ProtoMessage

func (*GuestCanDo) ProtoMessage()

func (*GuestCanDo) ProtoReflect

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

func (*GuestCanDo) Reset

func (x *GuestCanDo) Reset()

func (*GuestCanDo) String

func (x *GuestCanDo) String() string

type GuestClient

type GuestClient interface {
	Create(ctx context.Context, in *GuestUser, opts ...grpc.CallOption) (*GuestCreateResponse, error)
	Auth(ctx context.Context, in *GuestUser, opts ...grpc.CallOption) (*GuestAuthResponse, error)
	Deauth(ctx context.Context, in *GuestUser, opts ...grpc.CallOption) (*emptypb.Empty, error)
	CanDo(ctx context.Context, in *GuestCanDo, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error)
	Do(ctx context.Context, in *GuestCanDo, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error)
}

GuestClient is the client API for Guest 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 NewGuestClient

func NewGuestClient(cc grpc.ClientConnInterface) GuestClient

type GuestClientRPC

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

func (GuestClientRPC) Auth

func (g GuestClientRPC) Auth(ctx context.Context, nick string) (*radio.User, error)

func (GuestClientRPC) CanDo

func (g GuestClientRPC) CanDo(ctx context.Context, nick string, action radio.GuestAction) (bool, error)

func (GuestClientRPC) Create

func (g GuestClientRPC) Create(ctx context.Context, nick string) (*radio.User, string, error)

func (GuestClientRPC) Deauth

func (g GuestClientRPC) Deauth(ctx context.Context, nick string) error

func (GuestClientRPC) Do

func (g GuestClientRPC) Do(ctx context.Context, nick string, action radio.GuestAction) (bool, error)

type GuestCreateResponse

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

func (*GuestCreateResponse) Descriptor deprecated

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

Deprecated: Use GuestCreateResponse.ProtoReflect.Descriptor instead.

func (*GuestCreateResponse) GetPassword

func (x *GuestCreateResponse) GetPassword() string

func (*GuestCreateResponse) GetUser

func (x *GuestCreateResponse) GetUser() *User

func (*GuestCreateResponse) ProtoMessage

func (*GuestCreateResponse) ProtoMessage()

func (*GuestCreateResponse) ProtoReflect

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

func (*GuestCreateResponse) Reset

func (x *GuestCreateResponse) Reset()

func (*GuestCreateResponse) String

func (x *GuestCreateResponse) String() string

type GuestServer

type GuestServer interface {
	Create(context.Context, *GuestUser) (*GuestCreateResponse, error)
	Auth(context.Context, *GuestUser) (*GuestAuthResponse, error)
	Deauth(context.Context, *GuestUser) (*emptypb.Empty, error)
	CanDo(context.Context, *GuestCanDo) (*wrapperspb.BoolValue, error)
	Do(context.Context, *GuestCanDo) (*wrapperspb.BoolValue, error)
	// contains filtered or unexported methods
}

GuestServer is the server API for Guest service. All implementations must embed UnimplementedGuestServer for forward compatibility.

func NewGuest

func NewGuest(g radio.GuestService) GuestServer

type GuestShim

type GuestShim struct {
	UnsafeGuestServer
	// contains filtered or unexported fields
}

func (GuestShim) Auth

func (g GuestShim) Auth(ctx context.Context, user *GuestUser) (*GuestAuthResponse, error)

func (GuestShim) CanDo

func (g GuestShim) CanDo(ctx context.Context, gcd *GuestCanDo) (*wrapperspb.BoolValue, error)

func (GuestShim) Create

func (g GuestShim) Create(ctx context.Context, user *GuestUser) (*GuestCreateResponse, error)

func (GuestShim) Deauth

func (g GuestShim) Deauth(ctx context.Context, user *GuestUser) (*emptypb.Empty, error)

func (GuestShim) Do

type GuestUser

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

func (*GuestUser) Descriptor deprecated

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

Deprecated: Use GuestUser.ProtoReflect.Descriptor instead.

func (*GuestUser) GetName

func (x *GuestUser) GetName() string

func (*GuestUser) ProtoMessage

func (*GuestUser) ProtoMessage()

func (*GuestUser) ProtoReflect

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

func (*GuestUser) Reset

func (x *GuestUser) Reset()

func (*GuestUser) String

func (x *GuestUser) 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 {
	UnsafeListenerTrackerServer
	// 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) (grpc.ServerStreamingClient[StatusResponse], error)
	UpdateFromStorage(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
	CurrentSong(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (grpc.ServerStreamingClient[SongUpdate], error)
	UpdateSong(ctx context.Context, in *SongUpdate, opts ...grpc.CallOption) (*emptypb.Empty, error)
	CurrentThread(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (grpc.ServerStreamingClient[wrapperspb.StringValue], error)
	UpdateThread(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*emptypb.Empty, error)
	CurrentUser(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (grpc.ServerStreamingClient[User], error)
	UpdateUser(ctx context.Context, in *User, opts ...grpc.CallOption) (*emptypb.Empty, error)
	CurrentListenerCount(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (grpc.ServerStreamingClient[wrapperspb.Int64Value], 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, grpc.ServerStreamingServer[StatusResponse]) error
	UpdateFromStorage(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	CurrentSong(*emptypb.Empty, grpc.ServerStreamingServer[SongUpdate]) error
	UpdateSong(context.Context, *SongUpdate) (*emptypb.Empty, error)
	CurrentThread(*emptypb.Empty, grpc.ServerStreamingServer[wrapperspb.StringValue]) error
	UpdateThread(context.Context, *wrapperspb.StringValue) (*emptypb.Empty, error)
	CurrentUser(*emptypb.Empty, grpc.ServerStreamingServer[User]) error
	UpdateUser(context.Context, *User) (*emptypb.Empty, error)
	CurrentListenerCount(*emptypb.Empty, grpc.ServerStreamingServer[wrapperspb.Int64Value]) 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 {
	UnsafeManagerServer
	// 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 = grpc.ServerStreamingClient[wrapperspb.Int64Value]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Manager_CurrentListenerCountServer

type Manager_CurrentListenerCountServer = grpc.ServerStreamingServer[wrapperspb.Int64Value]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Manager_CurrentSongClient

type Manager_CurrentSongClient = grpc.ServerStreamingClient[SongUpdate]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Manager_CurrentSongServer

type Manager_CurrentSongServer = grpc.ServerStreamingServer[SongUpdate]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Manager_CurrentStatusClient

type Manager_CurrentStatusClient = grpc.ServerStreamingClient[StatusResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Manager_CurrentStatusServer

type Manager_CurrentStatusServer = grpc.ServerStreamingServer[StatusResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Manager_CurrentThreadClient

type Manager_CurrentThreadClient = grpc.ServerStreamingClient[wrapperspb.StringValue]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Manager_CurrentThreadServer

type Manager_CurrentThreadServer = grpc.ServerStreamingServer[wrapperspb.StringValue]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Manager_CurrentUserClient

type Manager_CurrentUserClient = grpc.ServerStreamingClient[User]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Manager_CurrentUserServer

type Manager_CurrentUserServer = grpc.ServerStreamingServer[User]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type ProxyClient

type ProxyClient interface {
	SourceStream(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ProxySourceEvent], error)
	MetadataStream(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ProxyMetadataEvent], error)
	StatusStream(ctx context.Context, in *ProxyStatusRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ProxyStatusEvent], error)
	KickSource(ctx context.Context, in *SourceID, opts ...grpc.CallOption) (*emptypb.Empty, error)
	ListSources(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ProxyListResponse, error)
}

ProxyClient is the client API for Proxy 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 NewProxyClient

func NewProxyClient(cc grpc.ClientConnInterface) ProxyClient

type ProxyClientRPC

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

func (ProxyClientRPC) KickSource

func (p ProxyClientRPC) KickSource(ctx context.Context, id radio.SourceID) error

func (ProxyClientRPC) ListSources

func (p ProxyClientRPC) ListSources(ctx context.Context) ([]radio.ProxySource, error)

func (ProxyClientRPC) MetadataStream

func (ProxyClientRPC) SourceStream

func (ProxyClientRPC) StatusStream

type ProxyListResponse

type ProxyListResponse struct {
	Sources []*ProxySource `protobuf:"bytes,1,rep,name=sources,proto3" json:"sources,omitempty"`
	// contains filtered or unexported fields
}

func (*ProxyListResponse) Descriptor deprecated

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

Deprecated: Use ProxyListResponse.ProtoReflect.Descriptor instead.

func (*ProxyListResponse) GetSources

func (x *ProxyListResponse) GetSources() []*ProxySource

func (*ProxyListResponse) ProtoMessage

func (*ProxyListResponse) ProtoMessage()

func (*ProxyListResponse) ProtoReflect

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

func (*ProxyListResponse) Reset

func (x *ProxyListResponse) Reset()

func (*ProxyListResponse) String

func (x *ProxyListResponse) String() string

type ProxyMetadataEvent

type ProxyMetadataEvent struct {
	User      *User  `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	MountName string `protobuf:"bytes,2,opt,name=mount_name,json=mountName,proto3" json:"mount_name,omitempty"`
	Metadata  string `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

func (*ProxyMetadataEvent) Descriptor deprecated

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

Deprecated: Use ProxyMetadataEvent.ProtoReflect.Descriptor instead.

func (*ProxyMetadataEvent) GetMetadata

func (x *ProxyMetadataEvent) GetMetadata() string

func (*ProxyMetadataEvent) GetMountName

func (x *ProxyMetadataEvent) GetMountName() string

func (*ProxyMetadataEvent) GetUser

func (x *ProxyMetadataEvent) GetUser() *User

func (*ProxyMetadataEvent) ProtoMessage

func (*ProxyMetadataEvent) ProtoMessage()

func (*ProxyMetadataEvent) ProtoReflect

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

func (*ProxyMetadataEvent) Reset

func (x *ProxyMetadataEvent) Reset()

func (*ProxyMetadataEvent) String

func (x *ProxyMetadataEvent) String() string

type ProxyServer

type ProxyServer interface {
	SourceStream(*emptypb.Empty, grpc.ServerStreamingServer[ProxySourceEvent]) error
	MetadataStream(*emptypb.Empty, grpc.ServerStreamingServer[ProxyMetadataEvent]) error
	StatusStream(*ProxyStatusRequest, grpc.ServerStreamingServer[ProxyStatusEvent]) error
	KickSource(context.Context, *SourceID) (*emptypb.Empty, error)
	ListSources(context.Context, *emptypb.Empty) (*ProxyListResponse, error)
	// contains filtered or unexported methods
}

ProxyServer is the server API for Proxy service. All implementations must embed UnimplementedProxyServer for forward compatibility.

func NewProxy

func NewProxy(p radio.ProxyService) ProxyServer

type ProxyShim

type ProxyShim struct {
	UnsafeProxyServer
	// contains filtered or unexported fields
}

func (ProxyShim) KickSource

func (ps ProxyShim) KickSource(ctx context.Context, id *SourceID) (*emptypb.Empty, error)

func (ProxyShim) ListSources

func (ps ProxyShim) ListSources(ctx context.Context, _ *emptypb.Empty) (*ProxyListResponse, error)

func (ProxyShim) MetadataStream

func (ps ProxyShim) MetadataStream(_ *emptypb.Empty, s Proxy_MetadataStreamServer) error

func (ProxyShim) SourceStream

func (ps ProxyShim) SourceStream(_ *emptypb.Empty, s Proxy_SourceStreamServer) error

func (ProxyShim) StatusStream

type ProxySource

type ProxySource struct {
	User      *User                  `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	MountName string                 `protobuf:"bytes,2,opt,name=mount_name,json=mountName,proto3" json:"mount_name,omitempty"`
	Ip        string                 `protobuf:"bytes,3,opt,name=ip,proto3" json:"ip,omitempty"`
	UserAgent string                 `protobuf:"bytes,4,opt,name=user_agent,json=userAgent,proto3" json:"user_agent,omitempty"`
	Metadata  string                 `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata,omitempty"`
	Priority  uint32                 `protobuf:"varint,6,opt,name=priority,proto3" json:"priority,omitempty"`
	ID        *SourceID              `protobuf:"bytes,7,opt,name=ID,proto3" json:"ID,omitempty"`
	StartTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
	IsLive    bool                   `protobuf:"varint,9,opt,name=is_live,json=isLive,proto3" json:"is_live,omitempty"`
	// contains filtered or unexported fields
}

func (*ProxySource) Descriptor deprecated

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

Deprecated: Use ProxySource.ProtoReflect.Descriptor instead.

func (*ProxySource) GetID

func (x *ProxySource) GetID() *SourceID

func (*ProxySource) GetIp

func (x *ProxySource) GetIp() string

func (*ProxySource) GetIsLive

func (x *ProxySource) GetIsLive() bool

func (*ProxySource) GetMetadata

func (x *ProxySource) GetMetadata() string

func (*ProxySource) GetMountName

func (x *ProxySource) GetMountName() string

func (*ProxySource) GetPriority

func (x *ProxySource) GetPriority() uint32

func (*ProxySource) GetStartTime

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

func (*ProxySource) GetUser

func (x *ProxySource) GetUser() *User

func (*ProxySource) GetUserAgent

func (x *ProxySource) GetUserAgent() string

func (*ProxySource) ProtoMessage

func (*ProxySource) ProtoMessage()

func (*ProxySource) ProtoReflect

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

func (*ProxySource) Reset

func (x *ProxySource) Reset()

func (*ProxySource) String

func (x *ProxySource) String() string

type ProxySourceEvent

type ProxySourceEvent struct {
	User      *User                `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	MountName string               `protobuf:"bytes,2,opt,name=mount_name,json=mountName,proto3" json:"mount_name,omitempty"`
	Event     ProxySourceEventType `protobuf:"varint,3,opt,name=event,proto3,enum=radio.ProxySourceEventType" json:"event,omitempty"`
	ID        *SourceID            `protobuf:"bytes,4,opt,name=ID,proto3" json:"ID,omitempty"`
	// contains filtered or unexported fields
}

func (*ProxySourceEvent) Descriptor deprecated

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

Deprecated: Use ProxySourceEvent.ProtoReflect.Descriptor instead.

func (*ProxySourceEvent) GetEvent

func (x *ProxySourceEvent) GetEvent() ProxySourceEventType

func (*ProxySourceEvent) GetID

func (x *ProxySourceEvent) GetID() *SourceID

func (*ProxySourceEvent) GetMountName

func (x *ProxySourceEvent) GetMountName() string

func (*ProxySourceEvent) GetUser

func (x *ProxySourceEvent) GetUser() *User

func (*ProxySourceEvent) ProtoMessage

func (*ProxySourceEvent) ProtoMessage()

func (*ProxySourceEvent) ProtoReflect

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

func (*ProxySourceEvent) Reset

func (x *ProxySourceEvent) Reset()

func (*ProxySourceEvent) String

func (x *ProxySourceEvent) String() string

type ProxySourceEventType

type ProxySourceEventType int32
const (
	ProxySourceEventType_Disconnect ProxySourceEventType = 0
	ProxySourceEventType_Connect    ProxySourceEventType = 1
	ProxySourceEventType_Live       ProxySourceEventType = 2
)

func (ProxySourceEventType) Descriptor

func (ProxySourceEventType) Enum

func (ProxySourceEventType) EnumDescriptor deprecated

func (ProxySourceEventType) EnumDescriptor() ([]byte, []int)

Deprecated: Use ProxySourceEventType.Descriptor instead.

func (ProxySourceEventType) Number

func (ProxySourceEventType) String

func (x ProxySourceEventType) String() string

func (ProxySourceEventType) Type

type ProxyStatusEvent

type ProxyStatusEvent struct {
	Connections []*ProxySource `protobuf:"bytes,1,rep,name=connections,proto3" json:"connections,omitempty"`
	// contains filtered or unexported fields
}

func (*ProxyStatusEvent) Descriptor deprecated

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

Deprecated: Use ProxyStatusEvent.ProtoReflect.Descriptor instead.

func (*ProxyStatusEvent) GetConnections

func (x *ProxyStatusEvent) GetConnections() []*ProxySource

func (*ProxyStatusEvent) ProtoMessage

func (*ProxyStatusEvent) ProtoMessage()

func (*ProxyStatusEvent) ProtoReflect

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

func (*ProxyStatusEvent) Reset

func (x *ProxyStatusEvent) Reset()

func (*ProxyStatusEvent) String

func (x *ProxyStatusEvent) String() string

type ProxyStatusRequest

type ProxyStatusRequest struct {
	UserId int32 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// contains filtered or unexported fields
}

func (*ProxyStatusRequest) Descriptor deprecated

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

Deprecated: Use ProxyStatusRequest.ProtoReflect.Descriptor instead.

func (*ProxyStatusRequest) GetUserId

func (x *ProxyStatusRequest) GetUserId() int32

func (*ProxyStatusRequest) ProtoMessage

func (*ProxyStatusRequest) ProtoMessage()

func (*ProxyStatusRequest) ProtoReflect

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

func (*ProxyStatusRequest) Reset

func (x *ProxyStatusRequest) Reset()

func (*ProxyStatusRequest) String

func (x *ProxyStatusRequest) String() string

type Proxy_MetadataStreamClient

type Proxy_MetadataStreamClient = grpc.ServerStreamingClient[ProxyMetadataEvent]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Proxy_MetadataStreamServer

type Proxy_MetadataStreamServer = grpc.ServerStreamingServer[ProxyMetadataEvent]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Proxy_SourceStreamClient

type Proxy_SourceStreamClient = grpc.ServerStreamingClient[ProxySourceEvent]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Proxy_SourceStreamServer

type Proxy_SourceStreamServer = grpc.ServerStreamingServer[ProxySourceEvent]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Proxy_StatusStreamClient

type Proxy_StatusStreamClient = grpc.ServerStreamingClient[ProxyStatusEvent]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Proxy_StatusStreamServer

type Proxy_StatusStreamServer = grpc.ServerStreamingServer[ProxyStatusEvent]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

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.

Queue is documented under the radio.QueueService interface in the Go package

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.

Queue is documented under the radio.QueueService interface in the Go package

func NewQueue

func NewQueue(q radio.QueueService) QueueServer

NewQueue returns a new shim around the service given

type QueueShim

type QueueShim struct {
	UnsafeQueueServer
	// 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 SourceID

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

func (*SourceID) Descriptor deprecated

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

Deprecated: Use SourceID.ProtoReflect.Descriptor instead.

func (*SourceID) GetID

func (x *SourceID) GetID() string

func (*SourceID) ProtoMessage

func (*SourceID) ProtoMessage()

func (*SourceID) ProtoReflect

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

func (*SourceID) Reset

func (x *SourceID) Reset()

func (*SourceID) String

func (x *SourceID) 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 {
	UnsafeStreamerServer
	// 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 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.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedAnnouncerServer) AnnounceRequest

func (UnimplementedAnnouncerServer) AnnounceSong

func (UnimplementedAnnouncerServer) AnnounceUser

type UnimplementedGuestServer

type UnimplementedGuestServer struct{}

UnimplementedGuestServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedGuestServer) Auth

func (UnimplementedGuestServer) CanDo

func (UnimplementedGuestServer) Create

func (UnimplementedGuestServer) Deauth

func (UnimplementedGuestServer) Do

type UnimplementedListenerTrackerServer

type UnimplementedListenerTrackerServer struct{}

UnimplementedListenerTrackerServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedListenerTrackerServer) ListClients

func (UnimplementedListenerTrackerServer) RemoveClient

type UnimplementedManagerServer

type UnimplementedManagerServer struct{}

UnimplementedManagerServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

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 UnimplementedProxyServer

type UnimplementedProxyServer struct{}

UnimplementedProxyServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedProxyServer) KickSource

func (UnimplementedProxyServer) ListSources

func (UnimplementedProxyServer) MetadataStream

func (UnimplementedProxyServer) SourceStream

type UnimplementedQueueServer

type UnimplementedQueueServer struct{}

UnimplementedQueueServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

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.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

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 UnsafeGuestServer

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

UnsafeGuestServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GuestServer 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 UnsafeProxyServer

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

UnsafeProxyServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ProxyServer 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