Documentation ¶
Index ¶
- type AttendanceStore
- func (s *AttendanceStore) Create(attendance any) error
- func (s *AttendanceStore) Delete(id string) error
- func (s *AttendanceStore) Get(id string) (*mongo.Cursor, error)
- func (s *AttendanceStore) GetCount(memberId string) (int, error)
- func (s *AttendanceStore) List(filter interface{}, limit int, page int) (*mongo.Cursor, error)
- func (s *AttendanceStore) Upsert(id string, attendance any) error
- type Client
- func (c *Client) Connected() bool
- func (c *Client) Disconnect()
- func (c *Client) GetAttendanceStore() (*AttendanceStore, bool)
- func (c *Client) GetCollection(collection Collection) (interface{}, bool)
- func (c *Client) GetConfigsStore() (*ConfigsStore, bool)
- func (c *Client) GetMembersStore() (*MembersStore, bool)
- type Collection
- type ConfigsStore
- type MembersStore
- func (s *MembersStore) Delete(id string) error
- func (s *MembersStore) Get(id string) (*mongo.Cursor, error)
- func (s *MembersStore) GetRandom(max int, maxRank int) ([]map[string]interface{}, error)
- func (s *MembersStore) List(filter interface{}, opts ...*options.FindOptions) (*mongo.Cursor, error)
- func (s *MembersStore) Upsert(id string, member any) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttendanceStore ¶
type AttendanceStore struct {
// contains filtered or unexported fields
}
func (*AttendanceStore) Create ¶
func (s *AttendanceStore) Create(attendance any) error
func (*AttendanceStore) Delete ¶
func (s *AttendanceStore) Delete(id string) error
func (*AttendanceStore) List ¶
List retrieves a list of attendance records from the database, optionally filtered by the provided filter and limited to the specified number of records.
Parameters: - filter: An interface{} representing the filter to apply to the query. - limit: An int64 representing the maximum number of records to retrieve. If limit is 0, all records will be retrieved.
Returns: - *mongo.Cursor: A cursor to iterate over the retrieved attendance records. - error: An error if the query operation fails.
type Client ¶
func (*Client) Disconnect ¶
func (c *Client) Disconnect()
func (*Client) GetAttendanceStore ¶
func (c *Client) GetAttendanceStore() (*AttendanceStore, bool)
func (*Client) GetCollection ¶
func (c *Client) GetCollection(collection Collection) (interface{}, bool)
func (*Client) GetConfigsStore ¶
func (c *Client) GetConfigsStore() (*ConfigsStore, bool)
func (*Client) GetMembersStore ¶
func (c *Client) GetMembersStore() (*MembersStore, bool)
type Collection ¶
type Collection string
const ( MEMBERS Collection = "members" CONFIGS Collection = "configs" ATTENDANCE Collection = "attendance" )
type ConfigsStore ¶
type ConfigsStore struct {
// contains filtered or unexported fields
}
func (*ConfigsStore) Create ¶
func (s *ConfigsStore) Create(config any) error
func (*ConfigsStore) Get ¶
func (s *ConfigsStore) Get(name string) *mongo.SingleResult
type MembersStore ¶
type MembersStore struct {
// contains filtered or unexported fields
}
func (*MembersStore) Delete ¶
func (s *MembersStore) Delete(id string) error
func (*MembersStore) GetRandom ¶
func (s *MembersStore) GetRandom(max int, maxRank int) ([]map[string]interface{}, error)
func (*MembersStore) List ¶
func (s *MembersStore) List(filter interface{}, opts ...*options.FindOptions) (*mongo.Cursor, error)
Click to show internal directories.
Click to hide internal directories.