 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- func DoPost(url string, form url.Values) (resp *http.Response, err error)
- func DownloadFile(url string) (buf *bytes.Buffer, err error)
- func GetTables() []interface{}
- func InitDB() (err error)
- func InsertFromStructure(str []*models.NamespaceWithLists, user *user.User) (err error)
- func SetMigrationStatus(m Migrator, u *user.User) (err error)
- type Migrator
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownloadFile ¶ added in v0.16.0
DownloadFile downloads a file and returns its contents
func GetTables ¶
func GetTables() []interface{}
    GetTables returns all structs which are also a table.
func InitDB ¶
func InitDB() (err error)
InitDB sets up the database connection to use in this module
func InsertFromStructure ¶
func InsertFromStructure(str []*models.NamespaceWithLists, user *user.User) (err error)
InsertFromStructure takes a fully nested Vikunja data structure and a user and then creates everything for this user (Namespaces, tasks, etc. Even attachments and relations.)
Types ¶
type Migrator ¶
type Migrator interface {
	// Migrate is the interface used to migrate a user's tasks from another platform to vikunja.
	// The user object is the user who's tasks will be migrated.
	Migrate(user *user.User) error
	// AuthURL returns a url for clients to authenticate against.
	// The use case for this are Oauth flows, where the server token should remain hidden and not
	// known to the frontend.
	AuthURL() string
	// Title holds the name of the migration.
	// This is used to show the name to users and to keep track of users who already migrated.
	Name() string
}
    Migrator is the basic migrator interface which is shared among all migrators
type Status ¶
type Status struct {
	ID           int64     `xorm:"bigint autoincr not null unique pk" json:"id"`
	UserID       int64     `xorm:"bigint not null" json:"-"`
	MigratorName string    `xorm:"varchar(255)" json:"migrator_name"`
	Created      time.Time `xorm:"created not null 'created'" json:"time"`
}
    Status represents this migration status
func GetMigrationStatus ¶
GetMigrationStatus returns the migration status for a migration and a user
       Source Files
      ¶
      Source Files
      ¶
    
   Click to show internal directories. 
   Click to hide internal directories.