Documentation ¶
Index ¶
- func NewDeveloperServer(store ShareStore) v0.DeveloperServiceServer
- func NewHTTPDownloadServer(addr string, shareStore ShareStore) *http.Server
- func RegisterDeveloperServer(r grpc.ServiceRegistrar, s v0.DeveloperServiceServer) *grpc.ServiceDesc
- type LookupStatus
- type ShareStore
- type SharedDataV1
- type SharedDataV2
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDeveloperServer ¶
func NewDeveloperServer(store ShareStore) v0.DeveloperServiceServer
NewDeveloperServer creates an instance of the developer server.
func NewHTTPDownloadServer ¶ added in v1.2.0
func NewHTTPDownloadServer(addr string, shareStore ShareStore) *http.Server
func RegisterDeveloperServer ¶ added in v0.0.2
func RegisterDeveloperServer(r grpc.ServiceRegistrar, s v0.DeveloperServiceServer) *grpc.ServiceDesc
RegisterDeveloperServer adds the Developer Server to a grpc service registrar This is preferred over manually registering the service; it will add required middleware
Types ¶
type LookupStatus ¶
type LookupStatus int
LookupStatus is an enum for the possible ShareStore lookup outcomes.
const ( // LookupError indicates an error has occurred. LookupError LookupStatus = iota // LookupNotFound indicates that no results were found for the specified reference. LookupNotFound // LookupSuccess indicates success. LookupSuccess // LookupConverted indicates when the results have been converted from an earlier version. LookupConverted )
type ShareStore ¶
type ShareStore interface { string) (SharedDataV2, LookupStatus, error) // its reference hash. StoreShared(data SharedDataV2) (string, error) }LookupSharedByReference(reference
ShareStore defines the interface for sharing and loading shared playground files.
func NewInMemoryShareStore ¶
func NewInMemoryShareStore(salt string) ShareStore
NewInMemoryShareStore creates a new in memory share store.
func NewS3ShareStore ¶
NewS3ShareStore creates a new S3 share store, reading and writing the shared data to the given bucket, with the given salt for hash computation and the given config for connecting to S3 or and S3-compatible API.
type SharedDataV1 ¶
type SharedDataV1 struct {}
SharedDataV1 represents the data stored in a shared playground file.
type SharedDataV2 ¶
type SharedDataV2 struct {}
SharedDataV2 represents the data stored in a shared playground file.