fileserver

package
v0.0.0-...-1a6bc1e Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2017 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterFileserverServer

func RegisterFileserverServer(s *grpc.Server, srv FileserverServer)

Types

type FileserverClient

type FileserverClient interface {
	ServeFile(ctx context.Context, in *ServeRequest, opts ...grpc.CallOption) (*ServeResponse, error)

	UnServeFile(ctx context.Context, in *UnServeRequest, opts ...grpc.CallOption) (*ServeResponse, error)

	ListServer(ctx context.Context, in *ListServeRequest, opts ...grpc.CallOption) (*ListServeResponse, error)
}

func NewFileserverClient

func NewFileserverClient(cc *grpc.ClientConn) FileserverClient

type FileserverServer

type FileserverServer interface {
	ServeFile(context.Context, *ServeRequest) (*ServeResponse, error)

	UnServeFile(context.Context, *UnServeRequest) (*ServeResponse, error)

	ListServer(context.Context, *ListServeRequest) (*ListServeResponse, error)
}

type ListServeRequest

type ListServeRequest struct {
	Uuid string `protobuf:"bytes,1,opt,name=Uuid,json=uuid" json:"Uuid,omitempty"`

	Pool string `protobuf:"bytes,2,opt,name=Pool,json=pool" json:"Pool,omitempty"`
}

func (*ListServeRequest) Descriptor

func (*ListServeRequest) Descriptor() ([]byte, []int)

func (*ListServeRequest) ProtoMessage

func (*ListServeRequest) ProtoMessage()

func (*ListServeRequest) Reset

func (m *ListServeRequest) Reset()

func (*ListServeRequest) String

func (m *ListServeRequest) String() string

type ListServeResponse

type ListServeResponse struct {
	ServedFiles []*ServedFile `protobuf:"bytes,1,rep,name=ServedFiles,json=servedFiles" json:"ServedFiles,omitempty"`
}

func (*ListServeResponse) Descriptor

func (*ListServeResponse) Descriptor() ([]byte, []int)

func (*ListServeResponse) GetServedFiles

func (m *ListServeResponse) GetServedFiles() []*ServedFile

func (*ListServeResponse) ProtoMessage

func (*ListServeResponse) ProtoMessage()

func (*ListServeResponse) Reset

func (m *ListServeResponse) Reset()

func (*ListServeResponse) String

func (m *ListServeResponse) String() string

type ServeRequest

type ServeRequest struct {
	Uuid string `protobuf:"bytes,1,opt,name=Uuid,json=uuid" json:"Uuid,omitempty"`

	Pool string `protobuf:"bytes,2,opt,name=Pool,json=pool" json:"Pool,omitempty"`

	FilePath string `protobuf:"bytes,3,opt,name=FilePath,json=filePath" json:"FilePath,omitempty"`

	FileData []byte `protobuf:"bytes,4,opt,name=FileData,json=fileData,proto3" json:"FileData,omitempty"`

	Timeout int32 `protobuf:"varint,5,opt,name=Timeout,json=timeout" json:"Timeout,omitempty"`

	Limit int32 `protobuf:"varint,6,opt,name=Limit,json=limit" json:"Limit,omitempty"`
}

func (*ServeRequest) Descriptor

func (*ServeRequest) Descriptor() ([]byte, []int)

func (*ServeRequest) ProtoMessage

func (*ServeRequest) ProtoMessage()

func (*ServeRequest) Reset

func (m *ServeRequest) Reset()

func (*ServeRequest) String

func (m *ServeRequest) String() string

type ServeResponse

type ServeResponse struct {
	ServeResponse string `protobuf:"bytes,1,opt,name=ServeResponse,json=serveResponse" json:"ServeResponse,omitempty"`

	ServerPort string `protobuf:"bytes,2,opt,name=ServerPort,json=serverPort" json:"ServerPort,omitempty"`
}

func (*ServeResponse) Descriptor

func (*ServeResponse) Descriptor() ([]byte, []int)

func (*ServeResponse) ProtoMessage

func (*ServeResponse) ProtoMessage()

func (*ServeResponse) Reset

func (m *ServeResponse) Reset()

func (*ServeResponse) String

func (m *ServeResponse) String() string

type ServedFile

type ServedFile struct {
	FilePath string `protobuf:"bytes,1,opt,name=FilePath,json=filePath" json:"FilePath,omitempty"`

	FileHash string `protobuf:"bytes,2,opt,name=FileHash,json=fileHash" json:"FileHash,omitempty"`

	AccessLimit int32 `protobuf:"varint,3,opt,name=AccessLimit,json=accessLimit" json:"AccessLimit,omitempty"`

	ExpirationTime string `protobuf:"bytes,4,opt,name=ExpirationTime,json=expirationTime" json:"ExpirationTime,omitempty"`
}

func (*ServedFile) Descriptor

func (*ServedFile) Descriptor() ([]byte, []int)

func (*ServedFile) ProtoMessage

func (*ServedFile) ProtoMessage()

func (*ServedFile) Reset

func (m *ServedFile) Reset()

func (*ServedFile) String

func (m *ServedFile) String() string

type UnServeRequest

type UnServeRequest struct {
	Uuid string `protobuf:"bytes,1,opt,name=Uuid,json=uuid" json:"Uuid,omitempty"`

	Pool string `protobuf:"bytes,2,opt,name=Pool,json=pool" json:"Pool,omitempty"`

	FilePath string `protobuf:"bytes,3,opt,name=FilePath,json=filePath" json:"FilePath,omitempty"`
}

func (*UnServeRequest) Descriptor

func (*UnServeRequest) Descriptor() ([]byte, []int)

func (*UnServeRequest) ProtoMessage

func (*UnServeRequest) ProtoMessage()

func (*UnServeRequest) Reset

func (m *UnServeRequest) Reset()

func (*UnServeRequest) String

func (m *UnServeRequest) String() string

Jump to

Keyboard shortcuts

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