music

package
v0.0.0-...-a06991b Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 8 Imported by: 30

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GoUnusedProtection__ int
View Source
var StoreEnterAlbumGiveawayResult_Success_DEFAULT bool

Functions

This section is empty.

Types

type Album

type Album struct {
	Tracks   []*Track `thrift:"tracks,1" db:"tracks" json:"tracks"`
	Duration Minutes  `thrift:"duration,2" db:"duration" json:"duration"`
	ASIN     string   `thrift:"ASIN,3" db:"ASIN" json:"ASIN"`
}

The IDL provides set, list, and map types for representing collections of data. Our Album struct contains a list of Tracks.

var StoreBuyAlbumResult_Success_DEFAULT *Album

func NewAlbum

func NewAlbum() *Album

func (*Album) GetASIN

func (p *Album) GetASIN() string

func (*Album) GetDuration

func (p *Album) GetDuration() Minutes

func (*Album) GetTracks

func (p *Album) GetTracks() []*Track

func (*Album) Read

func (p *Album) Read(ctx context.Context, iprot thrift.TProtocol) error

func (*Album) ReadField1

func (p *Album) ReadField1(ctx context.Context, iprot thrift.TProtocol) error

func (*Album) ReadField2

func (p *Album) ReadField2(ctx context.Context, iprot thrift.TProtocol) error

func (*Album) ReadField3

func (p *Album) ReadField3(ctx context.Context, iprot thrift.TProtocol) error

func (*Album) String

func (p *Album) String() string

func (*Album) Write

func (p *Album) Write(ctx context.Context, oprot thrift.TProtocol) error

type AlbumWinnersErrorableSubscriber

type AlbumWinnersErrorableSubscriber interface {
	SubscribeContestStartErrorable(handler func(frugal.FContext, []*Album) error) (*frugal.FSubscription, error)
	SubscribeTimeLeftErrorable(handler func(frugal.FContext, Minutes) error) (*frugal.FSubscription, error)
	SubscribeWinnerErrorable(handler func(frugal.FContext, *Album) error) (*frugal.FSubscription, error)
}

Scopes are a Frugal extension to the IDL for declaring PubSub semantics. Subscribers to this scope will be notified if they win a contest. Scopes must have a prefix.

func NewAlbumWinnersErrorableSubscriber

func NewAlbumWinnersErrorableSubscriber(provider *frugal.FScopeProvider, middleware ...frugal.ServiceMiddleware) AlbumWinnersErrorableSubscriber

type AlbumWinnersPublisher

type AlbumWinnersPublisher interface {
	Open() error
	Close() error
	PublishContestStart(fctx frugal.FContext, req []*Album) error
	PublishTimeLeft(fctx frugal.FContext, req Minutes) error
	PublishWinner(fctx frugal.FContext, req *Album) error
}

Scopes are a Frugal extension to the IDL for declaring PubSub semantics. Subscribers to this scope will be notified if they win a contest. Scopes must have a prefix.

func NewAlbumWinnersPublisher

func NewAlbumWinnersPublisher(provider *frugal.FScopeProvider, middleware ...frugal.ServiceMiddleware) AlbumWinnersPublisher

type AlbumWinnersSubscriber

type AlbumWinnersSubscriber interface {
	SubscribeContestStart(handler func(frugal.FContext, []*Album)) (*frugal.FSubscription, error)
	SubscribeTimeLeft(handler func(frugal.FContext, Minutes)) (*frugal.FSubscription, error)
	SubscribeWinner(handler func(frugal.FContext, *Album)) (*frugal.FSubscription, error)
}

Scopes are a Frugal extension to the IDL for declaring PubSub semantics. Subscribers to this scope will be notified if they win a contest. Scopes must have a prefix.

func NewAlbumWinnersSubscriber

func NewAlbumWinnersSubscriber(provider *frugal.FScopeProvider, middleware ...frugal.ServiceMiddleware) AlbumWinnersSubscriber

type FStore

type FStore interface {
	BuyAlbum(fctx frugal.FContext, ASIN string, acct string) (r *Album, err error)
	// Deprecated: use something else
	EnterAlbumGiveaway(fctx frugal.FContext, email string, name string) (r bool, err error)
}

Services are the API for client and server interaction. Users can buy an album or enter a giveaway for a free album.

type FStoreClient

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

Services are the API for client and server interaction. Users can buy an album or enter a giveaway for a free album.

func NewFStoreClient

func NewFStoreClient(provider *frugal.FServiceProvider, middleware ...frugal.ServiceMiddleware) *FStoreClient

func (*FStoreClient) BuyAlbum

func (f *FStoreClient) BuyAlbum(fctx frugal.FContext, asin string, acct string) (r *Album, err error)

func (*FStoreClient) Client_

func (f *FStoreClient) Client_() frugal.FClient

func (*FStoreClient) EnterAlbumGiveaway deprecated

func (f *FStoreClient) EnterAlbumGiveaway(fctx frugal.FContext, email string, name string) (r bool, err error)

Deprecated: use something else

type FStoreProcessor

type FStoreProcessor struct {
	*frugal.FBaseProcessor
}

func NewFStoreProcessor

func NewFStoreProcessor(handler FStore, middleware ...frugal.ServiceMiddleware) *FStoreProcessor

type Minutes

type Minutes float64

type PerfRightsOrg

type PerfRightsOrg int64
const (
	PerfRightsOrg_ASCAP PerfRightsOrg = 1
	PerfRightsOrg_BMI   PerfRightsOrg = 2
	PerfRightsOrg_SESAC PerfRightsOrg = 3
	PerfRightsOrg_Other PerfRightsOrg = 4
)

func PerfRightsOrgFromString

func PerfRightsOrgFromString(s string) (PerfRightsOrg, error)

func (PerfRightsOrg) MarshalText

func (p PerfRightsOrg) MarshalText() ([]byte, error)

func (*PerfRightsOrg) Scan

func (p *PerfRightsOrg) Scan(value interface{}) error

func (PerfRightsOrg) String

func (p PerfRightsOrg) String() string

func (*PerfRightsOrg) UnmarshalText

func (p *PerfRightsOrg) UnmarshalText(text []byte) error

func (*PerfRightsOrg) Value

func (p *PerfRightsOrg) Value() (driver.Value, error)

type PurchasingError

type PurchasingError struct {
	Message   string `thrift:"message,1" db:"message" json:"message"`
	ErrorCode int16  `thrift:"error_code,2" db:"error_code" json:"error_code"`
}

Exceptions are converted to the native format for each compiled language.

var StoreBuyAlbumResult_Error_DEFAULT *PurchasingError

func NewPurchasingError

func NewPurchasingError() *PurchasingError

func (*PurchasingError) Error

func (p *PurchasingError) Error() string

func (*PurchasingError) GetErrorCode

func (p *PurchasingError) GetErrorCode() int16

func (*PurchasingError) GetMessage

func (p *PurchasingError) GetMessage() string

func (*PurchasingError) Read

func (p *PurchasingError) Read(ctx context.Context, iprot thrift.TProtocol) error

func (*PurchasingError) ReadField1

func (p *PurchasingError) ReadField1(ctx context.Context, iprot thrift.TProtocol) error

func (*PurchasingError) ReadField2

func (p *PurchasingError) ReadField2(ctx context.Context, iprot thrift.TProtocol) error

func (*PurchasingError) String

func (p *PurchasingError) String() string

func (*PurchasingError) Write

func (p *PurchasingError) Write(ctx context.Context, oprot thrift.TProtocol) error

type StoreBuyAlbumArgs

type StoreBuyAlbumArgs struct {
	ASIN string `thrift:"ASIN,1" db:"ASIN" json:"ASIN"`
	Acct string `thrift:"acct,2" db:"acct" json:"acct"`
}

func NewStoreBuyAlbumArgs

func NewStoreBuyAlbumArgs() *StoreBuyAlbumArgs

func (*StoreBuyAlbumArgs) GetASIN

func (p *StoreBuyAlbumArgs) GetASIN() string

func (*StoreBuyAlbumArgs) GetAcct

func (p *StoreBuyAlbumArgs) GetAcct() string

func (*StoreBuyAlbumArgs) Read

func (p *StoreBuyAlbumArgs) Read(ctx context.Context, iprot thrift.TProtocol) error

func (*StoreBuyAlbumArgs) ReadField1

func (p *StoreBuyAlbumArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error

func (*StoreBuyAlbumArgs) ReadField2

func (p *StoreBuyAlbumArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error

func (*StoreBuyAlbumArgs) String

func (p *StoreBuyAlbumArgs) String() string

func (*StoreBuyAlbumArgs) Write

func (p *StoreBuyAlbumArgs) Write(ctx context.Context, oprot thrift.TProtocol) error

type StoreBuyAlbumResult

type StoreBuyAlbumResult struct {
	Success *Album           `thrift:"success,0" db:"success" json:"success,omitempty"`
	Error   *PurchasingError `thrift:"error,1" db:"error" json:"error,omitempty"`
}

func NewStoreBuyAlbumResult

func NewStoreBuyAlbumResult() *StoreBuyAlbumResult

func (*StoreBuyAlbumResult) GetError

func (p *StoreBuyAlbumResult) GetError() *PurchasingError

func (*StoreBuyAlbumResult) GetSuccess

func (p *StoreBuyAlbumResult) GetSuccess() *Album

func (*StoreBuyAlbumResult) IsSetError

func (p *StoreBuyAlbumResult) IsSetError() bool

func (*StoreBuyAlbumResult) IsSetSuccess

func (p *StoreBuyAlbumResult) IsSetSuccess() bool

func (*StoreBuyAlbumResult) Read

func (*StoreBuyAlbumResult) ReadField0

func (p *StoreBuyAlbumResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error

func (*StoreBuyAlbumResult) ReadField1

func (p *StoreBuyAlbumResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error

func (*StoreBuyAlbumResult) String

func (p *StoreBuyAlbumResult) String() string

func (*StoreBuyAlbumResult) Write

type StoreEnterAlbumGiveawayArgs

type StoreEnterAlbumGiveawayArgs struct {
	Email string `thrift:"email,1" db:"email" json:"email"`
	Name  string `thrift:"name,2" db:"name" json:"name"`
}

func NewStoreEnterAlbumGiveawayArgs

func NewStoreEnterAlbumGiveawayArgs() *StoreEnterAlbumGiveawayArgs

func (*StoreEnterAlbumGiveawayArgs) GetEmail

func (p *StoreEnterAlbumGiveawayArgs) GetEmail() string

func (*StoreEnterAlbumGiveawayArgs) GetName

func (p *StoreEnterAlbumGiveawayArgs) GetName() string

func (*StoreEnterAlbumGiveawayArgs) Read

func (*StoreEnterAlbumGiveawayArgs) ReadField1

func (*StoreEnterAlbumGiveawayArgs) ReadField2

func (*StoreEnterAlbumGiveawayArgs) String

func (p *StoreEnterAlbumGiveawayArgs) String() string

func (*StoreEnterAlbumGiveawayArgs) Write

type StoreEnterAlbumGiveawayResult

type StoreEnterAlbumGiveawayResult struct {
	Success *bool `thrift:"success,0" db:"success" json:"success,omitempty"`
}

func NewStoreEnterAlbumGiveawayResult

func NewStoreEnterAlbumGiveawayResult() *StoreEnterAlbumGiveawayResult

func (*StoreEnterAlbumGiveawayResult) GetSuccess

func (p *StoreEnterAlbumGiveawayResult) GetSuccess() bool

func (*StoreEnterAlbumGiveawayResult) IsSetSuccess

func (p *StoreEnterAlbumGiveawayResult) IsSetSuccess() bool

func (*StoreEnterAlbumGiveawayResult) Read

func (*StoreEnterAlbumGiveawayResult) ReadField0

func (*StoreEnterAlbumGiveawayResult) String

func (*StoreEnterAlbumGiveawayResult) Write

type Track

type Track struct {
	Title     string        `thrift:"title,1" db:"title" json:"title"`
	Artist    string        `thrift:"artist,2" db:"artist" json:"artist"`
	Publisher string        `thrift:"publisher,3" db:"publisher" json:"publisher"`
	Composer  string        `thrift:"composer,4" db:"composer" json:"composer"`
	Duration  Minutes       `thrift:"duration,5" db:"duration" json:"duration"`
	Pro       PerfRightsOrg `thrift:"pro,6" db:"pro" json:"pro"`
}

Comments (with an @ symbol) will be added to generated code.

func NewTrack

func NewTrack() *Track

func (*Track) GetArtist

func (p *Track) GetArtist() string

func (*Track) GetComposer

func (p *Track) GetComposer() string

func (*Track) GetDuration

func (p *Track) GetDuration() Minutes

func (*Track) GetPro

func (p *Track) GetPro() PerfRightsOrg

func (*Track) GetPublisher

func (p *Track) GetPublisher() string

func (*Track) GetTitle

func (p *Track) GetTitle() string

func (*Track) Read

func (p *Track) Read(ctx context.Context, iprot thrift.TProtocol) error

func (*Track) ReadField1

func (p *Track) ReadField1(ctx context.Context, iprot thrift.TProtocol) error

func (*Track) ReadField2

func (p *Track) ReadField2(ctx context.Context, iprot thrift.TProtocol) error

func (*Track) ReadField3

func (p *Track) ReadField3(ctx context.Context, iprot thrift.TProtocol) error

func (*Track) ReadField4

func (p *Track) ReadField4(ctx context.Context, iprot thrift.TProtocol) error

func (*Track) ReadField5

func (p *Track) ReadField5(ctx context.Context, iprot thrift.TProtocol) error

func (*Track) ReadField6

func (p *Track) ReadField6(ctx context.Context, iprot thrift.TProtocol) error

func (*Track) String

func (p *Track) String() string

func (*Track) Write

func (p *Track) Write(ctx context.Context, oprot thrift.TProtocol) error

Jump to

Keyboard shortcuts

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