Documentation ¶
Index ¶
- func NewACLServer(ds datastore.Datastore, nsm namespace.Manager, dispatch dispatch.Dispatcher, ...) v0.ACLServiceServer
- func NewDeveloperServer(store ShareStore) v0.DeveloperServiceServer
- func NewInMemoryShareStore(salt string) *inMemoryShareStore
- func NewNamespaceServer(ds datastore.Datastore) v0.NamespaceServiceServer
- func NewS3ShareStore(bucket string, salt string, config *aws.Config) (*s3ShareStore, error)
- func NewWatchServer(ds datastore.Datastore, nsm namespace.Manager) v0.WatchServiceServer
- func RegisterDeveloperServer(r grpc.ServiceRegistrar, s v0.DeveloperServiceServer) *grpc.ServiceDesc
- type DevContext
- type LookupStatus
- type ShareStore
- type SharedDataV1
- type SharedDataV2
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewACLServer ¶
func NewACLServer(ds datastore.Datastore, nsm namespace.Manager, dispatch dispatch.Dispatcher, defaultDepth uint32) v0.ACLServiceServer
NewACLServer creates an instance of the ACL server.
func NewDeveloperServer ¶
func NewDeveloperServer(store ShareStore) v0.DeveloperServiceServer
NewDeveloperServer creates an instance of the developer server.
func NewInMemoryShareStore ¶
func NewInMemoryShareStore(salt string) *inMemoryShareStore
NewInMemoryShareStore creates a new in memory share store.
func NewNamespaceServer ¶
func NewNamespaceServer(ds datastore.Datastore) v0.NamespaceServiceServer
NewNamespaceServer creates an instance of the namespace server.
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.
func NewWatchServer ¶
NewWatchServer creates an instance of the watch 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 DevContext ¶
type DevContext struct { Datastore datastore.Datastore Revision decimal.Decimal Namespaces []*v0.NamespaceDefinition Dispatcher dispatch.Dispatcher RequestErrors []*v0.DeveloperError }
DevContext holds the various helper types for running the developer calls.
func NewDevContext ¶
func NewDevContext(ctx context.Context, requestContext *v0.RequestContext) (*DevContext, bool, error)
NewDevContext creates a new DevContext from the specified request context, parsing and populating the datastore as needed.
type LookupStatus ¶
type LookupStatus int
const ( LookupError LookupStatus = iota LookupNotFound LookupSuccess 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.
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.