service

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2021 License: Apache-2.0, BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Overview

Package service implements the XToProtoService gRPC service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(defaultWorkspaceDir string, readFile FileReaderFunc, writeFile FileWriterFunc) sgrpcpb.XToProtoServiceServer

New returns a new XToProtoService.

defaultWorkspaceDir will be used for the workspace directory when no value is passed in with the request.

Types

type FileReaderFunc

type FileReaderFunc func(ctx context.Context, path string) ([]byte, error)

FileReaderFunc is a function that returns the content of a file or an error.

type FileWriterFunc

type FileWriterFunc func(ctx context.Context, path string, data []byte) error

FileWriterFunc is a function that outputs a source code file to the given path.

Jump to

Keyboard shortcuts

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