package
0.0.0-20200414042318-c0a088cbdcd1
Repository: https://github.com/yiping-allison/isabelle.git
Documentation: pkg.go.dev

# Functions

NewEntryService creates a new service to data entry database.
NewEventService creates a new Event service.
NewRepService creates the rep service object.
NewServices initializes the configuration for every service.
NewTradeService initializes a new Trade Service.
NewUserService initializes a new user service.
WithEntries will initialize entry database.
WithEvents will initialize an events server 'database'.
WithGorm opens a database connection using the Gorm package and sets the database.
WithLogMode makes sure that every database interaction in logged whether for debugging or other logging purposes.
WithRep will initialize the Rep service.
WithTrades will start a new Trades Service.
WithUsers will initialize the Users service.

# Constants

ErrDiscordIDRequired is an internal error raised when no discord ID was given (primary key).
ErrNotFound is returned when a record isn't found in the Entry database.
MaxEvent limits the amount of events a user can create.
MaxQueue limits the amount of queues a user can join.
MaxTrade limits the amount of trades a user can create.

# Structs

Entry
Entry represents a database entry of either an insect or fish in the postgres database.
EventData represents an event a user has created.
Offers defines offer tracking to a trade.
QueueUser represents a user queuing to an event.
Rep defines the postgres SQL table model using GORM.
Services handles services for bot.
TradeData represents all data needed to keep track of a trade event.
TradeOfferer defines someone offering a response to a trade.
Trades defines a trade event.
UserData represents user data bot needs to keep track of in order to perform event and queue services.

# Interfaces

EntryDB is used to interact with data entry database If the entry is found, we will return the entry and nil error If the entry is not found, we will return ErrNotFound Lastly, we will return any other errors not generated by this package.
EntryService handles interactions with the bug and fish (Entry) database.
Event represents all methods we can use to interact with Event type data.
EventService is a layer of abstraction leading to the Event interface.
RepDB contains all methods we can use to interact with rep database.
RepService wraps to RepDB.
Trade contains all the methods we can use to interact with trade data.
TradeService wraps to the Trade interface.
User defines all the methods we can use to interact with the User Service.
UserService wraps to the User interface.

# Type aliases

ServicesConfig represents functions that are meant to be running configurations for services.