server

package
v0.0.0-...-14d2bb4 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ServerHandler

type ServerHandler interface {
	pb.ShrlsServer
	pb.FileUploadServer

	SetState(ServerState)
	SetStorage(ServerStorage)
}

type ServerState

type ServerState interface {
	GetShrl(context.Context, *pb.Ref_ShortURL) (*pb.ShortURL, error)
	GetShrls(context.Context, *pb.Ref_ShortURL) ([]*pb.ShortURL, error)
	CreateShrl(context.Context, *pb.ShortURL) (*pb.ShortURL, error)
	ListShrls(ctx context.Context, search *string, count *int64, page *int64) ([]*pb.ShortURL, int64, error)
	UpdateShrl(context.Context, *pb.ShortURL) (*pb.ShortURL, error)
	DeleteShrl(context.Context, *pb.Ref_ShortURL) error
}

type ServerStorage

type ServerStorage interface {
	CreateFile([]byte) (string, error)
	ReadFile(string) ([]byte, error)
	DeleteFile(string) error
}

Directories

Path Synopsis
gen
gateway
Package gen is a reverse proxy.
Package gen is a reverse proxy.

Jump to

Keyboard shortcuts

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