Documentation ¶
Index ¶
Constants ¶
View Source
const ( ErrBookingNotFound = Error("Booking not found") ErrBookingExists = Error("Booking already exists, cannot create same booking twice") ErrBookingIDRequired = Error("No ID was received in booking_service, something must have gone during ID creation") ErrBookingUnmarshal = Error("An unexpected error occured when booking was read in database, please try again or contact system administrator") ErrBookingNoChange = Error("No change was done") )
Booking errors
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Booking ¶
type Booking struct { CreateTime time.Time ModTime time.Time ID BookingID BookingDate string RespContCustomer string RespContSeller string ProjectCode string }
Booking - Defines how a booking looks like, used to seralize data to be passed to arangodb
type BookingID ¶
type BookingID string
BookingID - We create own type for domain usage. This way we can call BookingID type in structs and services etc.
type BookingService ¶
type BookingService interface { //Booking is used to fetch a certain booking from db GetBooking(id BookingID) (*Booking, error) //CreateBooking is used when we need to create a new booking CreateBooking(booking *Booking) error //DeleteBooking takes an booking id and removes it from db. DeleteBooking(id BookingID) (*Booking, error) //TODO: complete update booking //UpdateBooking updates a booking UpdateBooking(booking *Booking) error }
BookingService - Handles everything with booking
type Client ¶
type Client interface {
BookingService() BookingService
}
Client will be used to create a connection to services. We only got booking service for now.
Click to show internal directories.
Click to hide internal directories.