Help us shape the future of Go! Take the 2026 Go Developer Survey

example

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DB_NAME           = "test"
	SHORT_DATE_LAYOUT = "2000-Jan-01"
	USERS_C           = "users"
	ORGANIZATIONS_C   = "organizations"
)

Variables

Functions

This section is empty.

Types

type Organization

type Organization struct {
	Id          bson.ObjectId `bson:"_id,omitempty"`
	Name        string        `bson:"name"`
	Location    string        `bson:"location"`
	DateFounded time.Time     `bson:"date_founded"`
}

type Organization_v2

type Organization_v2 struct {
	Id           bson.ObjectId `bson:"_id,omitempty"`
	Name         string        `bson:"name"`
	Headquarters string        `bson:"headquarters"`
	DateFounded  time.Time     `bson:"date_founded"`
}

type SampleMongoDbGoMethodsMigrator

type SampleMongoDbGoMethodsMigrator struct {
}

func (*SampleMongoDbGoMethodsMigrator) V001_init_organizations_down

func (r *SampleMongoDbGoMethodsMigrator) V001_init_organizations_down() error

func (*SampleMongoDbGoMethodsMigrator) V001_init_organizations_up

func (r *SampleMongoDbGoMethodsMigrator) V001_init_organizations_up() error

func (*SampleMongoDbGoMethodsMigrator) V001_init_users_down

func (r *SampleMongoDbGoMethodsMigrator) V001_init_users_down() error

func (*SampleMongoDbGoMethodsMigrator) V001_init_users_up

func (r *SampleMongoDbGoMethodsMigrator) V001_init_users_up() error

func (*SampleMongoDbGoMethodsMigrator) V001_method_with_wrong_signature_down

func (r *SampleMongoDbGoMethodsMigrator) V001_method_with_wrong_signature_down() (bool, error)

func (*SampleMongoDbGoMethodsMigrator) V001_method_with_wrong_signature_up

func (r *SampleMongoDbGoMethodsMigrator) V001_method_with_wrong_signature_up(s string) error

func (*SampleMongoDbGoMethodsMigrator) V001_method_with_wrong_signature_up2

func (r *SampleMongoDbGoMethodsMigrator) V001_method_with_wrong_signature_up2(s *mgo.Session) error

func (*SampleMongoDbGoMethodsMigrator) V002_change_user_cleo_to_cleopatra_down

func (r *SampleMongoDbGoMethodsMigrator) V002_change_user_cleo_to_cleopatra_down() error

func (*SampleMongoDbGoMethodsMigrator) V002_change_user_cleo_to_cleopatra_up

func (r *SampleMongoDbGoMethodsMigrator) V002_change_user_cleo_to_cleopatra_up() error

func (*SampleMongoDbGoMethodsMigrator) V002_organizations_rename_location_field_to_headquarters_down

func (r *SampleMongoDbGoMethodsMigrator) V002_organizations_rename_location_field_to_headquarters_down() error

func (*SampleMongoDbGoMethodsMigrator) V002_organizations_rename_location_field_to_headquarters_up

func (r *SampleMongoDbGoMethodsMigrator) V002_organizations_rename_location_field_to_headquarters_up() error

type User

type User struct {
	Id   bson.ObjectId `bson:"_id"`
	Name string        `bson:"name"`
}

Jump to

Keyboard shortcuts

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