migration

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package migration provides common tools for the data migrations.

Index

Constants

This section is empty.

Variables

View Source
var (
	OutputPath     string
	OrganizationID string
	Timeout        time.Duration
	MultiLine      bool
)

Functions

func CreateV1Migration

func CreateV1Migration(users []User) *admin.ImportDataRequest

func ReadJSONFile

func ReadJSONFile[T any](name string) (out T, err error)

func ReadJSONLinesFile

func ReadJSONLinesFile[T any](name string) (out []T, err error)

func WriteProtoToFile

func WriteProtoToFile(importData *admin.ImportDataRequest) error

Types

type User

type User struct {
	UserId        string // ignored in V1
	UserName      string
	FirstName     string
	LastName      string
	Email         string
	EmailVerified bool
	PasswordHash  string
}

Jump to

Keyboard shortcuts

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