Documentation ¶
Index ¶
- Constants
- func NewFileServiceHandler(svc FileServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler)
- type FileServiceClient
- type FileServiceHandler
- type UnimplementedFileServiceHandler
- func (UnimplementedFileServiceHandler) AttachSync(context.Context, *connect_go.Request[v1.AttachSyncRequest]) (*connect_go.Response[v1.AttachSyncResponse], error)
- func (UnimplementedFileServiceHandler) CreateFile(context.Context, *connect_go.ClientStream[v1.CreateFileRequest]) (*connect_go.Response[v1.CreateFileResponse], error)
- func (UnimplementedFileServiceHandler) DeleteFile(context.Context, *connect_go.Request[v1.DeleteFileRequest]) (*connect_go.Response[v1.DeleteFileResponse], error)
- func (UnimplementedFileServiceHandler) DeleteSync(context.Context, *connect_go.Request[v1.DeleteSyncRequest]) (*connect_go.Response[v1.DeleteSyncResponse], error)
- func (UnimplementedFileServiceHandler) GetFile(context.Context, *connect_go.Request[v1.GetFileRequest]) (*connect_go.Response[v1.GetFileResponse], error)
- func (UnimplementedFileServiceHandler) ImportFromURL(context.Context, *connect_go.Request[v1.ImportFromURLRequest]) (*connect_go.Response[v1.ImportFromURLResponse], error)
- func (UnimplementedFileServiceHandler) ListFiles(context.Context, *connect_go.Request[v1.ListFilesRequest]) (*connect_go.Response[v1.ListFilesResponse], error)
- func (UnimplementedFileServiceHandler) ShareFile(context.Context, *connect_go.Request[v1.ShareFileRequest]) (*connect_go.Response[v1.ShareFileResponse], error)
- func (UnimplementedFileServiceHandler) UnshareFile(context.Context, *connect_go.Request[v1.UnshareFileRequest]) (*connect_go.Response[v1.UnshareFileResponse], error)
- func (UnimplementedFileServiceHandler) UpdateFile(context.Context, *connect_go.Request[v1.UpdateFileRequest]) (*connect_go.Response[v1.UpdateFileResponse], error)
Constants ¶
const (
// FileServiceName is the fully-qualified name of the FileService service.
FileServiceName = "file.v1.FileService"
)
Variables ¶
This section is empty.
Functions ¶
func NewFileServiceHandler ¶
func NewFileServiceHandler(svc FileServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler)
NewFileServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.
By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.
Types ¶
type FileServiceClient ¶
type FileServiceClient interface { // GetFile returns a specific file given its ID. GetFile(context.Context, *connect_go.Request[v1.GetFileRequest]) (*connect_go.Response[v1.GetFileResponse], error) // ListFiles returns a list of files, paginated. ListFiles(context.Context, *connect_go.Request[v1.ListFilesRequest]) (*connect_go.Response[v1.ListFilesResponse], error) // CreateFile creates a new file. CreateFile(context.Context) *connect_go.ClientStreamForClient[v1.CreateFileRequest, v1.CreateFileResponse] // ImportFromURL imports a file from a URL. The file will be downloaded // and stored under a certain path. ImportFromURL(context.Context, *connect_go.Request[v1.ImportFromURLRequest]) (*connect_go.Response[v1.ImportFromURLResponse], error) // DeleteFile deletes a file. DeleteFile(context.Context, *connect_go.Request[v1.DeleteFileRequest]) (*connect_go.Response[v1.DeleteFileResponse], error) // UpdateFile updates a file. UpdateFile(context.Context, *connect_go.Request[v1.UpdateFileRequest]) (*connect_go.Response[v1.UpdateFileResponse], error) ShareFile(context.Context, *connect_go.Request[v1.ShareFileRequest]) (*connect_go.Response[v1.ShareFileResponse], error) UnshareFile(context.Context, *connect_go.Request[v1.UnshareFileRequest]) (*connect_go.Response[v1.UnshareFileResponse], error) // AttachSync attaches a Sync to a file. // If the file isn't a folder, or the folder already has an attached Sync, // this operation will fail. AttachSync(context.Context, *connect_go.Request[v1.AttachSyncRequest]) (*connect_go.Response[v1.AttachSyncResponse], error) // DeleteSync deletes an Sync. The file contents of the folder // will be kept, but no further updates will be made. DeleteSync(context.Context, *connect_go.Request[v1.DeleteSyncRequest]) (*connect_go.Response[v1.DeleteSyncResponse], error) }
FileServiceClient is a client for the file.v1.FileService service.
func NewFileServiceClient ¶
func NewFileServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) FileServiceClient
NewFileServiceClient constructs a client for the file.v1.FileService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.
The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).
type FileServiceHandler ¶
type FileServiceHandler interface { // GetFile returns a specific file given its ID. GetFile(context.Context, *connect_go.Request[v1.GetFileRequest]) (*connect_go.Response[v1.GetFileResponse], error) // ListFiles returns a list of files, paginated. ListFiles(context.Context, *connect_go.Request[v1.ListFilesRequest]) (*connect_go.Response[v1.ListFilesResponse], error) // CreateFile creates a new file. CreateFile(context.Context, *connect_go.ClientStream[v1.CreateFileRequest]) (*connect_go.Response[v1.CreateFileResponse], error) // ImportFromURL imports a file from a URL. The file will be downloaded // and stored under a certain path. ImportFromURL(context.Context, *connect_go.Request[v1.ImportFromURLRequest]) (*connect_go.Response[v1.ImportFromURLResponse], error) // DeleteFile deletes a file. DeleteFile(context.Context, *connect_go.Request[v1.DeleteFileRequest]) (*connect_go.Response[v1.DeleteFileResponse], error) // UpdateFile updates a file. UpdateFile(context.Context, *connect_go.Request[v1.UpdateFileRequest]) (*connect_go.Response[v1.UpdateFileResponse], error) ShareFile(context.Context, *connect_go.Request[v1.ShareFileRequest]) (*connect_go.Response[v1.ShareFileResponse], error) UnshareFile(context.Context, *connect_go.Request[v1.UnshareFileRequest]) (*connect_go.Response[v1.UnshareFileResponse], error) // AttachSync attaches a Sync to a file. // If the file isn't a folder, or the folder already has an attached Sync, // this operation will fail. AttachSync(context.Context, *connect_go.Request[v1.AttachSyncRequest]) (*connect_go.Response[v1.AttachSyncResponse], error) // DeleteSync deletes an Sync. The file contents of the folder // will be kept, but no further updates will be made. DeleteSync(context.Context, *connect_go.Request[v1.DeleteSyncRequest]) (*connect_go.Response[v1.DeleteSyncResponse], error) }
FileServiceHandler is an implementation of the file.v1.FileService service.
type UnimplementedFileServiceHandler ¶
type UnimplementedFileServiceHandler struct{}
UnimplementedFileServiceHandler returns CodeUnimplemented from all methods.
func (UnimplementedFileServiceHandler) AttachSync ¶
func (UnimplementedFileServiceHandler) AttachSync(context.Context, *connect_go.Request[v1.AttachSyncRequest]) (*connect_go.Response[v1.AttachSyncResponse], error)
func (UnimplementedFileServiceHandler) CreateFile ¶
func (UnimplementedFileServiceHandler) CreateFile(context.Context, *connect_go.ClientStream[v1.CreateFileRequest]) (*connect_go.Response[v1.CreateFileResponse], error)
func (UnimplementedFileServiceHandler) DeleteFile ¶
func (UnimplementedFileServiceHandler) DeleteFile(context.Context, *connect_go.Request[v1.DeleteFileRequest]) (*connect_go.Response[v1.DeleteFileResponse], error)
func (UnimplementedFileServiceHandler) DeleteSync ¶
func (UnimplementedFileServiceHandler) DeleteSync(context.Context, *connect_go.Request[v1.DeleteSyncRequest]) (*connect_go.Response[v1.DeleteSyncResponse], error)
func (UnimplementedFileServiceHandler) GetFile ¶
func (UnimplementedFileServiceHandler) GetFile(context.Context, *connect_go.Request[v1.GetFileRequest]) (*connect_go.Response[v1.GetFileResponse], error)
func (UnimplementedFileServiceHandler) ImportFromURL ¶
func (UnimplementedFileServiceHandler) ImportFromURL(context.Context, *connect_go.Request[v1.ImportFromURLRequest]) (*connect_go.Response[v1.ImportFromURLResponse], error)
func (UnimplementedFileServiceHandler) ListFiles ¶
func (UnimplementedFileServiceHandler) ListFiles(context.Context, *connect_go.Request[v1.ListFilesRequest]) (*connect_go.Response[v1.ListFilesResponse], error)
func (UnimplementedFileServiceHandler) ShareFile ¶
func (UnimplementedFileServiceHandler) ShareFile(context.Context, *connect_go.Request[v1.ShareFileRequest]) (*connect_go.Response[v1.ShareFileResponse], error)
func (UnimplementedFileServiceHandler) UnshareFile ¶
func (UnimplementedFileServiceHandler) UnshareFile(context.Context, *connect_go.Request[v1.UnshareFileRequest]) (*connect_go.Response[v1.UnshareFileResponse], error)
func (UnimplementedFileServiceHandler) UpdateFile ¶
func (UnimplementedFileServiceHandler) UpdateFile(context.Context, *connect_go.Request[v1.UpdateFileRequest]) (*connect_go.Response[v1.UpdateFileResponse], error)