Documentation ¶
Index ¶
- func ApiToOpenApiSpec(apiRegistrationRequests map[string][]*apispb.RegistrationRequest, ...) (*openapi3.T, error)
- func GetMigrationImageBuildContexts(allServiceRequirements []*ServiceRequirements, ...) (map[string]*runtime.RuntimeBuildContext, error)
- func ServiceRequirementsToSpec(projectName string, environmentVariables map[string]string, ...) (*deploymentspb.Spec, error)
- type ApiCollectorServer
- type BatchRequirements
- func (s *BatchRequirements) Declare(ctx context.Context, req *resourcespb.ResourceDeclareRequest) (*resourcespb.ResourceDeclareResponse, error)
- func (s *BatchRequirements) Error() error
- func (s *BatchRequirements) HandleEvents(stream websocketspb.WebsocketHandler_HandleEventsServer) error
- func (s *BatchRequirements) HandleJob(stream batchpb.Job_HandleJobServer) error
- func (s *BatchRequirements) HasDatabases() bool
- func (s *BatchRequirements) Proxy(stream httppb.Http_ProxyServer) error
- func (s *BatchRequirements) RegisterServices(grpcServer *grpc.Server)
- func (s *BatchRequirements) Schedule(stream schedulespb.Schedules_ScheduleServer) error
- func (s *BatchRequirements) Serve(stream apispb.Api_ServeServer) error
- func (s *BatchRequirements) Subscribe(stream topicspb.Subscriber_SubscribeServer) error
- type OpenIdConfig
- type ProjectErrors
- type ServiceRequirements
- func (s *ServiceRequirements) Access(context.Context, *secretspb.SecretAccessRequest) (*secretspb.SecretAccessResponse, error)
- func (s *ServiceRequirements) ApiDetails(context.Context, *apispb.ApiDetailsRequest) (*apispb.ApiDetailsResponse, error)
- func (s *ServiceRequirements) CloseConnection(context.Context, *websocketspb.WebsocketCloseConnectionRequest) (*websocketspb.WebsocketCloseConnectionResponse, error)
- func (s *ServiceRequirements) Complete(context.Context, *queuespb.QueueCompleteRequest) (*queuespb.QueueCompleteResponse, error)
- func (s *ServiceRequirements) ConnectionString(context.Context, *sqlpb.SqlConnectionStringRequest) (*sqlpb.SqlConnectionStringResponse, error)
- func (s *ServiceRequirements) Declare(ctx context.Context, req *resourcespb.ResourceDeclareRequest) (*resourcespb.ResourceDeclareResponse, error)
- func (s *ServiceRequirements) Delete(context.Context, *storagepb.StorageDeleteRequest) (*storagepb.StorageDeleteResponse, error)
- func (s *ServiceRequirements) DeleteKey(context.Context, *kvstorepb.KvStoreDeleteKeyRequest) (*kvstorepb.KvStoreDeleteKeyResponse, error)
- func (s *ServiceRequirements) Dequeue(context.Context, *queuespb.QueueDequeueRequest) (*queuespb.QueueDequeueResponse, error)
- func (s *ServiceRequirements) Enqueue(context.Context, *queuespb.QueueEnqueueRequest) (*queuespb.QueueEnqueueResponse, error)
- func (s *ServiceRequirements) Error() error
- func (s *ServiceRequirements) Exists(context.Context, *storagepb.StorageExistsRequest) (*storagepb.StorageExistsResponse, error)
- func (s *ServiceRequirements) GetValue(context.Context, *kvstorepb.KvStoreGetValueRequest) (*kvstorepb.KvStoreGetValueResponse, error)
- func (s *ServiceRequirements) HandleEvents(stream websocketspb.WebsocketHandler_HandleEventsServer) error
- func (s *ServiceRequirements) HasDatabases() bool
- func (s *ServiceRequirements) ListBlobs(context.Context, *storagepb.StorageListBlobsRequest) (*storagepb.StorageListBlobsResponse, error)
- func (s *ServiceRequirements) Listen(stream storagepb.StorageListener_ListenServer) error
- func (s *ServiceRequirements) PreSignUrl(context.Context, *storagepb.StoragePreSignUrlRequest) (*storagepb.StoragePreSignUrlResponse, error)
- func (s *ServiceRequirements) Proxy(stream httppb.Http_ProxyServer) error
- func (s *ServiceRequirements) Publish(context.Context, *topicspb.TopicPublishRequest) (*topicspb.TopicPublishResponse, error)
- func (s *ServiceRequirements) Put(context.Context, *secretspb.SecretPutRequest) (*secretspb.SecretPutResponse, error)
- func (s *ServiceRequirements) Read(context.Context, *storagepb.StorageReadRequest) (*storagepb.StorageReadResponse, error)
- func (s *ServiceRequirements) RegisterServices(grpcServer *grpc.Server)
- func (s *ServiceRequirements) ScanKeys(*kvstorepb.KvStoreScanKeysRequest, kvstorepb.KvStore_ScanKeysServer) error
- func (s *ServiceRequirements) Schedule(stream schedulespb.Schedules_ScheduleServer) error
- func (s *ServiceRequirements) SendMessage(context.Context, *websocketspb.WebsocketSendRequest) (*websocketspb.WebsocketSendResponse, error)
- func (s *ServiceRequirements) Serve(stream apispb.Api_ServeServer) error
- func (s *ServiceRequirements) SetValue(context.Context, *kvstorepb.KvStoreSetValueRequest) (*kvstorepb.KvStoreSetValueResponse, error)
- func (s *ServiceRequirements) SocketDetails(context.Context, *websocketspb.WebsocketDetailsRequest) (*websocketspb.WebsocketDetailsResponse, error)
- func (s *ServiceRequirements) Subscribe(stream topicspb.Subscriber_SubscribeServer) error
- func (s *ServiceRequirements) WorkerCount() int
- func (s *ServiceRequirements) Write(context.Context, *storagepb.StorageWriteRequest) (*storagepb.StorageWriteResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApiToOpenApiSpec ¶
func ApiToOpenApiSpec(apiRegistrationRequests map[string][]*apispb.RegistrationRequest, apiSecurityDefinitions map[string]map[string]*resourcespb.ApiSecurityDefinitionResource, projectErrors *ProjectErrors) (*openapi3.T, error)
func GetMigrationImageBuildContexts ¶ added in v1.42.0
func GetMigrationImageBuildContexts(allServiceRequirements []*ServiceRequirements, allBatchRequirements []*BatchRequirements, fs afero.Fs) (map[string]*runtime.RuntimeBuildContext, error)
Collect a list of migration images that need to be built these requirements need to be supplied to the deployment serviceS
func ServiceRequirementsToSpec ¶
func ServiceRequirementsToSpec(projectName string, environmentVariables map[string]string, allServiceRequirements []*ServiceRequirements, allBatchRequirements []*BatchRequirements) (*deploymentspb.Spec, error)
convert service requirements to a cloud bill of materials
Types ¶
type ApiCollectorServer ¶
type ApiCollectorServer struct { apispb.UnimplementedApiServer // contains filtered or unexported fields }
func (*ApiCollectorServer) Serve ¶
func (s *ApiCollectorServer) Serve(stream apispb.Api_ServeServer) error
type BatchRequirements ¶ added in v1.54.0
type BatchRequirements struct { topicspb.UnimplementedTopicsServer storagepb.UnimplementedStorageListenerServer websocketspb.UnimplementedWebsocketServer ApiServer apispb.ApiServer // contains filtered or unexported fields }
func NewBatchRequirements ¶ added in v1.54.0
func NewBatchRequirements(serviceName string, serviceFile string) *BatchRequirements
func (*BatchRequirements) Declare ¶ added in v1.54.0
func (s *BatchRequirements) Declare(ctx context.Context, req *resourcespb.ResourceDeclareRequest) (*resourcespb.ResourceDeclareResponse, error)
func (*BatchRequirements) Error ¶ added in v1.54.0
func (s *BatchRequirements) Error() error
Error - Returns an error if any requirements have been registered incorrectly, such as duplicates
func (*BatchRequirements) HandleEvents ¶ added in v1.54.0
func (s *BatchRequirements) HandleEvents(stream websocketspb.WebsocketHandler_HandleEventsServer) error
func (*BatchRequirements) HandleJob ¶ added in v1.54.0
func (s *BatchRequirements) HandleJob(stream batchpb.Job_HandleJobServer) error
func (*BatchRequirements) HasDatabases ¶ added in v1.54.0
func (s *BatchRequirements) HasDatabases() bool
TODO: Remove when databases are no longer in preview
func (*BatchRequirements) Proxy ¶ added in v1.54.0
func (s *BatchRequirements) Proxy(stream httppb.Http_ProxyServer) error
func (*BatchRequirements) RegisterServices ¶ added in v1.54.0
func (s *BatchRequirements) RegisterServices(grpcServer *grpc.Server)
func (*BatchRequirements) Schedule ¶ added in v1.54.0
func (s *BatchRequirements) Schedule(stream schedulespb.Schedules_ScheduleServer) error
func (*BatchRequirements) Serve ¶ added in v1.54.0
func (s *BatchRequirements) Serve(stream apispb.Api_ServeServer) error
func (*BatchRequirements) Subscribe ¶ added in v1.54.0
func (s *BatchRequirements) Subscribe(stream topicspb.Subscriber_SubscribeServer) error
type OpenIdConfig ¶ added in v1.54.13
type ProjectErrors ¶
type ProjectErrors struct {
// contains filtered or unexported fields
}
func (*ProjectErrors) Add ¶
func (pe *ProjectErrors) Add(err error)
func (ProjectErrors) Error ¶
func (pe ProjectErrors) Error() error
type ServiceRequirements ¶
type ServiceRequirements struct { topicspb.UnimplementedTopicsServer storagepb.UnimplementedStorageListenerServer websocketspb.UnimplementedWebsocketServer ApiServer apispb.ApiServer // contains filtered or unexported fields }
ServiceRequirements - Cloud resource requirements for a Nitric Application Service
Hosts all Nitric resource servers in a collection-only mode, where services can call into the servers to request resources they require for their operation.
func MakeDatabaseServiceRequirements ¶ added in v1.53.0
func MakeDatabaseServiceRequirements(sqlDatabases map[string]*resourcespb.SqlDatabaseResource) []*ServiceRequirements
sqlDatabases to requirements
func NewServiceRequirements ¶
func NewServiceRequirements(serviceName string, serviceFile string, serviceType string) *ServiceRequirements
func (*ServiceRequirements) Access ¶ added in v1.48.1
func (s *ServiceRequirements) Access(context.Context, *secretspb.SecretAccessRequest) (*secretspb.SecretAccessResponse, error)
Secrets
func (*ServiceRequirements) ApiDetails ¶ added in v1.48.1
func (s *ServiceRequirements) ApiDetails(context.Context, *apispb.ApiDetailsRequest) (*apispb.ApiDetailsResponse, error)
API
func (*ServiceRequirements) CloseConnection ¶ added in v1.48.1
func (s *ServiceRequirements) CloseConnection(context.Context, *websocketspb.WebsocketCloseConnectionRequest) (*websocketspb.WebsocketCloseConnectionResponse, error)
func (*ServiceRequirements) Complete ¶ added in v1.48.1
func (s *ServiceRequirements) Complete(context.Context, *queuespb.QueueCompleteRequest) (*queuespb.QueueCompleteResponse, error)
func (*ServiceRequirements) ConnectionString ¶ added in v1.48.1
func (s *ServiceRequirements) ConnectionString(context.Context, *sqlpb.SqlConnectionStringRequest) (*sqlpb.SqlConnectionStringResponse, error)
SQL
func (*ServiceRequirements) Declare ¶
func (s *ServiceRequirements) Declare(ctx context.Context, req *resourcespb.ResourceDeclareRequest) (*resourcespb.ResourceDeclareResponse, error)
func (*ServiceRequirements) Delete ¶ added in v1.48.1
func (s *ServiceRequirements) Delete(context.Context, *storagepb.StorageDeleteRequest) (*storagepb.StorageDeleteResponse, error)
func (*ServiceRequirements) DeleteKey ¶ added in v1.48.1
func (s *ServiceRequirements) DeleteKey(context.Context, *kvstorepb.KvStoreDeleteKeyRequest) (*kvstorepb.KvStoreDeleteKeyResponse, error)
func (*ServiceRequirements) Dequeue ¶ added in v1.48.1
func (s *ServiceRequirements) Dequeue(context.Context, *queuespb.QueueDequeueRequest) (*queuespb.QueueDequeueResponse, error)
func (*ServiceRequirements) Enqueue ¶ added in v1.48.1
func (s *ServiceRequirements) Enqueue(context.Context, *queuespb.QueueEnqueueRequest) (*queuespb.QueueEnqueueResponse, error)
Queues
func (*ServiceRequirements) Error ¶
func (s *ServiceRequirements) Error() error
Error - Returns an error if any requirements have been registered incorrectly, such as duplicates
func (*ServiceRequirements) Exists ¶ added in v1.48.1
func (s *ServiceRequirements) Exists(context.Context, *storagepb.StorageExistsRequest) (*storagepb.StorageExistsResponse, error)
func (*ServiceRequirements) GetValue ¶ added in v1.48.1
func (s *ServiceRequirements) GetValue(context.Context, *kvstorepb.KvStoreGetValueRequest) (*kvstorepb.KvStoreGetValueResponse, error)
KeyValue
func (*ServiceRequirements) HandleEvents ¶
func (s *ServiceRequirements) HandleEvents(stream websocketspb.WebsocketHandler_HandleEventsServer) error
func (*ServiceRequirements) HasDatabases ¶ added in v1.42.0
func (s *ServiceRequirements) HasDatabases() bool
TODO: Remove when databases are no longer in preview
func (*ServiceRequirements) ListBlobs ¶ added in v1.48.1
func (s *ServiceRequirements) ListBlobs(context.Context, *storagepb.StorageListBlobsRequest) (*storagepb.StorageListBlobsResponse, error)
func (*ServiceRequirements) Listen ¶
func (s *ServiceRequirements) Listen(stream storagepb.StorageListener_ListenServer) error
func (*ServiceRequirements) PreSignUrl ¶ added in v1.48.1
func (s *ServiceRequirements) PreSignUrl(context.Context, *storagepb.StoragePreSignUrlRequest) (*storagepb.StoragePreSignUrlResponse, error)
func (*ServiceRequirements) Proxy ¶
func (s *ServiceRequirements) Proxy(stream httppb.Http_ProxyServer) error
func (*ServiceRequirements) Publish ¶ added in v1.48.1
func (s *ServiceRequirements) Publish(context.Context, *topicspb.TopicPublishRequest) (*topicspb.TopicPublishResponse, error)
Topics
func (*ServiceRequirements) Put ¶ added in v1.48.1
func (s *ServiceRequirements) Put(context.Context, *secretspb.SecretPutRequest) (*secretspb.SecretPutResponse, error)
func (*ServiceRequirements) Read ¶ added in v1.48.1
func (s *ServiceRequirements) Read(context.Context, *storagepb.StorageReadRequest) (*storagepb.StorageReadResponse, error)
Buckets
func (*ServiceRequirements) RegisterServices ¶ added in v1.54.0
func (s *ServiceRequirements) RegisterServices(grpcServer *grpc.Server)
func (*ServiceRequirements) ScanKeys ¶ added in v1.48.1
func (s *ServiceRequirements) ScanKeys(*kvstorepb.KvStoreScanKeysRequest, kvstorepb.KvStore_ScanKeysServer) error
func (*ServiceRequirements) Schedule ¶
func (s *ServiceRequirements) Schedule(stream schedulespb.Schedules_ScheduleServer) error
func (*ServiceRequirements) SendMessage ¶ added in v1.48.1
func (s *ServiceRequirements) SendMessage(context.Context, *websocketspb.WebsocketSendRequest) (*websocketspb.WebsocketSendResponse, error)
func (*ServiceRequirements) Serve ¶
func (s *ServiceRequirements) Serve(stream apispb.Api_ServeServer) error
func (*ServiceRequirements) SetValue ¶ added in v1.48.1
func (s *ServiceRequirements) SetValue(context.Context, *kvstorepb.KvStoreSetValueRequest) (*kvstorepb.KvStoreSetValueResponse, error)
func (*ServiceRequirements) SocketDetails ¶ added in v1.48.1
func (s *ServiceRequirements) SocketDetails(context.Context, *websocketspb.WebsocketDetailsRequest) (*websocketspb.WebsocketDetailsResponse, error)
Websockets
func (*ServiceRequirements) Subscribe ¶
func (s *ServiceRequirements) Subscribe(stream topicspb.Subscriber_SubscribeServer) error
func (*ServiceRequirements) WorkerCount ¶
func (s *ServiceRequirements) WorkerCount() int
func (*ServiceRequirements) Write ¶ added in v1.48.1
func (s *ServiceRequirements) Write(context.Context, *storagepb.StorageWriteRequest) (*storagepb.StorageWriteResponse, error)