stencilv1

package
v0.0.0-...-90a5f25 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package stencilv1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var (
	Rule_name = map[int32]string{
		0: "UNKNOWN",
		1: "FILE_NO_BREAKING_CHANGE",
		2: "MESSAGE_NO_DELETE",
		3: "FIELD_NO_BREAKING_CHANGE",
		4: "ENUM_NO_BREAKING_CHANGE",
	}
	Rule_value = map[string]int32{
		"UNKNOWN":                  0,
		"FILE_NO_BREAKING_CHANGE":  1,
		"MESSAGE_NO_DELETE":        2,
		"FIELD_NO_BREAKING_CHANGE": 3,
		"ENUM_NO_BREAKING_CHANGE":  4,
	}
)

Enum value maps for Rule.

View Source
var File_odpf_stencil_v1_stencil_proto protoreflect.FileDescriptor
View Source
var StencilService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "odpf.stencil.v1.StencilService",
	HandlerType: (*StencilServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "UploadDescriptor",
			Handler:    _StencilService_UploadDescriptor_Handler,
		},
		{
			MethodName: "DownloadDescriptor",
			Handler:    _StencilService_DownloadDescriptor_Handler,
		},
		{
			MethodName: "ListSnapshots",
			Handler:    _StencilService_ListSnapshots_Handler,
		},
		{
			MethodName: "PromoteSnapshot",
			Handler:    _StencilService_PromoteSnapshot_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "odpf/stencil/v1/stencil.proto",
}

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

Functions

func RegisterStencilServiceHandler

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

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

func RegisterStencilServiceHandlerClient

func RegisterStencilServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client StencilServiceClient) error

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

func RegisterStencilServiceHandlerFromEndpoint

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

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

func RegisterStencilServiceHandlerServer

func RegisterStencilServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server StencilServiceServer) error

RegisterStencilServiceHandlerServer registers the http handlers for service StencilService to "mux". UnaryRPC :call StencilServiceServer 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 RegisterStencilServiceHandlerFromEndpoint instead.

func RegisterStencilServiceServer

func RegisterStencilServiceServer(s grpc.ServiceRegistrar, srv StencilServiceServer)

Types

type Checks

type Checks struct {
	Except []Rule `protobuf:"varint,2,rep,packed,name=except,proto3,enum=odpf.stencil.v1.Rule" json:"except,omitempty"`
	// contains filtered or unexported fields
}

func (*Checks) Descriptor deprecated

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

Deprecated: Use Checks.ProtoReflect.Descriptor instead.

func (*Checks) GetExcept

func (x *Checks) GetExcept() []Rule

func (*Checks) ProtoMessage

func (*Checks) ProtoMessage()

func (*Checks) ProtoReflect

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

func (*Checks) Reset

func (x *Checks) Reset()

func (*Checks) String

func (x *Checks) String() string

type DownloadDescriptorRequest

type DownloadDescriptorRequest struct {
	Namespace string   `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
	Name      string   `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Version   string   `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
	Fullnames []string `protobuf:"bytes,4,rep,name=fullnames,proto3" json:"fullnames,omitempty"`
	// contains filtered or unexported fields
}

func (*DownloadDescriptorRequest) Descriptor deprecated

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

Deprecated: Use DownloadDescriptorRequest.ProtoReflect.Descriptor instead.

func (*DownloadDescriptorRequest) GetFullnames

func (x *DownloadDescriptorRequest) GetFullnames() []string

func (*DownloadDescriptorRequest) GetName

func (x *DownloadDescriptorRequest) GetName() string

func (*DownloadDescriptorRequest) GetNamespace

func (x *DownloadDescriptorRequest) GetNamespace() string

func (*DownloadDescriptorRequest) GetVersion

func (x *DownloadDescriptorRequest) GetVersion() string

func (*DownloadDescriptorRequest) ProtoMessage

func (*DownloadDescriptorRequest) ProtoMessage()

func (*DownloadDescriptorRequest) ProtoReflect

func (*DownloadDescriptorRequest) Reset

func (x *DownloadDescriptorRequest) Reset()

func (*DownloadDescriptorRequest) String

func (x *DownloadDescriptorRequest) String() string

type DownloadDescriptorResponse

type DownloadDescriptorResponse struct {
	Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*DownloadDescriptorResponse) Descriptor deprecated

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

Deprecated: Use DownloadDescriptorResponse.ProtoReflect.Descriptor instead.

func (*DownloadDescriptorResponse) GetData

func (x *DownloadDescriptorResponse) GetData() []byte

func (*DownloadDescriptorResponse) ProtoMessage

func (*DownloadDescriptorResponse) ProtoMessage()

func (*DownloadDescriptorResponse) ProtoReflect

func (*DownloadDescriptorResponse) Reset

func (x *DownloadDescriptorResponse) Reset()

func (*DownloadDescriptorResponse) String

func (x *DownloadDescriptorResponse) String() string

type ListSnapshotsRequest

type ListSnapshotsRequest struct {
	Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
	Name      string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Version   string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
	Latest    bool   `protobuf:"varint,4,opt,name=latest,proto3" json:"latest,omitempty"`
	// contains filtered or unexported fields
}

func (*ListSnapshotsRequest) Descriptor deprecated

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

Deprecated: Use ListSnapshotsRequest.ProtoReflect.Descriptor instead.

func (*ListSnapshotsRequest) GetLatest

func (x *ListSnapshotsRequest) GetLatest() bool

func (*ListSnapshotsRequest) GetName

func (x *ListSnapshotsRequest) GetName() string

func (*ListSnapshotsRequest) GetNamespace

func (x *ListSnapshotsRequest) GetNamespace() string

func (*ListSnapshotsRequest) GetVersion

func (x *ListSnapshotsRequest) GetVersion() string

func (*ListSnapshotsRequest) ProtoMessage

func (*ListSnapshotsRequest) ProtoMessage()

func (*ListSnapshotsRequest) ProtoReflect

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

func (*ListSnapshotsRequest) Reset

func (x *ListSnapshotsRequest) Reset()

func (*ListSnapshotsRequest) String

func (x *ListSnapshotsRequest) String() string

type ListSnapshotsResponse

type ListSnapshotsResponse struct {
	Snapshots []*Snapshot `protobuf:"bytes,1,rep,name=snapshots,proto3" json:"snapshots,omitempty"`
	// contains filtered or unexported fields
}

func (*ListSnapshotsResponse) Descriptor deprecated

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

Deprecated: Use ListSnapshotsResponse.ProtoReflect.Descriptor instead.

func (*ListSnapshotsResponse) GetSnapshots

func (x *ListSnapshotsResponse) GetSnapshots() []*Snapshot

func (*ListSnapshotsResponse) ProtoMessage

func (*ListSnapshotsResponse) ProtoMessage()

func (*ListSnapshotsResponse) ProtoReflect

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

func (*ListSnapshotsResponse) Reset

func (x *ListSnapshotsResponse) Reset()

func (*ListSnapshotsResponse) String

func (x *ListSnapshotsResponse) String() string

type PromoteSnapshotRequest

type PromoteSnapshotRequest struct {
	Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*PromoteSnapshotRequest) Descriptor deprecated

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

Deprecated: Use PromoteSnapshotRequest.ProtoReflect.Descriptor instead.

func (*PromoteSnapshotRequest) GetId

func (x *PromoteSnapshotRequest) GetId() int64

func (*PromoteSnapshotRequest) ProtoMessage

func (*PromoteSnapshotRequest) ProtoMessage()

func (*PromoteSnapshotRequest) ProtoReflect

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

func (*PromoteSnapshotRequest) Reset

func (x *PromoteSnapshotRequest) Reset()

func (*PromoteSnapshotRequest) String

func (x *PromoteSnapshotRequest) String() string

type PromoteSnapshotResponse

type PromoteSnapshotResponse struct {
	Snapshot *Snapshot `protobuf:"bytes,1,opt,name=snapshot,proto3" json:"snapshot,omitempty"`
	// contains filtered or unexported fields
}

func (*PromoteSnapshotResponse) Descriptor deprecated

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

Deprecated: Use PromoteSnapshotResponse.ProtoReflect.Descriptor instead.

func (*PromoteSnapshotResponse) GetSnapshot

func (x *PromoteSnapshotResponse) GetSnapshot() *Snapshot

func (*PromoteSnapshotResponse) ProtoMessage

func (*PromoteSnapshotResponse) ProtoMessage()

func (*PromoteSnapshotResponse) ProtoReflect

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

func (*PromoteSnapshotResponse) Reset

func (x *PromoteSnapshotResponse) Reset()

func (*PromoteSnapshotResponse) String

func (x *PromoteSnapshotResponse) String() string

type Rule

type Rule int32
const (
	Rule_UNKNOWN                  Rule = 0
	Rule_FILE_NO_BREAKING_CHANGE  Rule = 1
	Rule_MESSAGE_NO_DELETE        Rule = 2
	Rule_FIELD_NO_BREAKING_CHANGE Rule = 3
	Rule_ENUM_NO_BREAKING_CHANGE  Rule = 4
)

func (Rule) Descriptor

func (Rule) Descriptor() protoreflect.EnumDescriptor

func (Rule) Enum

func (x Rule) Enum() *Rule

func (Rule) EnumDescriptor deprecated

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

Deprecated: Use Rule.Descriptor instead.

func (Rule) Number

func (x Rule) Number() protoreflect.EnumNumber

func (Rule) String

func (x Rule) String() string

func (Rule) Type

func (Rule) Type() protoreflect.EnumType

type Snapshot

type Snapshot struct {
	Id        int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
	Name      string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	Version   string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"`
	Latest    bool   `protobuf:"varint,5,opt,name=latest,proto3" json:"latest,omitempty"`
	// contains filtered or unexported fields
}

func (*Snapshot) Descriptor deprecated

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

Deprecated: Use Snapshot.ProtoReflect.Descriptor instead.

func (*Snapshot) GetId

func (x *Snapshot) GetId() int64

func (*Snapshot) GetLatest

func (x *Snapshot) GetLatest() bool

func (*Snapshot) GetName

func (x *Snapshot) GetName() string

func (*Snapshot) GetNamespace

func (x *Snapshot) GetNamespace() string

func (*Snapshot) GetVersion

func (x *Snapshot) GetVersion() string

func (*Snapshot) ProtoMessage

func (*Snapshot) ProtoMessage()

func (*Snapshot) ProtoReflect

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

func (*Snapshot) Reset

func (x *Snapshot) Reset()

func (*Snapshot) String

func (x *Snapshot) String() string

type StencilServiceClient

type StencilServiceClient interface {
	UploadDescriptor(ctx context.Context, in *UploadDescriptorRequest, opts ...grpc.CallOption) (*UploadDescriptorResponse, error)
	DownloadDescriptor(ctx context.Context, in *DownloadDescriptorRequest, opts ...grpc.CallOption) (*DownloadDescriptorResponse, error)
	ListSnapshots(ctx context.Context, in *ListSnapshotsRequest, opts ...grpc.CallOption) (*ListSnapshotsResponse, error)
	// PromoteSnapshot promotes particular snapshot version as latest
	PromoteSnapshot(ctx context.Context, in *PromoteSnapshotRequest, opts ...grpc.CallOption) (*PromoteSnapshotResponse, error)
}

StencilServiceClient is the client API for StencilService 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.

type StencilServiceServer

type StencilServiceServer interface {
	UploadDescriptor(context.Context, *UploadDescriptorRequest) (*UploadDescriptorResponse, error)
	DownloadDescriptor(context.Context, *DownloadDescriptorRequest) (*DownloadDescriptorResponse, error)
	ListSnapshots(context.Context, *ListSnapshotsRequest) (*ListSnapshotsResponse, error)
	// PromoteSnapshot promotes particular snapshot version as latest
	PromoteSnapshot(context.Context, *PromoteSnapshotRequest) (*PromoteSnapshotResponse, error)
	// contains filtered or unexported methods
}

StencilServiceServer is the server API for StencilService service. All implementations must embed UnimplementedStencilServiceServer for forward compatibility

type UnimplementedStencilServiceServer

type UnimplementedStencilServiceServer struct {
}

UnimplementedStencilServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedStencilServiceServer) DownloadDescriptor

func (UnimplementedStencilServiceServer) ListSnapshots

func (UnimplementedStencilServiceServer) PromoteSnapshot

func (UnimplementedStencilServiceServer) UploadDescriptor

type UnsafeStencilServiceServer

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

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

type UploadDescriptorRequest

type UploadDescriptorRequest struct {
	Namespace string  `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
	Name      string  `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Version   string  `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
	Data      []byte  `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
	Latest    bool    `protobuf:"varint,5,opt,name=latest,proto3" json:"latest,omitempty"`
	Dryrun    bool    `protobuf:"varint,6,opt,name=dryrun,proto3" json:"dryrun,omitempty"`
	Checks    *Checks `protobuf:"bytes,7,opt,name=checks,proto3" json:"checks,omitempty"`
	// contains filtered or unexported fields
}

func (*UploadDescriptorRequest) Descriptor deprecated

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

Deprecated: Use UploadDescriptorRequest.ProtoReflect.Descriptor instead.

func (*UploadDescriptorRequest) GetChecks

func (x *UploadDescriptorRequest) GetChecks() *Checks

func (*UploadDescriptorRequest) GetData

func (x *UploadDescriptorRequest) GetData() []byte

func (*UploadDescriptorRequest) GetDryrun

func (x *UploadDescriptorRequest) GetDryrun() bool

func (*UploadDescriptorRequest) GetLatest

func (x *UploadDescriptorRequest) GetLatest() bool

func (*UploadDescriptorRequest) GetName

func (x *UploadDescriptorRequest) GetName() string

func (*UploadDescriptorRequest) GetNamespace

func (x *UploadDescriptorRequest) GetNamespace() string

func (*UploadDescriptorRequest) GetVersion

func (x *UploadDescriptorRequest) GetVersion() string

func (*UploadDescriptorRequest) ProtoMessage

func (*UploadDescriptorRequest) ProtoMessage()

func (*UploadDescriptorRequest) ProtoReflect

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

func (*UploadDescriptorRequest) Reset

func (x *UploadDescriptorRequest) Reset()

func (*UploadDescriptorRequest) String

func (x *UploadDescriptorRequest) String() string

type UploadDescriptorResponse

type UploadDescriptorResponse struct {
	Success bool   `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	Dryrun  bool   `protobuf:"varint,2,opt,name=dryrun,proto3" json:"dryrun,omitempty"`
	Errors  string `protobuf:"bytes,3,opt,name=errors,proto3" json:"errors,omitempty"`
	// contains filtered or unexported fields
}

func (*UploadDescriptorResponse) Descriptor deprecated

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

Deprecated: Use UploadDescriptorResponse.ProtoReflect.Descriptor instead.

func (*UploadDescriptorResponse) GetDryrun

func (x *UploadDescriptorResponse) GetDryrun() bool

func (*UploadDescriptorResponse) GetErrors

func (x *UploadDescriptorResponse) GetErrors() string

func (*UploadDescriptorResponse) GetSuccess

func (x *UploadDescriptorResponse) GetSuccess() bool

func (*UploadDescriptorResponse) ProtoMessage

func (*UploadDescriptorResponse) ProtoMessage()

func (*UploadDescriptorResponse) ProtoReflect

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

func (*UploadDescriptorResponse) Reset

func (x *UploadDescriptorResponse) Reset()

func (*UploadDescriptorResponse) String

func (x *UploadDescriptorResponse) String() string

Jump to

Keyboard shortcuts

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