source

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 28, 2023 License: MIT Imports: 4 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Extends = []string{"yml", "yaml", "json"}

Functions

This section is empty.

Types

type Option

type Option func(*Options)

func WithBucket

func WithBucket(bucket string) Option

WithBucket set s3 bucket

func WithClient

func WithClient(client *s3.Client) Option

WithClient set s3 client

func WithDatasource added in v0.0.9

func WithDatasource(datasource string) Option

WithDatasource set datasource

func WithDir

func WithDir(dir string) Option

WithDir set dir

func WithFrom

func WithFrom(fs fs.ReadFileFS) Option

WithFrom set embed.FS

func WithMongoDBCollection added in v0.0.8

func WithMongoDBCollection(collection string) Option

WithMongoDBCollection set mongodb collection

func WithMongoDBName added in v0.0.8

func WithMongoDBName(name string) Option

WithMongoDBName set mongodb name

func WithMongoDBURL added in v0.0.8

func WithMongoDBURL(url string) Option

WithMongoDBURL set mongodb url

func WithName added in v0.0.8

func WithName(file string) Option

WithName set config name

func WithProjectName

func WithProjectName(projectName string) Option

WithProjectName set projectName

func WithProvider

func WithProvider(provider Provider) Option

WithProvider set provider

func WithRegion

func WithRegion(region string) Option

WithRegion set s3 region

func WithTimeout

func WithTimeout(timeout time.Duration) Option

WithTimeout set s3 client timeout

type Options

type Options struct {
	Provider          Provider
	Name              string
	Extend            string
	Dir               string
	Region            string
	Bucket            string
	ProjectName       string
	Timeout           time.Duration
	Client            *s3.Client
	FS                fs.ReadFileFS
	MongoDBURL        string
	MongoDBName       string
	MongoDBCollection string
	Datasource        string
}

func DefaultOptions added in v0.0.8

func DefaultOptions() *Options

DefaultOptions default options

type Provider

type Provider string
const (
	FS    Provider = "fs"
	Local Provider = "local"
	S3    Provider = "s3"
	MGDB  Provider = "mgdb"
	GORM  Provider = "gorm"
)

type Sourcer added in v0.0.8

type Sourcer interface {
	fs.ReadFileFS
	GetExtend() string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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