client

package
v0.3.11 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package client imsto 客户端实现

Index

Constants

This section is empty.

Variables

View Source
var (
	StageHost string // Host of image uri, like CDN

)

vars

Functions

func Close

func Close() error

Close 关闭所有连接,不是必须

func ContextWithUID added in v0.3.1

func ContextWithUID(ctx context.Context, u int64) context.Context

ContextWithUID returns a new Context that carries value u.

func GetClient

func GetClient() pb.ImageSvcClient

GetClient ...

func MakeURL added in v0.3.0

func MakeURL(path, sizeOp string) string

MakeURL ...

func SetAddr

func SetAddr(addr string)

SetAddr set connection address

func UIDFromContext added in v0.3.1

func UIDFromContext(ctx context.Context) (int64, bool)

UIDFromContext returns the User value stored in ctx, if any.

Types

type FetchInput added in v0.1.1

type FetchInput = pb.FetchInput

FetchInput ...

type IImage

type IImage interface {
	GetPath() string
	GetHost() string
	GetUri() string
	GetID() string
}

IImage ...

func Fetch

func Fetch(ctx context.Context, in *FetchInput) (IImage, error)

Fetch ...

func Store

func Store(ctx context.Context, in *ImageInput) (IImage, error)

Store ...

func StoreReader added in v0.3.2

func StoreReader(ctx context.Context, roof, name string, rd io.Reader) (IImage, error)

StoreReader ...

type ImageInput added in v0.1.1

type ImageInput = pb.ImageInput

ImageInput ...

type ImageOutput added in v0.1.1

type ImageOutput = pb.ImageOutput

ImageOutput ...

Jump to

Keyboard shortcuts

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