Documentation ¶
Overview ¶
Package sign provides implementations for servers which can sign Go release artifacts.
Index ¶
- type BuildType
- type Service
- type SigningServer
- func (rs *SigningServer) ArtifactSigningStatus(ctx context.Context, jobID string) (_ Status, desc string, objectURI []string, _ error)
- func (rs *SigningServer) CancelSigning(ctx context.Context, jobID string) error
- func (rs *SigningServer) SignArtifact(ctx context.Context, bt BuildType, objectURI []string) (jobID string, _ error)
- func (rs *SigningServer) UpdateSigningStatus(stream protos.ReleaseService_UpdateSigningStatusServer) error
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service interface { // SignArtifact creates a request to sign a release artifact. // The object URI must be URIs for file(s) on the service private GCS. SignArtifact(ctx context.Context, bt BuildType, objectURI []string) (jobID string, _ error) // ArtifactSigningStatus retrieves the status of an existing signing request, // or an error indicating that the status couldn't be determined. // If the status is completed, objectURI will be populated with the URIs for signed files in GCS. ArtifactSigningStatus(ctx context.Context, jobID string) (_ Status, description string, objectURI []string, _ error) // CancelSigning marks a previous signing request as no longer needed, // possibly allowing resources to be freed sooner than otherwise. CancelSigning(ctx context.Context, jobID string) error }
Service is an interface for a release artifact signing service.
Each call blocks until either the request has been acknowledged or the passed in context has been canceled. Setting a timeout on the context is recommended.
type SigningServer ¶
type SigningServer struct { protos.UnimplementedReleaseServiceServer // contains filtered or unexported fields }
SigningServer is a GRPC signing server used to send signing requests and signing status requests to a client.
func NewServer ¶
func NewServer() *SigningServer
NewServer creates a GRPC signing server used to send signing requests and signing status requests to a client.
func (*SigningServer) ArtifactSigningStatus ¶
func (rs *SigningServer) ArtifactSigningStatus(ctx context.Context, jobID string) (_ Status, desc string, objectURI []string, _ error)
ArtifactSigningStatus implements Service.
func (*SigningServer) CancelSigning ¶
func (rs *SigningServer) CancelSigning(ctx context.Context, jobID string) error
CancelSigning implements Service.
func (*SigningServer) SignArtifact ¶
func (rs *SigningServer) SignArtifact(ctx context.Context, bt BuildType, objectURI []string) (jobID string, _ error)
SignArtifact implements Service.
func (*SigningServer) UpdateSigningStatus ¶
func (rs *SigningServer) UpdateSigningStatus(stream protos.ReleaseService_UpdateSigningStatusServer) error
UpdateSigningStatus uses a bidirectional streaming connection to send signing requests to the client and receive status updates on signing requests. There is no specific order which the requests or responses need to occur in. The connection returns an error once the context is canceled or an error is encountered.