Documentation
¶
Index ¶
- Constants
- func DeleteJob(ctx context.Context, params *DeleteJobParams) error
- func VerifyToken(ctx context.Context, token string) (auth.UID, error)
- type AddPaperParams
- type AddPaperResponse
- type AssetType
- type ClaimPayment
- type Conference
- type ConferenceSlot
- type ContactRole
- type CreateDiscountVoucherParams
- type CreateDiscountVoucherResponse
- type CreateJobParams
- type CreateJobResponse
- type DeleteJobParams
- type ErrInvalidCurrency
- type Event
- type FinancialInstrument
- type GetAllParams
- type GetAllResponse
- type GetConferenceSlotsParams
- type GetConferenceSlotsResponse
- type GetConferenceSponsorsParams
- type GetConferenceSponsorsResponse
- type GetCurrentByEventParams
- type GetCurrentByEventResponse
- type GetJobParams
- type GetJobResponse
- type GetPaperParams
- type GetPaperResponse
- type Job
- type ListApprovedJobsParams
- type ListApprovedJobsResponse
- type ListJobsParams
- type ListJobsResponse
- type ListPapersParams
- type ListPapersResponse
- type Location
- type Paper
- type PaymentMethodConferenceDiscount
- type PaymentMethodCreditNote
- type PaymentMethodMoney
- type SlotClaim
- type Sponsor
- type SponsorContactInformation
- type SponsorshipLevel
- type UpdateApproveJobParams
- type UpdateApproveJobResponse
- type UpdateJobParams
- type UpdateJobResponse
- type UpdatePaperParams
- type UpdatePaperResponse
- type UpdateSponsorContactParams
- type UpdateSponsorContactResponse
- type User
- type Venue
- type VoucherInformation
Constants ¶
const ( SponsorshipLevelNone = iota SponsorshipLevelDiamond SponsorshipLevelPlatinum SponsorshipLevelGold SponsorshipLevelSilver SponsorshipLevelBronze SponsorshipLevelOther )
These are the valid sponsorship levels Not all of these may be used each year, for example 2020 had no Diamonds
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AddPaperParams ¶
type AddPaperParams struct {
Paper *Paper
}
AddPaperParams defines the inputs used by the AddPaper API method
type AddPaperResponse ¶
type AddPaperResponse struct {
PaperID uint32
}
AddPaperResponse defines the output returned by the AddPaper API method
func AddPaper ¶
func AddPaper(ctx context.Context, params *AddPaperParams) (*AddPaperResponse, error)
AddPaper inserts a paper into the paper_submissions table encore:api public
type AssetType ¶
type AssetType string
AssetType is a type of accounting asset.
const ( // ATCash in this context means it is money, like a stripe payment ATCash AssetType = "cash" // ATReceivable in this context means it is a promise of payment ATReceivable AssetType = "receivable" // ATDiscount in this context means an issued discount (represented as a fixed amount for // accounting's sake) ATDiscount AssetType = "discount" )
type ClaimPayment ¶
type ClaimPayment struct { ID uint64 // ClaimsPaid would be what in a bill one see as detail. ClaimsPaid []*SlotClaim Payment []FinancialInstrument Invoice string // let us fill this once we know how to invoice }
ClaimPayment represents a payment for N claims
func (*ClaimPayment) Fulfilled ¶
func (c *ClaimPayment) Fulfilled() bool
Fulfilled returns true if the payment of this invoice has been covered with either money or credit
func (*ClaimPayment) Paid ¶
func (c *ClaimPayment) Paid() bool
Paid returns true if the payment of this invoice has been fully paid.
func (*ClaimPayment) TotalDue ¶
func (c *ClaimPayment) TotalDue() int64
TotalDue returns the total cost to cover by this payment.
type Conference ¶
type Conference struct { ID uint32 Name string Slug string StartDate time.Time EndDate time.Time Venue Venue }
Conference is an instance like GopherCon 2020
type ConferenceSlot ¶
type ConferenceSlot struct { ID uint32 Name string Description string Cost int Capacity int // int should be enough even if we organize glastonbury StartDate time.Time EndDate time.Time // DependsOn means that these two Slots need to be acquired together, user must either buy // both Slots or pre-own one of the one it depends on. DependsOn uint32 // PurchaseableFrom indicates when this item is on sale, for instance early bird tickets are the first // ones to go on sale. PurchaseableFrom time.Time // PuchaseableUntil indicates when this item stops being on sale, for instance early bird tickets can // no loger be purchased N months before event. PurchaseableUntil time.Time // AvailableToPublic indicates is this is something that will appear on the tickets purchase page (ie, we can // issue sponsor tickets and those cannot be bought individually) AvailableToPublic bool Location Location ConferenceID uint32 }
ConferenceSlot holds information for any sellable/giftable slot we have in the event for a Talk or any other activity that requires admission. store: "interface"
type ContactRole ¶
type ContactRole int
ContactRole defines the type that encapsulates the different contact roles
const ( ContactRoleMarketing ContactRole = iota ContactRoleLogistics ContactRoleTechnical ContactRoleOther ContactRoleSoleContact )
These are the valid contact roles
func (ContactRole) String ¶
func (c ContactRole) String() string
type CreateDiscountVoucherParams ¶
type CreateDiscountVoucherParams struct {
VoucherInformation *VoucherInformation
}
CreateDiscountVoucherParams defines payload accepted by the CreateDiscountVoucher endpoint.
type CreateDiscountVoucherResponse ¶
type CreateDiscountVoucherResponse struct {
VoucherID string
}
CreateDiscountVoucherResponse defines response by the CreateDiscountVoucher endpoint.
func CreateDiscountVoucher ¶
func CreateDiscountVoucher(ctx context.Context, params *CreateDiscountVoucherParams) (*CreateDiscountVoucherResponse, error)
CreateDiscountVoucher allows creation of a discount voucher for a given conference.
type CreateJobParams ¶
type CreateJobParams struct {
Job *Job
}
CreateJobParams defines the inputs used by the CreateJob API method
type CreateJobResponse ¶
type CreateJobResponse struct {
Job *Job
}
CreateJobResponse defines the output returned by the CreateJob API method
func CreateJob ¶
func CreateJob(ctx context.Context, params *CreateJobParams) (*CreateJobResponse, error)
CreateJob inserts a job into the job_board table encore:api public
type DeleteJobParams ¶
type DeleteJobParams struct {
JobID uint32
}
DeleteJobParams defines the input used by the DeleteJob API method
type ErrInvalidCurrency ¶
type ErrInvalidCurrency struct {
// contains filtered or unexported fields
}
ErrInvalidCurrency should be returned when paying with the wrong kind of instrument for instance covering credit with credit.
func (*ErrInvalidCurrency) Error ¶
func (e *ErrInvalidCurrency) Error() string
type Event ¶
type Event struct { ID uint32 Name string Slug string Conferences []Conference }
Event is a brand like GopherCon
type FinancialInstrument ¶
type FinancialInstrument interface { // Total is the total amount fulfilled by this instrument Total() int64 // Type is the type of asset represented Type() AssetType }
FinancialInstrument represents any kind of instrument used to cover a debt.
type GetAllParams ¶
type GetAllParams struct { }
GetAllParams defines the inputs used by the GetAll API method
type GetAllResponse ¶
type GetAllResponse struct {
Events []Event
}
GetAllResponse defines the output returned by the GetAll API method
func GetAll ¶
func GetAll(ctx context.Context, params *GetAllParams) (*GetAllResponse, error)
GetAll retrieves all conferences and events encore:api public
type GetConferenceSlotsParams ¶
type GetConferenceSlotsParams struct {
ConferenceID int
}
GetConferenceSlotsParams defines the inputs used by the GetConferenceSlots API method
type GetConferenceSlotsResponse ¶
type GetConferenceSlotsResponse struct {
ConferenceSlots []ConferenceSlot
}
GetConferenceSlotsResponse defines the output returned by the GetConferenceSlots API method
func GetConferenceSlots ¶
func GetConferenceSlots(ctx context.Context, params *GetConferenceSlotsParams) (*GetConferenceSlotsResponse, error)
GetConferenceSlots retrieves all event slots for a specific event id encore:api public
type GetConferenceSponsorsParams ¶
type GetConferenceSponsorsParams struct {
ConferenceID uint32
}
GetConferenceSponsorsParams defines the inputs used by the GetConferenceSponsors API method
type GetConferenceSponsorsResponse ¶
type GetConferenceSponsorsResponse struct {
Sponsors []Sponsor
}
GetConferenceSponsorsResponse defines the output returned by the GetConferenceSponsors API method
func GetConferenceSponsors ¶
func GetConferenceSponsors(ctx context.Context, params *GetConferenceSponsorsParams) (*GetConferenceSponsorsResponse, error)
GetConferenceSponsors retrieves the sponsors for a specific conference encore:api public
type GetCurrentByEventParams ¶
type GetCurrentByEventParams struct {
EventID uint32
}
GetCurrentByEventParams defines the inputs used by the GetCurrentByEvent API method
type GetCurrentByEventResponse ¶
type GetCurrentByEventResponse struct {
Event Event
}
GetCurrentByEventResponse defines the output returned by the GetCurrentByEvent API method
func GetCurrentByEvent ¶
func GetCurrentByEvent(ctx context.Context, params *GetCurrentByEventParams) (*GetCurrentByEventResponse, error)
GetCurrentByEvent retrieves the current conference and event information for a specific event encore:api public
type GetJobParams ¶
type GetJobParams struct {
JobID uint32
}
GetJobParams defines the inputs used by the GetJob API method
type GetJobResponse ¶
type GetJobResponse struct {
Job *Job
}
GetJobResponse defines the output returned by the GetJob API method
func GetJob ¶
func GetJob(ctx context.Context, params *GetJobParams) (*GetJobResponse, error)
GetJob retrieves a job posting by JobID encore:api public
type GetPaperParams ¶
type GetPaperParams struct {
PaperID uint32
}
GetPaperParams defines the inputs used by the GetPaper API method
type GetPaperResponse ¶
type GetPaperResponse struct {
Paper Paper
}
GetPaperResponse defines the output returned by the GetPaper API method
func GetPaper ¶
func GetPaper(ctx context.Context, params *GetPaperParams) (*GetPaperResponse, error)
GetPaper retrieves information for a specific paper id encore:api public
type Job ¶
type Job struct { ID uint32 CompanyName string Title string Description string Link string Discord string Rank int Approved bool }
Job represents the necessary information for a Job
type ListApprovedJobsParams ¶
type ListApprovedJobsParams struct { }
ListApprovedJobsParams defines the inputs used by the ListJobs API method
type ListApprovedJobsResponse ¶
type ListApprovedJobsResponse struct {
Jobs []Job
}
ListApprovedJobsResponse defines the output returned by the ListApprovedJobs API method
func ListApprovedJobs ¶
func ListApprovedJobs(ctx context.Context) (*ListApprovedJobsResponse, error)
ListApprovedJobs retrieves all jobs (approved or not) from the job_board table encore:api public
type ListJobsParams ¶
type ListJobsParams struct { }
ListJobsParams defines the inputs used by the ListJobs API method
type ListJobsResponse ¶
type ListJobsResponse struct {
Jobs []Job
}
ListJobsResponse defines the output returned by the ListJobs API method
type ListPapersParams ¶
type ListPapersParams struct {
ConferenceID uint32
}
ListPapersParams defines the inputs used by the ListPapers API method
type ListPapersResponse ¶
type ListPapersResponse struct {
Papers []Paper
}
ListPapersResponse defines the output returned by the ListPapers API method
func ListPapers ¶
func ListPapers(ctx context.Context, params *ListPapersParams) (*ListPapersResponse, error)
ListPapers retrieves all the papers submitted for a specific conference encore:api public
type Location ¶
type Location struct { ID uint32 Name string Description string Address string Directions string GoogleMapsURL string Capacity int VenueID uint32 }
Location defines a location for a venue, such as a room or event space
type Paper ¶
type Paper struct { ID uint32 UserID uint32 ConferenceID uint32 Title string ElevatorPitch string Description string Notes string }
Paper holds information about a paper submitted to a conference
type PaymentMethodConferenceDiscount ¶
type PaymentMethodConferenceDiscount struct { ID uint64 // Detail describes what kind of discount was issued (ie 100% sponsor, 30% grant) Detail string AmountCents int64 // Money is handled in cents as it is done by our payment processor (stripe) }
PaymentMethodConferenceDiscount represents a discount issued by the event.
func (*PaymentMethodConferenceDiscount) Total ¶
func (p *PaymentMethodConferenceDiscount) Total() int64
Total implements FinancialInstrument
func (*PaymentMethodConferenceDiscount) Type ¶
func (p *PaymentMethodConferenceDiscount) Type() AssetType
Type implements FinancialInstrument
type PaymentMethodCreditNote ¶
type PaymentMethodCreditNote struct { ID uint64 Detail string AmountCents int64 // Money is handled in cents as it is done by our payment processor (stripe) }
PaymentMethodCreditNote represents credit extended to defer payment.
func (*PaymentMethodCreditNote) Total ¶
func (p *PaymentMethodCreditNote) Total() int64
Total implements FinancialInstrument
func (*PaymentMethodCreditNote) Type ¶
func (p *PaymentMethodCreditNote) Type() AssetType
Type implements FinancialInstrument
type PaymentMethodMoney ¶
type PaymentMethodMoney struct { ID uint64 PaymentRef string // stripe payment ID/Log? AmountCents int64 // Money is handled in cents as it is done by our payment processor (stripe) }
PaymentMethodMoney represents a payment in cash.
func (*PaymentMethodMoney) Total ¶
func (p *PaymentMethodMoney) Total() int64
Total implements FinancialInstrument
func (*PaymentMethodMoney) Type ¶
func (p *PaymentMethodMoney) Type() AssetType
Type implements FinancialInstrument
type SlotClaim ¶
type SlotClaim struct { ID int64 ConferenceSlot *ConferenceSlot // TicketID should only be valid when combined with the correct Attendee ID/Email TicketID uuid.UUID // Redeemed represents whether this has been used (ie the Attendee enrolled in front desk // or into the online conf system) until this is not true, transfer/refund might be possible. Redeemed bool }
SlotClaim represents one occupancy of one slot.
type Sponsor ¶
type Sponsor struct { ID uint32 Name string Address string Website string SponsorshipLevel SponsorshipLevel Contacts []SponsorContactInformation ConferenceID uint32 }
Sponsor defines a conference sponsor, such as Google
type SponsorContactInformation ¶
type SponsorContactInformation struct { ID uint32 Name string Role ContactRole Email string Phone string }
SponsorContactInformation defines a contact and their information for a sponsor
type SponsorshipLevel ¶
type SponsorshipLevel int
SponsorshipLevel defines the type that encapsulates the different sponsorship levels
func (*SponsorshipLevel) Scan ¶
func (s *SponsorshipLevel) Scan(src interface{}) error
Scan converts from database to Go value
func (SponsorshipLevel) String ¶
func (s SponsorshipLevel) String() string
type UpdateApproveJobParams ¶
UpdateApproveJobParams defines the inputs used by the UpdateApproveJob API method
type UpdateApproveJobResponse ¶
type UpdateApproveJobResponse struct {
Job *Job
}
UpdateApproveJobResponse defines the output the returned by the ApproveJob API method
func UpdateApproveJob ¶
func UpdateApproveJob(ctx context.Context, params *UpdateApproveJobParams) (*UpdateApproveJobResponse, error)
UpdateApproveJob sets the approval of a job to true or false depending on input encore:api public
type UpdateJobParams ¶
type UpdateJobParams struct {
Job *Job
}
UpdateJobParams defines the input used by the UpdateJob API method
type UpdateJobResponse ¶
type UpdateJobResponse struct {
Job *Job
}
UpdateJobResponse defines the output returned by the UpdateJob API method
func UpdateJob ¶
func UpdateJob(ctx context.Context, params *UpdateJobParams) (*UpdateJobResponse, error)
UpdateJob updates a job entry based on id in the job_board table encore:api public
type UpdatePaperParams ¶
type UpdatePaperParams struct {
Paper *Paper
}
UpdatePaperParams defines the inputs used by the GetPaper API method
type UpdatePaperResponse ¶
type UpdatePaperResponse struct {
Paper Paper
}
UpdatePaperResponse defines the output received by the UpdatePaper API method
func UpdatePaper ¶
func UpdatePaper(ctx context.Context, params *UpdatePaperParams) (*UpdatePaperResponse, error)
UpdatePaper updates a paper submission for a specific paper id encore:api public
type UpdateSponsorContactParams ¶
type UpdateSponsorContactParams struct {
SponsorContactInformation *SponsorContactInformation
}
UpdateSponsorContactParams defines the inputs used by the UpdateSponsorContactParams API method
type UpdateSponsorContactResponse ¶
type UpdateSponsorContactResponse struct { }
UpdateSponsorContactResponse defines the output returned by the UpdateSponsorContactResponse API method
func UpdateSponsorContact ¶
func UpdateSponsorContact(ctx context.Context, params *UpdateSponsorContactParams) (*UpdateSponsorContactResponse, error)
UpdateSponsorContact retrieves all conferences and events encore:api public
type User ¶
type User struct { ID uint32 Email string CoCAccepted bool HashedPassword string GivenName string FamilyName string CreatedAt time.Time Claims []SlotClaim }
User is a person who interacts with the system
Source Files
¶
- addpaper.go
- auth.go
- create_discount_voucher.go
- createjob.go
- deletejob.go
- getall.go
- getconferenceslots.go
- getconfsponsors.go
- getcurrent.go
- getjob.go
- getpaper.go
- listapprovedjobs.go
- listjobs.go
- listpapers.go
- papertypes.go
- ticketing_processing.go
- ticketing_storage.go
- types.go
- updateapprovejob.go
- updatejob.go
- updatepaper.go
- updatesponsorcontact.go