data

package
v0.0.0-...-ff8bee0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DATABASE   = "conferences"
	COLLECTION = "conferences"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ConferenceStorageModel

type ConferenceStorageModel struct {
	UniqueName  string `bson:"uniqueName"`
	DisplayName string `bson:"displayName"`
	Description string `bson:"description"`
}

type DatabaseClient

type DatabaseClient interface {
	GetConference(uniqueName string) (*ConferenceStorageModel, error)
	GetConferences() ([]*ConferenceStorageModel, error)
	UpdateConference(conference *ConferenceStorageModel) error
	CreateConference(conference *ConferenceStorageModel) error
}

type MongoClient

type MongoClient struct {
	// contains filtered or unexported fields
}

func New

func New(mongoServerUrl string) (*MongoClient, error)

func (*MongoClient) CreateConference

func (client *MongoClient) CreateConference(conference *ConferenceStorageModel) error

func (*MongoClient) GetConference

func (client *MongoClient) GetConference(uniqueName string) (*ConferenceStorageModel, error)

func (*MongoClient) GetConferences

func (client *MongoClient) GetConferences() ([]*ConferenceStorageModel, error)

func (*MongoClient) UpdateConference

func (client *MongoClient) UpdateConference(conference *ConferenceStorageModel) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL