Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidEventTypeOf = errors.New("not a valid EventTypeOf")
Functions ¶
Types ¶
type Event ¶
type Event struct { gorm.Model Title string `json:"title"` Banner string `json:"banner"` Description string `json:"description"` Href string `json:"href"` TypeOf pq.StringArray `json:"type_of" gorm:"type:text[]"` BeginDate time.Time `json:"begin"` EndDate time.Time `json:"end"` UserID uint `json:"user_id"` Attendees []attendee.Attendee `json:"attendees"` Tags []tag.Tag `json:"tags" gorm:"many2many:events_tags"` Venues []venue.Venue `json:"venues" gorm:"many2many:events_venues"` Cfp cfp.Cfp `json:"cfp"` User user.User `json:"user"` }
type EventAPI ¶
type EventAPI struct {
// contains filtered or unexported fields
}
func NewEventAPI ¶
type EventService ¶
type EventService struct {
// contains filtered or unexported fields
}
type EventTypeOf ¶
type EventTypeOf int
ENUM(online, in_person)
const ( // EventTypeOfOnline is a EventTypeOf of type Online. EventTypeOfOnline EventTypeOf = iota // EventTypeOfInPerson is a EventTypeOf of type In_person. EventTypeOfInPerson )
func ParseEventTypeOf ¶
func ParseEventTypeOf(name string) (EventTypeOf, error)
ParseEventTypeOf attempts to convert a string to a EventTypeOf.
func (EventTypeOf) IsValid ¶
func (x EventTypeOf) IsValid() bool
IsValid provides a quick way to determine if the typed value is part of the allowed enumerated values
func (EventTypeOf) MarshalText ¶
func (x EventTypeOf) MarshalText() ([]byte, error)
MarshalText implements the text marshaller method.
func (*EventTypeOf) Scan ¶
func (x *EventTypeOf) Scan(value interface{}) (err error)
Scan implements the Scanner interface.
func (EventTypeOf) String ¶
func (x EventTypeOf) String() string
String implements the Stringer interface.
func (*EventTypeOf) UnmarshalText ¶
func (x *EventTypeOf) UnmarshalText(text []byte) error
UnmarshalText implements the text unmarshaller method.
type QueryParams ¶
type Service ¶
type Service interface { Get(ctx context.Context, name, city string, tags []string, typeOf []EventTypeOf, available bool, page, limit int) (events []Event, err error) Create(ctx context.Context, user user.User, event EventDTO, tags []string) (result Event, err error) }
func NewEventService ¶
Click to show internal directories.
Click to hide internal directories.