package types import "git.aiterp.net/rpdata/api/model/channel" // ChannelResolver for the Channel graphql type type ChannelResolver struct{ C channel.Channel } // Name resolves channel.name func (r *ChannelResolver) Name() string { return r.C.Name } // Logged resolves channel.logged func (r *ChannelResolver) Logged() bool { return r.C.Logged } // Hub resolves channel.hub func (r *ChannelResolver) Hub() bool { return r.C.Hub } // EventName resolves channel.eventName func (r *ChannelResolver) EventName() *string { if r.C.Event == "" { return nil } return &r.C.Event } // LocationName resolves channel.locationName func (r *ChannelResolver) LocationName() *string { if r.C.Location == "" { return nil } return &r.C.Location }