soundboard

package
v1.9.7 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Soundboard_GetSoundboardFile_FullMethodName = "/api.v1alpha1.soundboard.Soundboard/GetSoundboardFile"
	Soundboard_CreateSoundboard_FullMethodName  = "/api.v1alpha1.soundboard.Soundboard/CreateSoundboard"
	Soundboard_ListSoundboards_FullMethodName   = "/api.v1alpha1.soundboard.Soundboard/ListSoundboards"
	Soundboard_UpdateSoundboard_FullMethodName  = "/api.v1alpha1.soundboard.Soundboard/UpdateSoundboard"
	Soundboard_DeleteSoundboard_FullMethodName  = "/api.v1alpha1.soundboard.Soundboard/DeleteSoundboard"
)

Variables

View Source
var File_api_v1alpha1_soundboard_entities_proto protoreflect.FileDescriptor
View Source
var File_api_v1alpha1_soundboard_service_proto protoreflect.FileDescriptor
View Source
var Soundboard_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.v1alpha1.soundboard.Soundboard",
	HandlerType: (*SoundboardServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateSoundboard",
			Handler:    _Soundboard_CreateSoundboard_Handler,
		},
		{
			MethodName: "ListSoundboards",
			Handler:    _Soundboard_ListSoundboards_Handler,
		},
		{
			MethodName: "UpdateSoundboard",
			Handler:    _Soundboard_UpdateSoundboard_Handler,
		},
		{
			MethodName: "DeleteSoundboard",
			Handler:    _Soundboard_DeleteSoundboard_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "GetSoundboardFile",
			Handler:       _Soundboard_GetSoundboardFile_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "api/v1alpha1/soundboard/service.proto",
}

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

Functions

func RegisterSoundboardServer

func RegisterSoundboardServer(s grpc.ServiceRegistrar, srv SoundboardServer)

Types

type CreateSoundboardReq

type CreateSoundboardReq struct {

	// The metadata of the soundboard.
	Soundboard *SoundboardDetails `protobuf:"bytes,1,opt,name=soundboard,proto3" json:"soundboard,omitempty"`
	// The generated ID received from fts.GetUploadFileUrl.
	FtsId string `protobuf:"bytes,2,opt,name=fts_id,json=ftsId,proto3" json:"fts_id,omitempty"`
	// contains filtered or unexported fields
}

Request message for the CreateSoundboard RPC method.

func (*CreateSoundboardReq) Descriptor deprecated

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

Deprecated: Use CreateSoundboardReq.ProtoReflect.Descriptor instead.

func (*CreateSoundboardReq) GetFtsId

func (x *CreateSoundboardReq) GetFtsId() string

func (*CreateSoundboardReq) GetSoundboard

func (x *CreateSoundboardReq) GetSoundboard() *SoundboardDetails

func (*CreateSoundboardReq) ProtoMessage

func (*CreateSoundboardReq) ProtoMessage()

func (*CreateSoundboardReq) ProtoReflect

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

func (*CreateSoundboardReq) Reset

func (x *CreateSoundboardReq) Reset()

func (*CreateSoundboardReq) String

func (x *CreateSoundboardReq) String() string

type CreateSoundboardRes

type CreateSoundboardRes struct {

	// Generated snowflake ID which will correspond to the soundboard.
	SoundboardId int64 `protobuf:"varint,1,opt,name=soundboard_id,json=soundboardId,proto3" json:"soundboard_id,omitempty"`
	// The generated ID received from fts.GetUploadFileUrl.
	FtsId string `protobuf:"bytes,2,opt,name=fts_id,json=ftsId,proto3" json:"fts_id,omitempty"`
	// contains filtered or unexported fields
}

Response message for the CreateSoundboard RPC method.

func (*CreateSoundboardRes) Descriptor deprecated

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

Deprecated: Use CreateSoundboardRes.ProtoReflect.Descriptor instead.

func (*CreateSoundboardRes) GetFtsId

func (x *CreateSoundboardRes) GetFtsId() string

func (*CreateSoundboardRes) GetSoundboardId

func (x *CreateSoundboardRes) GetSoundboardId() int64

func (*CreateSoundboardRes) ProtoMessage

func (*CreateSoundboardRes) ProtoMessage()

func (*CreateSoundboardRes) ProtoReflect

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

func (*CreateSoundboardRes) Reset

func (x *CreateSoundboardRes) Reset()

func (*CreateSoundboardRes) String

func (x *CreateSoundboardRes) String() string

type DeleteSoundboardReq

type DeleteSoundboardReq struct {

	// ID of the soundboard whose file and details will be deleted.
	SoundboardId int64 `protobuf:"varint,1,opt,name=soundboard_id,json=soundboardId,proto3" json:"soundboard_id,omitempty"`
	// contains filtered or unexported fields
}

Request message for the DeleteSoundboard RPC method.

func (*DeleteSoundboardReq) Descriptor deprecated

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

Deprecated: Use DeleteSoundboardReq.ProtoReflect.Descriptor instead.

func (*DeleteSoundboardReq) GetSoundboardId

func (x *DeleteSoundboardReq) GetSoundboardId() int64

func (*DeleteSoundboardReq) ProtoMessage

func (*DeleteSoundboardReq) ProtoMessage()

func (*DeleteSoundboardReq) ProtoReflect

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

func (*DeleteSoundboardReq) Reset

func (x *DeleteSoundboardReq) Reset()

func (*DeleteSoundboardReq) String

func (x *DeleteSoundboardReq) String() string

type DeleteSoundboardRes

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

Response message for the DeleteSoundboard RPC method.

func (*DeleteSoundboardRes) Descriptor deprecated

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

Deprecated: Use DeleteSoundboardRes.ProtoReflect.Descriptor instead.

func (*DeleteSoundboardRes) ProtoMessage

func (*DeleteSoundboardRes) ProtoMessage()

func (*DeleteSoundboardRes) ProtoReflect

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

func (*DeleteSoundboardRes) Reset

func (x *DeleteSoundboardRes) Reset()

func (*DeleteSoundboardRes) String

func (x *DeleteSoundboardRes) String() string

type GetSoundboardFileReq

type GetSoundboardFileReq struct {

	// ID of the requested soundboard whose file will be returned.
	SoundboardId int64 `protobuf:"varint,1,opt,name=soundboard_id,json=soundboardId,proto3" json:"soundboard_id,omitempty"`
	// contains filtered or unexported fields
}

Request message for the GetSoundboardFile RPC method.

func (*GetSoundboardFileReq) Descriptor deprecated

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

Deprecated: Use GetSoundboardFileReq.ProtoReflect.Descriptor instead.

func (*GetSoundboardFileReq) GetSoundboardId

func (x *GetSoundboardFileReq) GetSoundboardId() int64

func (*GetSoundboardFileReq) ProtoMessage

func (*GetSoundboardFileReq) ProtoMessage()

func (*GetSoundboardFileReq) ProtoReflect

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

func (*GetSoundboardFileReq) Reset

func (x *GetSoundboardFileReq) Reset()

func (*GetSoundboardFileReq) String

func (x *GetSoundboardFileReq) String() string

type GetSoundboardFileRes

type GetSoundboardFileRes struct {

	// Segments of the audio file, sent in 3mb chunks.
	SoundboardFile []byte `protobuf:"bytes,1,opt,name=soundboard_file,json=soundboardFile,proto3" json:"soundboard_file,omitempty"`
	// contains filtered or unexported fields
}

Response message for the GetSoundboardFile RPC method.

func (*GetSoundboardFileRes) Descriptor deprecated

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

Deprecated: Use GetSoundboardFileRes.ProtoReflect.Descriptor instead.

func (*GetSoundboardFileRes) GetSoundboardFile

func (x *GetSoundboardFileRes) GetSoundboardFile() []byte

func (*GetSoundboardFileRes) ProtoMessage

func (*GetSoundboardFileRes) ProtoMessage()

func (*GetSoundboardFileRes) ProtoReflect

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

func (*GetSoundboardFileRes) Reset

func (x *GetSoundboardFileRes) Reset()

func (*GetSoundboardFileRes) String

func (x *GetSoundboardFileRes) String() string

type GetSoundboardReq

type GetSoundboardReq struct {

	// ID of the requested soundboard whose details will be returned.
	SoundboardId int64 `protobuf:"varint,1,opt,name=soundboard_id,json=soundboardId,proto3" json:"soundboard_id,omitempty"`
	// contains filtered or unexported fields
}

Request message for the GetSoundboard RPC method.

func (*GetSoundboardReq) Descriptor deprecated

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

Deprecated: Use GetSoundboardReq.ProtoReflect.Descriptor instead.

func (*GetSoundboardReq) GetSoundboardId

func (x *GetSoundboardReq) GetSoundboardId() int64

func (*GetSoundboardReq) ProtoMessage

func (*GetSoundboardReq) ProtoMessage()

func (*GetSoundboardReq) ProtoReflect

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

func (*GetSoundboardReq) Reset

func (x *GetSoundboardReq) Reset()

func (*GetSoundboardReq) String

func (x *GetSoundboardReq) String() string

type GetSoundboardRes

type GetSoundboardRes struct {

	// Metadata of the soundboard.
	Soundboard *SoundboardDetails `protobuf:"bytes,1,opt,name=soundboard,proto3" json:"soundboard,omitempty"`
	// contains filtered or unexported fields
}

Response message for the GetSoundboard RPC method.

func (*GetSoundboardRes) Descriptor deprecated

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

Deprecated: Use GetSoundboardRes.ProtoReflect.Descriptor instead.

func (*GetSoundboardRes) GetSoundboard

func (x *GetSoundboardRes) GetSoundboard() *SoundboardDetails

func (*GetSoundboardRes) ProtoMessage

func (*GetSoundboardRes) ProtoMessage()

func (*GetSoundboardRes) ProtoReflect

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

func (*GetSoundboardRes) Reset

func (x *GetSoundboardRes) Reset()

func (*GetSoundboardRes) String

func (x *GetSoundboardRes) String() string

type ListSoundboardsReq

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

Request message for the ListSoundboards RPC method.

func (*ListSoundboardsReq) Descriptor deprecated

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

Deprecated: Use ListSoundboardsReq.ProtoReflect.Descriptor instead.

func (*ListSoundboardsReq) ProtoMessage

func (*ListSoundboardsReq) ProtoMessage()

func (*ListSoundboardsReq) ProtoReflect

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

func (*ListSoundboardsReq) Reset

func (x *ListSoundboardsReq) Reset()

func (*ListSoundboardsReq) String

func (x *ListSoundboardsReq) String() string

type ListSoundboardsRes

type ListSoundboardsRes struct {

	// Each soundboard's metadata belonging to org.
	Soundboards []*SoundboardDetails `protobuf:"bytes,1,rep,name=soundboards,proto3" json:"soundboards,omitempty"`
	// contains filtered or unexported fields
}

Response message for the ListSoundboards RPC method.

func (*ListSoundboardsRes) Descriptor deprecated

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

Deprecated: Use ListSoundboardsRes.ProtoReflect.Descriptor instead.

func (*ListSoundboardsRes) GetSoundboards

func (x *ListSoundboardsRes) GetSoundboards() []*SoundboardDetails

func (*ListSoundboardsRes) ProtoMessage

func (*ListSoundboardsRes) ProtoMessage()

func (*ListSoundboardsRes) ProtoReflect

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

func (*ListSoundboardsRes) Reset

func (x *ListSoundboardsRes) Reset()

func (*ListSoundboardsRes) String

func (x *ListSoundboardsRes) String() string

type SoundboardClient

type SoundboardClient interface {
	// GetSoundboardFile streams back segments of the audio file stored in rec
	// corresponding to the provided soundboard id and org id.
	GetSoundboardFile(ctx context.Context, in *GetSoundboardFileReq, opts ...grpc.CallOption) (Soundboard_GetSoundboardFileClient, error)
	// CreateSoundboard takes in a stream of metadata and audio file segments.
	// The first expected message should contain SoundboardDetails, then following
	// messages will be chunks of audio file data, which is then aggregated and put
	// into rec. The generated soundboard id is returned.
	CreateSoundboard(ctx context.Context, in *CreateSoundboardReq, opts ...grpc.CallOption) (*CreateSoundboardRes, error)
	// ListSoundboards returns all of the metadata for soundboards corresponding
	// corresponding to a given org id.
	ListSoundboards(ctx context.Context, in *ListSoundboardsReq, opts ...grpc.CallOption) (*ListSoundboardsRes, error)
	// UpdateSondboard updates a soundboard's metadata in the soundboard table.
	UpdateSoundboard(ctx context.Context, in *UpdateSoundboardReq, opts ...grpc.CallOption) (*UpdateSoundboardRes, error)
	// DeleteSondboard deletes a soundboard's metadata from the soundboard table.
	DeleteSoundboard(ctx context.Context, in *DeleteSoundboardReq, opts ...grpc.CallOption) (*DeleteSoundboardRes, error)
}

SoundboardClient is the client API for Soundboard 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 NewSoundboardClient

func NewSoundboardClient(cc grpc.ClientConnInterface) SoundboardClient

type SoundboardDetails

type SoundboardDetails struct {

	// ID of the soundboard, in the snowflake ID format.
	SoundboardId int64 `protobuf:"varint,1,opt,name=soundboard_id,json=soundboardId,proto3" json:"soundboard_id,omitempty"`
	// Name of audio file (does not include path), e.g. 'file.wav'.
	FileName string `protobuf:"bytes,2,opt,name=file_name,json=fileName,proto3" json:"file_name,omitempty"`
	// Audio file format of soundboard (.wav or .mp3).
	FileType commons.RecordingFileType `protobuf:"varint,3,opt,name=file_type,json=fileType,proto3,enum=api.commons.RecordingFileType" json:"file_type,omitempty"`
	// Soundboard title.
	Title string `protobuf:"bytes,4,opt,name=title,proto3" json:"title,omitempty"`
	// Soundboard description.
	Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
	// Timestamp of when the soundboard was created.
	DateCreated *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=date_created,json=dateCreated,proto3" json:"date_created,omitempty"`
	// Timestamp of when the soundboard was last updated.
	LastModified *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=last_modified,json=lastModified,proto3" json:"last_modified,omitempty"`
	// Soundboard audio file size as number of bytes, e.g. '3145728' = 3mb.
	FileSize int64 `protobuf:"varint,8,opt,name=file_size,json=fileSize,proto3" json:"file_size,omitempty"`
	// Length of audio file in seconds, e.g. '192' = 3:12.
	RecordingLength int64 `protobuf:"varint,9,opt,name=recording_length,json=recordingLength,proto3" json:"recording_length,omitempty"`
	// contains filtered or unexported fields
}

SoundboardDetails is the core entity which contains metadata for soundboard audio files, along with their identifiers.

func (*SoundboardDetails) Descriptor deprecated

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

Deprecated: Use SoundboardDetails.ProtoReflect.Descriptor instead.

func (*SoundboardDetails) GetDateCreated

func (x *SoundboardDetails) GetDateCreated() *timestamppb.Timestamp

func (*SoundboardDetails) GetDescription

func (x *SoundboardDetails) GetDescription() string

func (*SoundboardDetails) GetFileName

func (x *SoundboardDetails) GetFileName() string

func (*SoundboardDetails) GetFileSize

func (x *SoundboardDetails) GetFileSize() int64

func (*SoundboardDetails) GetFileType

func (x *SoundboardDetails) GetFileType() commons.RecordingFileType

func (*SoundboardDetails) GetLastModified

func (x *SoundboardDetails) GetLastModified() *timestamppb.Timestamp

func (*SoundboardDetails) GetRecordingLength

func (x *SoundboardDetails) GetRecordingLength() int64

func (*SoundboardDetails) GetSoundboardId

func (x *SoundboardDetails) GetSoundboardId() int64

func (*SoundboardDetails) GetTitle

func (x *SoundboardDetails) GetTitle() string

func (*SoundboardDetails) ProtoMessage

func (*SoundboardDetails) ProtoMessage()

func (*SoundboardDetails) ProtoReflect

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

func (*SoundboardDetails) Reset

func (x *SoundboardDetails) Reset()

func (*SoundboardDetails) String

func (x *SoundboardDetails) String() string

type SoundboardServer

type SoundboardServer interface {
	// GetSoundboardFile streams back segments of the audio file stored in rec
	// corresponding to the provided soundboard id and org id.
	GetSoundboardFile(*GetSoundboardFileReq, Soundboard_GetSoundboardFileServer) error
	// CreateSoundboard takes in a stream of metadata and audio file segments.
	// The first expected message should contain SoundboardDetails, then following
	// messages will be chunks of audio file data, which is then aggregated and put
	// into rec. The generated soundboard id is returned.
	CreateSoundboard(context.Context, *CreateSoundboardReq) (*CreateSoundboardRes, error)
	// ListSoundboards returns all of the metadata for soundboards corresponding
	// corresponding to a given org id.
	ListSoundboards(context.Context, *ListSoundboardsReq) (*ListSoundboardsRes, error)
	// UpdateSondboard updates a soundboard's metadata in the soundboard table.
	UpdateSoundboard(context.Context, *UpdateSoundboardReq) (*UpdateSoundboardRes, error)
	// DeleteSondboard deletes a soundboard's metadata from the soundboard table.
	DeleteSoundboard(context.Context, *DeleteSoundboardReq) (*DeleteSoundboardRes, error)
	// contains filtered or unexported methods
}

SoundboardServer is the server API for Soundboard service. All implementations must embed UnimplementedSoundboardServer for forward compatibility.

type Soundboard_GetSoundboardFileClient

type Soundboard_GetSoundboardFileClient interface {
	Recv() (*GetSoundboardFileRes, error)
	grpc.ClientStream
}

type Soundboard_GetSoundboardFileServer

type Soundboard_GetSoundboardFileServer interface {
	Send(*GetSoundboardFileRes) error
	grpc.ServerStream
}

type UnimplementedSoundboardServer

type UnimplementedSoundboardServer struct{}

UnimplementedSoundboardServer 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 (UnimplementedSoundboardServer) CreateSoundboard

func (UnimplementedSoundboardServer) DeleteSoundboard

func (UnimplementedSoundboardServer) GetSoundboardFile

func (UnimplementedSoundboardServer) ListSoundboards

func (UnimplementedSoundboardServer) UpdateSoundboard

type UnsafeSoundboardServer

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

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

type UpdateSoundboardReq

type UpdateSoundboardReq struct {

	// Soundboard details to be updated, must contain soundboard and org id.
	Soundboard *SoundboardDetails `protobuf:"bytes,1,opt,name=soundboard,proto3" json:"soundboard,omitempty"`
	// contains filtered or unexported fields
}

Request message for the UpdateSoundboard RPC method.

func (*UpdateSoundboardReq) Descriptor deprecated

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

Deprecated: Use UpdateSoundboardReq.ProtoReflect.Descriptor instead.

func (*UpdateSoundboardReq) GetSoundboard

func (x *UpdateSoundboardReq) GetSoundboard() *SoundboardDetails

func (*UpdateSoundboardReq) ProtoMessage

func (*UpdateSoundboardReq) ProtoMessage()

func (*UpdateSoundboardReq) ProtoReflect

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

func (*UpdateSoundboardReq) Reset

func (x *UpdateSoundboardReq) Reset()

func (*UpdateSoundboardReq) String

func (x *UpdateSoundboardReq) String() string

type UpdateSoundboardRes

type UpdateSoundboardRes struct {

	// ID of the soundboard which was updated.
	SoundboardId int64 `protobuf:"varint,1,opt,name=soundboard_id,json=soundboardId,proto3" json:"soundboard_id,omitempty"`
	// contains filtered or unexported fields
}

Response message for the UpdateSoundboard RPC method.

func (*UpdateSoundboardRes) Descriptor deprecated

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

Deprecated: Use UpdateSoundboardRes.ProtoReflect.Descriptor instead.

func (*UpdateSoundboardRes) GetSoundboardId

func (x *UpdateSoundboardRes) GetSoundboardId() int64

func (*UpdateSoundboardRes) ProtoMessage

func (*UpdateSoundboardRes) ProtoMessage()

func (*UpdateSoundboardRes) ProtoReflect

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

func (*UpdateSoundboardRes) Reset

func (x *UpdateSoundboardRes) Reset()

func (*UpdateSoundboardRes) String

func (x *UpdateSoundboardRes) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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