Documentation ¶
Index ¶
- Variables
- func Exec(inputReader io.Reader, tx *pop.Connection, wait time.Duration, ...) error
- func ReadInSQLLine(line string, dropComments bool, dropSearchPath bool) string
- func SplitStatements(lines chan string, statements chan string, wait time.Duration, ...)
- type Buffer
- func (b *Buffer) Close()
- func (b *Buffer) Closed() bool
- func (b *Buffer) Index(i int) (byte, error)
- func (b *Buffer) Len() int
- func (b *Buffer) Range(start int, end int) (string, error)
- func (b *Buffer) String() string
- func (b *Buffer) WriteByte(x byte) error
- func (b *Buffer) WriteRune(x rune) (int, error)
- func (b *Buffer) WriteString(x string) (int, error)
- type Builder
- type ErrInvalidDirection
- type ErrInvalidFormat
- type ErrInvalidPath
- type FileHelper
- type S3GetObjectAPI
- type S3ListObjectsV2API
- type Stack
Constants ¶
This section is empty.
Variables ¶
var ( // ErrWait is an error when waiting for input ErrWait = errors.New("wait for input") // ErrClosed is an error when buffer is closed for writing ErrClosed = errors.New("buffer is closed for writing") )
Functions ¶
func ReadInSQLLine ¶
ReadInSQLLine reads the SQL line from a string and returns the line as modified by the configuration If dropComments is true, then drops all line comments. If dropSearchPath is true, then drops all search paths.
Types ¶
type Buffer ¶
Buffer is a wrapper around strings.Builder for concurrent loading and reading.
type Builder ¶
type Builder struct { *pop.Match Path string }
Builder is a builder for pop migrations.
type ErrInvalidDirection ¶
type ErrInvalidDirection struct {
Value string
}
ErrInvalidDirection is an error for an invalid direction
func (*ErrInvalidDirection) Error ¶
func (e *ErrInvalidDirection) Error() string
type ErrInvalidFormat ¶
type ErrInvalidFormat struct {
Value string
}
ErrInvalidFormat is an error for an invalid migration format. Only SQL and Fizz are currently supported
func (*ErrInvalidFormat) Error ¶
func (e *ErrInvalidFormat) Error() string
type ErrInvalidPath ¶
type ErrInvalidPath struct {
Value string
}
ErrInvalidPath is an error for an invalid path
func (*ErrInvalidPath) Error ¶
func (e *ErrInvalidPath) Error() string
type FileHelper ¶
type FileHelper struct {
// contains filtered or unexported fields
}
FileHelper is an afero filesystem struct
func NewFileHelper ¶
func NewFileHelper() *FileHelper
NewFileHelper creates and returns a new File Helper
func (*FileHelper) ListFiles ¶
func (fh *FileHelper) ListFiles(p string, s3Client S3ListObjectsV2API) ([]string, error)
ListFiles lists the files in a given directory.
func (*FileHelper) SetFileSystem ¶
func (fh *FileHelper) SetFileSystem(fs afero.Fs)
SetFileSystem sets the file system for the file helper
type S3GetObjectAPI ¶
type S3GetObjectAPI interface {
GetObject(ctx context.Context, params *s3.GetObjectInput, optFns ...func(*s3.Options)) (*s3.GetObjectOutput, error)
}
type S3ListObjectsV2API ¶
type S3ListObjectsV2API interface {
ListObjectsV2(ctx context.Context, params *s3.ListObjectsV2Input, optFns ...func(*s3.Options)) (*s3.ListObjectsV2Output, error)
}
type Stack ¶
type Stack struct {
// contains filtered or unexported fields
}
Stack represents a collection of SQL queries
func NewStack ¶
func NewStack() Stack
NewStack creates a new Stack with an empty slice of strings for queries