semaphore_artifacts_v1

package
v0.0.0-...-71d9773 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 22, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package semaphore_artifacts_v1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	ArtifactsService_GenerateSignedURLs_FullMethodName = "/semaphore.artifacts.v1.ArtifactsService/GenerateSignedURLs"
)

Variables

View Source
var (
	GenerateSignedURLsRequest_Type_name = map[int32]string{
		0: "PUSH",
		1: "PUSHFORCE",
		2: "PULL",
		3: "YANK",
	}
	GenerateSignedURLsRequest_Type_value = map[string]int32{
		"PUSH":      0,
		"PUSHFORCE": 1,
		"PULL":      2,
		"YANK":      3,
	}
)

Enum value maps for GenerateSignedURLsRequest_Type.

View Source
var (
	SignedURL_Method_name = map[int32]string{
		0: "DELETE",
		1: "GET",
		2: "HEAD",
		3: "PUT",
		4: "POST",
	}
	SignedURL_Method_value = map[string]int32{
		"DELETE": 0,
		"GET":    1,
		"HEAD":   2,
		"PUT":    3,
		"POST":   4,
	}
)

Enum value maps for SignedURL_Method.

View Source
var ArtifactsService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "semaphore.artifacts.v1.ArtifactsService",
	HandlerType: (*ArtifactsServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GenerateSignedURLs",
			Handler:    _ArtifactsService_GenerateSignedURLs_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "semaphore/artifacts.v1.proto",
}

ArtifactsService_ServiceDesc is the grpc.ServiceDesc for ArtifactsService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_semaphore_artifacts_v1_proto protoreflect.FileDescriptor

Functions

func RegisterArtifactsServiceHandler

func RegisterArtifactsServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterArtifactsServiceHandler registers the http handlers for service ArtifactsService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterArtifactsServiceHandlerClient

func RegisterArtifactsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ArtifactsServiceClient) error

RegisterArtifactsServiceHandlerClient registers the http handlers for service ArtifactsService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ArtifactsServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ArtifactsServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ArtifactsServiceClient" to call the correct interceptors.

func RegisterArtifactsServiceHandlerFromEndpoint

func RegisterArtifactsServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterArtifactsServiceHandlerFromEndpoint is same as RegisterArtifactsServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterArtifactsServiceHandlerServer

func RegisterArtifactsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ArtifactsServiceServer) error

RegisterArtifactsServiceHandlerServer registers the http handlers for service ArtifactsService to "mux". UnaryRPC :call ArtifactsServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterArtifactsServiceHandlerFromEndpoint instead.

func RegisterArtifactsServiceServer

func RegisterArtifactsServiceServer(s grpc.ServiceRegistrar, srv ArtifactsServiceServer)

Types

type ArtifactsServiceClient

type ArtifactsServiceClient interface {
	GenerateSignedURLs(ctx context.Context, in *GenerateSignedURLsRequest, opts ...grpc.CallOption) (*GenerateSignedURLsResponse, error)
}

ArtifactsServiceClient is the client API for ArtifactsService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

all operations are synchronous

type ArtifactsServiceServer

type ArtifactsServiceServer interface {
	GenerateSignedURLs(context.Context, *GenerateSignedURLsRequest) (*GenerateSignedURLsResponse, error)
}

ArtifactsServiceServer is the server API for ArtifactsService service. All implementations should embed UnimplementedArtifactsServiceServer for forward compatibility

all operations are synchronous

type GenerateSignedURLsRequest

type GenerateSignedURLsRequest struct {
	Paths []string                       `protobuf:"bytes,1,rep,name=paths,proto3" json:"paths,omitempty"`
	Type  GenerateSignedURLsRequest_Type `protobuf:"varint,2,opt,name=type,proto3,enum=semaphore.artifacts.v1.GenerateSignedURLsRequest_Type" json:"type,omitempty"`
	// contains filtered or unexported fields
}

Request for Generating signed URLs with the given type. Contains a list of paths as the Google Cloud Storage destination or source based on the action type.

func (*GenerateSignedURLsRequest) Descriptor deprecated

func (*GenerateSignedURLsRequest) Descriptor() ([]byte, []int)

Deprecated: Use GenerateSignedURLsRequest.ProtoReflect.Descriptor instead.

func (*GenerateSignedURLsRequest) GetPaths

func (x *GenerateSignedURLsRequest) GetPaths() []string

func (*GenerateSignedURLsRequest) GetType

func (*GenerateSignedURLsRequest) ProtoMessage

func (*GenerateSignedURLsRequest) ProtoMessage()

func (*GenerateSignedURLsRequest) ProtoReflect

func (*GenerateSignedURLsRequest) Reset

func (x *GenerateSignedURLsRequest) Reset()

func (*GenerateSignedURLsRequest) String

func (x *GenerateSignedURLsRequest) String() string

type GenerateSignedURLsRequest_Type

type GenerateSignedURLsRequest_Type int32
const (
	GenerateSignedURLsRequest_PUSH      GenerateSignedURLsRequest_Type = 0 // gets signed URLs for Push operation without force
	GenerateSignedURLsRequest_PUSHFORCE GenerateSignedURLsRequest_Type = 1 // gets signed URLs for Push operation with force
	GenerateSignedURLsRequest_PULL      GenerateSignedURLsRequest_Type = 2 // gets signed URLs for Pull operation
	GenerateSignedURLsRequest_YANK      GenerateSignedURLsRequest_Type = 3 // gets signed URLs for Yank operation
)

func (GenerateSignedURLsRequest_Type) Descriptor

func (GenerateSignedURLsRequest_Type) Enum

func (GenerateSignedURLsRequest_Type) EnumDescriptor deprecated

func (GenerateSignedURLsRequest_Type) EnumDescriptor() ([]byte, []int)

Deprecated: Use GenerateSignedURLsRequest_Type.Descriptor instead.

func (GenerateSignedURLsRequest_Type) Number

func (GenerateSignedURLsRequest_Type) String

func (GenerateSignedURLsRequest_Type) Type

type GenerateSignedURLsResponse

type GenerateSignedURLsResponse struct {
	URLs []*SignedURL `protobuf:"bytes,1,rep,name=URLs,proto3" json:"URLs,omitempty"`
	// contains filtered or unexported fields
}

Response for GenerateSignedURLs Contains a list of Signed URLs

func (*GenerateSignedURLsResponse) Descriptor deprecated

func (*GenerateSignedURLsResponse) Descriptor() ([]byte, []int)

Deprecated: Use GenerateSignedURLsResponse.ProtoReflect.Descriptor instead.

func (*GenerateSignedURLsResponse) GetURLs

func (x *GenerateSignedURLsResponse) GetURLs() []*SignedURL

func (*GenerateSignedURLsResponse) ProtoMessage

func (*GenerateSignedURLsResponse) ProtoMessage()

func (*GenerateSignedURLsResponse) ProtoReflect

func (*GenerateSignedURLsResponse) Reset

func (x *GenerateSignedURLsResponse) Reset()

func (*GenerateSignedURLsResponse) String

func (x *GenerateSignedURLsResponse) String() string

type SignedURL

type SignedURL struct {
	URL    string           `protobuf:"bytes,1,opt,name=URL,proto3" json:"URL,omitempty"`
	Method SignedURL_Method `protobuf:"varint,2,opt,name=method,proto3,enum=semaphore.artifacts.v1.SignedURL_Method" json:"method,omitempty"`
	// contains filtered or unexported fields
}

Contains an URL and its method type The path on the GCS can be parsed out of it, so it is not needed

func (*SignedURL) Descriptor deprecated

func (*SignedURL) Descriptor() ([]byte, []int)

Deprecated: Use SignedURL.ProtoReflect.Descriptor instead.

func (*SignedURL) GetMethod

func (x *SignedURL) GetMethod() SignedURL_Method

func (*SignedURL) GetURL

func (x *SignedURL) GetURL() string

func (*SignedURL) ProtoMessage

func (*SignedURL) ProtoMessage()

func (*SignedURL) ProtoReflect

func (x *SignedURL) ProtoReflect() protoreflect.Message

func (*SignedURL) Reset

func (x *SignedURL) Reset()

func (*SignedURL) String

func (x *SignedURL) String() string

type SignedURL_Method

type SignedURL_Method int32
const (
	SignedURL_DELETE SignedURL_Method = 0 // deletes storage object or path
	SignedURL_GET    SignedURL_Method = 1 // reads storage object
	SignedURL_HEAD   SignedURL_Method = 2 // queries object or path existance
	SignedURL_PUT    SignedURL_Method = 3 // overwrites storage object
	SignedURL_POST   SignedURL_Method = 4 // concatenates to storage object
)

func (SignedURL_Method) Descriptor

func (SignedURL_Method) Enum

func (SignedURL_Method) EnumDescriptor deprecated

func (SignedURL_Method) EnumDescriptor() ([]byte, []int)

Deprecated: Use SignedURL_Method.Descriptor instead.

func (SignedURL_Method) Number

func (SignedURL_Method) String

func (x SignedURL_Method) String() string

func (SignedURL_Method) Type

type UnimplementedArtifactsServiceServer

type UnimplementedArtifactsServiceServer struct {
}

UnimplementedArtifactsServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedArtifactsServiceServer) GenerateSignedURLs

type UnsafeArtifactsServiceServer

type UnsafeArtifactsServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeArtifactsServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ArtifactsServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL