oss

package
v0.0.0-...-7aae7b9 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppName = "oss"
)

Variables

View Source
var File_apps_oss_pb_oss_proto protoreflect.FileDescriptor
View Source
var File_apps_oss_pb_rpc_proto protoreflect.FileDescriptor
View Source
var Service_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "infraboard.cmdb.oss.Service",
	HandlerType: (*ServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SyncBucket",
			Handler:    _Service_SyncBucket_Handler,
		},
		{
			MethodName: "QueryBucket",
			Handler:    _Service_QueryBucket_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "apps/oss/pb/rpc.proto",
}

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

Functions

func RegisterServiceServer

func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)

Types

type Bucket

type Bucket struct {

	// @gotags: json:"resource"
	Resource *resource.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource"`
	// @gotags: json:"describe"
	Describe *Describe `protobuf:"bytes,3,opt,name=describe,proto3" json:"describe"`
	// contains filtered or unexported fields
}

func NewDefaultBucket

func NewDefaultBucket() *Bucket

func (*Bucket) Descriptor deprecated

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

Deprecated: Use Bucket.ProtoReflect.Descriptor instead.

func (*Bucket) GetDescribe

func (x *Bucket) GetDescribe() *Describe

func (*Bucket) GetResource

func (x *Bucket) GetResource() *resource.Resource

func (*Bucket) ProtoMessage

func (*Bucket) ProtoMessage()

func (*Bucket) ProtoReflect

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

func (*Bucket) Reset

func (x *Bucket) Reset()

func (*Bucket) String

func (x *Bucket) String() string

type BucketSet

type BucketSet struct {

	// 总数量
	// @gotags: json:"total"
	Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total"`
	// 列表项
	// @gotags: json:"items"
	Items []*Bucket `protobuf:"bytes,2,rep,name=items,proto3" json:"items"`
	// contains filtered or unexported fields
}

func NewBucketSet

func NewBucketSet() *BucketSet

func (*BucketSet) Add

func (s *BucketSet) Add(items ...any)

func (*BucketSet) AddSet

func (s *BucketSet) AddSet(set *BucketSet)

func (*BucketSet) Descriptor deprecated

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

Deprecated: Use BucketSet.ProtoReflect.Descriptor instead.

func (*BucketSet) GetItems

func (x *BucketSet) GetItems() []*Bucket

func (*BucketSet) GetTotal

func (x *BucketSet) GetTotal() int64

func (*BucketSet) Length

func (s *BucketSet) Length() int64

func (*BucketSet) ProtoMessage

func (*BucketSet) ProtoMessage()

func (*BucketSet) ProtoReflect

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

func (*BucketSet) Reset

func (x *BucketSet) Reset()

func (*BucketSet) String

func (x *BucketSet) String() string

func (*BucketSet) ToAny

func (s *BucketSet) ToAny() (items []any)

type Describe

type Describe struct {

	// 存储类型
	// @gotags: json:"storage_class"
	StorageClass string `protobuf:"bytes,1,opt,name=storage_class,json=storageClass,proto3" json:"storage_class"`
	// contains filtered or unexported fields
}

func (*Describe) Descriptor deprecated

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

Deprecated: Use Describe.ProtoReflect.Descriptor instead.

func (*Describe) GetStorageClass

func (x *Describe) GetStorageClass() string

func (*Describe) ProtoMessage

func (*Describe) ProtoMessage()

func (*Describe) ProtoReflect

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

func (*Describe) Reset

func (x *Describe) Reset()

func (*Describe) String

func (x *Describe) String() string

type QueryBucketRequest

type QueryBucketRequest struct {

	// 分页参数
	// @gotags: json:"page"
	Page *request.PageRequest `protobuf:"bytes,1,opt,name=page,proto3" json:"page"`
	// contains filtered or unexported fields
}

func (*QueryBucketRequest) Descriptor deprecated

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

Deprecated: Use QueryBucketRequest.ProtoReflect.Descriptor instead.

func (*QueryBucketRequest) GetPage

func (x *QueryBucketRequest) GetPage() *request.PageRequest

func (*QueryBucketRequest) ProtoMessage

func (*QueryBucketRequest) ProtoMessage()

func (*QueryBucketRequest) ProtoReflect

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

func (*QueryBucketRequest) Reset

func (x *QueryBucketRequest) Reset()

func (*QueryBucketRequest) String

func (x *QueryBucketRequest) String() string

type ServiceClient

type ServiceClient interface {
	SyncBucket(ctx context.Context, in *Bucket, opts ...grpc.CallOption) (*Bucket, error)
	QueryBucket(ctx context.Context, in *QueryBucketRequest, opts ...grpc.CallOption) (*BucketSet, error)
}

ServiceClient is the client API for Service 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.

func NewServiceClient

func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient

type ServiceServer

type ServiceServer interface {
	SyncBucket(context.Context, *Bucket) (*Bucket, error)
	QueryBucket(context.Context, *QueryBucketRequest) (*BucketSet, error)
	// contains filtered or unexported methods
}

ServiceServer is the server API for Service service. All implementations must embed UnimplementedServiceServer for forward compatibility

type UnimplementedServiceServer

type UnimplementedServiceServer struct {
}

UnimplementedServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedServiceServer) QueryBucket

func (UnimplementedServiceServer) SyncBucket

type UnsafeServiceServer

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

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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