Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsStdGrpcExtension ¶
The standard grpc extension requires special handling as the provided type is is a usage-specific gRPC client class. TODO: make private once Go is fully migrated to the "shared" API.
Types ¶
type DependencyData ¶
type DependencyData struct { Name string ProviderName string ProviderInputType ProtoTypeData ProviderType ProviderTypeData ProviderLocation pkggraph.Location ProviderInput SerializedProto }
type EmbeddedServiceData ¶
type NodeData ¶
type NodeData struct { Kind schema.Node_Kind PackageName string Deps []DependencyData Providers []ProviderData ImportedInitializers []pkggraph.Location Initializer *PackageInitializerData }
type PackageInitializerData ¶
type ProtoTypeData ¶
type ProtoTypeData struct { Name string SourceFileName string Location pkggraph.Location // Distinguishing between message and service types because they need to be imported from different files in node.js Kind ProtoTypeKind }
func PrepareGrpcBackendDep ¶
func PrepareGrpcBackendDep(ctx context.Context, loader pkggraph.PackageLoader, dep *schema.Instantiate) (*ProtoTypeData, error)
TODO: make private once Go is fully migrate to the "shared" API.
type ProtoTypeKind ¶
type ProtoTypeKind int32
const ( ProtoMessage ProtoTypeKind = iota ProtoService )
type ProviderData ¶
type ProviderData struct { Name string Location pkggraph.Location InputType ProtoTypeData ProviderType ProviderTypeData ScopedDeps []DependencyData }
type ProviderTypeData ¶
type ProviderTypeData struct { // Regular case: the user specific the type of the provider in `availableIn`. ParsedType *schema.Provides_AvailableIn // std/grpc extension: the provider type `<service-name>Client` is generated at runtime. // Only can happen within DependencyData. Type *ProtoTypeData // If true, the provider can return different types dependning on the usage context.\ // Used to implement gRPC client injection. IsParameterized bool }
Only one of these two fields is set.
type SerializedProto ¶
type ServerData ¶
type ServerData struct { Services []EmbeddedServiceData ImportedInitializers []pkggraph.Location }
func PrepareServerData ¶
func PrepareServerData(ctx context.Context, loader pkggraph.PackageLoader, loc pkggraph.Location, srv *schema.Server, fmwk schema.Framework) (ServerData, error)
Prepare codegen data for a server.
Click to show internal directories.
Click to hide internal directories.