bfs

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BFS

type BFS struct {
	// contains filtered or unexported fields
}

BFS bfs instance

func New

func New(c *Config) *BFS

New new a bfs client.

func (*BFS) GenWatermark

func (b *BFS) GenWatermark(ctx context.Context, uploadKey, wmKey, wmText string, vertical bool, distance int) (location string, err error)

GenWatermark create watermark image by key and text.

func (*BFS) Upload

func (b *BFS) Upload(ctx context.Context, req *Request) (location string, err error)

Upload bfs internal upload.

type Config

type Config struct {
	Host       string
	HTTPClient *xhttp.ClientConfig
}

Config bfs upload config

type Request

type Request struct {
	Bucket      string
	Dir         string
	ContentType string
	Filename    string
	File        []byte
	WMKey       string
	WMText      string
	WMPaddingX  uint32
	WMPaddingY  uint32
	WMScale     float64
}

Request bfs upload request

Jump to

Keyboard shortcuts

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