pb

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2021 License: Apache-2.0 Imports: 25 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Workspace_name = map[int32]string{
		0: "DEV",
		1: "TEST",
		2: "STAGING",
		3: "PROD",
		4: "DEFAULT",
	}
	Workspace_value = map[string]int32{
		"DEV":     0,
		"TEST":    1,
		"STAGING": 2,
		"PROD":    3,
		"DEFAULT": 4,
	}
)

Enum value maps for Workspace.

View Source
var (
	Type_name = map[int32]string{
		0: "DOP",
		1: "MSP",
	}
	Type_value = map[string]int32{
		"DOP": 0,
		"MSP": 1,
	}
)

Enum value maps for Type.

View Source
var File_tenant_proto protoreflect.FileDescriptor

Functions

func RegisterTenantServiceHandler

func RegisterTenantServiceHandler(r http.Router, srv TenantServiceHandler, opts ...http.HandleOption)

RegisterTenantServiceHandler register TenantServiceHandler to http.Router.

func RegisterTenantServiceImp

func RegisterTenantServiceImp(regester transport.Register, srv TenantServiceServer, opts ...transport.ServiceOption)

RegisterTenantServiceImp tenant.proto

func RegisterTenantServiceServer

func RegisterTenantServiceServer(s grpc1.ServiceRegistrar, srv TenantServiceServer, opts ...grpc1.HandleOption)

func ServiceNames

func ServiceNames(svr ...string) []string

ServiceNames return all service names

func TenantServiceClientType

func TenantServiceClientType() reflect.Type

TenantServiceClientType .

func TenantServiceHandlerType

func TenantServiceHandlerType() reflect.Type

TenantServiceHandlerType .

func TenantServiceServerType

func TenantServiceServerType() reflect.Type

TenantServiceServerType .

func Types

func Types() []reflect.Type

Types

type CreateTenantRequest

type CreateTenantRequest struct {
	ProjectID  string   `protobuf:"bytes,1,opt,name=projectID,json=projectId,proto3" json:"projectID,omitempty"`
	TenantType string   `protobuf:"bytes,2,opt,name=tenantType,proto3" json:"tenantType,omitempty"`
	Workspaces []string `protobuf:"bytes,3,rep,name=workspaces,proto3" json:"workspaces,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateTenantRequest) Descriptor deprecated

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

Deprecated: Use CreateTenantRequest.ProtoReflect.Descriptor instead.

func (*CreateTenantRequest) GetProjectID

func (x *CreateTenantRequest) GetProjectID() string

func (*CreateTenantRequest) GetTenantType

func (x *CreateTenantRequest) GetTenantType() string

func (*CreateTenantRequest) GetWorkspaces

func (x *CreateTenantRequest) GetWorkspaces() []string

func (*CreateTenantRequest) MarshalJSON

func (m *CreateTenantRequest) MarshalJSON() ([]byte, error)

CreateTenantRequest implement json.Marshaler.

func (*CreateTenantRequest) ProtoMessage

func (*CreateTenantRequest) ProtoMessage()

func (*CreateTenantRequest) ProtoReflect

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

func (*CreateTenantRequest) Reset

func (x *CreateTenantRequest) Reset()

func (*CreateTenantRequest) String

func (x *CreateTenantRequest) String() string

func (*CreateTenantRequest) UnmarshalJSON

func (m *CreateTenantRequest) UnmarshalJSON(b []byte) error

CreateTenantRequest implement json.Marshaler.

func (*CreateTenantRequest) UnmarshalURLValues

func (m *CreateTenantRequest) UnmarshalURLValues(prefix string, values url.Values) error

CreateTenantRequest implement urlenc.URLValuesUnmarshaler.

func (*CreateTenantRequest) Validate

func (this *CreateTenantRequest) Validate() error

type CreateTenantResponse

type CreateTenantResponse struct {
	Data []*Tenant `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateTenantResponse) Descriptor deprecated

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

Deprecated: Use CreateTenantResponse.ProtoReflect.Descriptor instead.

func (*CreateTenantResponse) GetData

func (x *CreateTenantResponse) GetData() []*Tenant

func (*CreateTenantResponse) MarshalJSON

func (m *CreateTenantResponse) MarshalJSON() ([]byte, error)

CreateTenantResponse implement json.Marshaler.

func (*CreateTenantResponse) ProtoMessage

func (*CreateTenantResponse) ProtoMessage()

func (*CreateTenantResponse) ProtoReflect

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

func (*CreateTenantResponse) Reset

func (x *CreateTenantResponse) Reset()

func (*CreateTenantResponse) String

func (x *CreateTenantResponse) String() string

func (*CreateTenantResponse) UnmarshalJSON

func (m *CreateTenantResponse) UnmarshalJSON(b []byte) error

CreateTenantResponse implement json.Marshaler.

func (*CreateTenantResponse) UnmarshalURLValues

func (m *CreateTenantResponse) UnmarshalURLValues(prefix string, values url.Values) error

CreateTenantResponse implement urlenc.URLValuesUnmarshaler.

func (*CreateTenantResponse) Validate

func (this *CreateTenantResponse) Validate() error

type DeleteTenantRequest

type DeleteTenantRequest struct {
	ProjectID  string `protobuf:"bytes,1,opt,name=projectID,json=projectId,proto3" json:"projectID,omitempty"`
	TenantType string `protobuf:"bytes,2,opt,name=tenantType,proto3" json:"tenantType,omitempty"`
	Workspace  string `protobuf:"bytes,3,opt,name=workspace,proto3" json:"workspace,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteTenantRequest) Descriptor deprecated

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

Deprecated: Use DeleteTenantRequest.ProtoReflect.Descriptor instead.

func (*DeleteTenantRequest) GetProjectID

func (x *DeleteTenantRequest) GetProjectID() string

func (*DeleteTenantRequest) GetTenantType

func (x *DeleteTenantRequest) GetTenantType() string

func (*DeleteTenantRequest) GetWorkspace

func (x *DeleteTenantRequest) GetWorkspace() string

func (*DeleteTenantRequest) MarshalJSON

func (m *DeleteTenantRequest) MarshalJSON() ([]byte, error)

DeleteTenantRequest implement json.Marshaler.

func (*DeleteTenantRequest) ProtoMessage

func (*DeleteTenantRequest) ProtoMessage()

func (*DeleteTenantRequest) ProtoReflect

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

func (*DeleteTenantRequest) Reset

func (x *DeleteTenantRequest) Reset()

func (*DeleteTenantRequest) String

func (x *DeleteTenantRequest) String() string

func (*DeleteTenantRequest) UnmarshalJSON

func (m *DeleteTenantRequest) UnmarshalJSON(b []byte) error

DeleteTenantRequest implement json.Marshaler.

func (*DeleteTenantRequest) UnmarshalURLValues

func (m *DeleteTenantRequest) UnmarshalURLValues(prefix string, values url.Values) error

DeleteTenantRequest implement urlenc.URLValuesUnmarshaler.

func (*DeleteTenantRequest) Validate

func (this *DeleteTenantRequest) Validate() error

type DeleteTenantResponse

type DeleteTenantResponse struct {
	Data *Tenant `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteTenantResponse) Descriptor deprecated

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

Deprecated: Use DeleteTenantResponse.ProtoReflect.Descriptor instead.

func (*DeleteTenantResponse) GetData

func (x *DeleteTenantResponse) GetData() *Tenant

func (*DeleteTenantResponse) MarshalJSON

func (m *DeleteTenantResponse) MarshalJSON() ([]byte, error)

DeleteTenantResponse implement json.Marshaler.

func (*DeleteTenantResponse) ProtoMessage

func (*DeleteTenantResponse) ProtoMessage()

func (*DeleteTenantResponse) ProtoReflect

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

func (*DeleteTenantResponse) Reset

func (x *DeleteTenantResponse) Reset()

func (*DeleteTenantResponse) String

func (x *DeleteTenantResponse) String() string

func (*DeleteTenantResponse) UnmarshalJSON

func (m *DeleteTenantResponse) UnmarshalJSON(b []byte) error

DeleteTenantResponse implement json.Marshaler.

func (*DeleteTenantResponse) UnmarshalURLValues

func (m *DeleteTenantResponse) UnmarshalURLValues(prefix string, values url.Values) error

DeleteTenantResponse implement urlenc.URLValuesUnmarshaler.

func (*DeleteTenantResponse) Validate

func (this *DeleteTenantResponse) Validate() error

type GetTenantRequest

type GetTenantRequest struct {
	ProjectID  string `protobuf:"bytes,1,opt,name=projectID,json=projectId,proto3" json:"projectID,omitempty"`
	TenantType string `protobuf:"bytes,2,opt,name=tenantType,proto3" json:"tenantType,omitempty"`
	Workspace  string `protobuf:"bytes,3,opt,name=workspace,proto3" json:"workspace,omitempty"`
	// contains filtered or unexported fields
}

func (*GetTenantRequest) Descriptor deprecated

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

Deprecated: Use GetTenantRequest.ProtoReflect.Descriptor instead.

func (*GetTenantRequest) GetProjectID

func (x *GetTenantRequest) GetProjectID() string

func (*GetTenantRequest) GetTenantType

func (x *GetTenantRequest) GetTenantType() string

func (*GetTenantRequest) GetWorkspace

func (x *GetTenantRequest) GetWorkspace() string

func (*GetTenantRequest) MarshalJSON

func (m *GetTenantRequest) MarshalJSON() ([]byte, error)

GetTenantRequest implement json.Marshaler.

func (*GetTenantRequest) ProtoMessage

func (*GetTenantRequest) ProtoMessage()

func (*GetTenantRequest) ProtoReflect

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

func (*GetTenantRequest) Reset

func (x *GetTenantRequest) Reset()

func (*GetTenantRequest) String

func (x *GetTenantRequest) String() string

func (*GetTenantRequest) UnmarshalJSON

func (m *GetTenantRequest) UnmarshalJSON(b []byte) error

GetTenantRequest implement json.Marshaler.

func (*GetTenantRequest) UnmarshalURLValues

func (m *GetTenantRequest) UnmarshalURLValues(prefix string, values url.Values) error

GetTenantRequest implement urlenc.URLValuesUnmarshaler.

func (*GetTenantRequest) Validate

func (this *GetTenantRequest) Validate() error

type GetTenantResponse

type GetTenantResponse struct {
	Data *Tenant `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*GetTenantResponse) Descriptor deprecated

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

Deprecated: Use GetTenantResponse.ProtoReflect.Descriptor instead.

func (*GetTenantResponse) GetData

func (x *GetTenantResponse) GetData() *Tenant

func (*GetTenantResponse) MarshalJSON

func (m *GetTenantResponse) MarshalJSON() ([]byte, error)

GetTenantResponse implement json.Marshaler.

func (*GetTenantResponse) ProtoMessage

func (*GetTenantResponse) ProtoMessage()

func (*GetTenantResponse) ProtoReflect

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

func (*GetTenantResponse) Reset

func (x *GetTenantResponse) Reset()

func (*GetTenantResponse) String

func (x *GetTenantResponse) String() string

func (*GetTenantResponse) UnmarshalJSON

func (m *GetTenantResponse) UnmarshalJSON(b []byte) error

GetTenantResponse implement json.Marshaler.

func (*GetTenantResponse) UnmarshalURLValues

func (m *GetTenantResponse) UnmarshalURLValues(prefix string, values url.Values) error

GetTenantResponse implement urlenc.URLValuesUnmarshaler.

func (*GetTenantResponse) Validate

func (this *GetTenantResponse) Validate() error

type Tenant

type Tenant struct {

	// Tenant id
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Tenant type
	Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	// Related project id
	ProjectID string `protobuf:"bytes,3,opt,name=projectID,json=projectId,proto3" json:"projectID,omitempty"`
	// Related deployment workspace
	Workspace string `protobuf:"bytes,4,opt,name=workspace,proto3" json:"workspace,omitempty"`
	// Create timestamp
	CreateTime int64 `protobuf:"varint,5,opt,name=createTime,proto3" json:"createTime,omitempty"`
	// Update timestamp
	UpdateTime int64 `protobuf:"varint,6,opt,name=updateTime,proto3" json:"updateTime,omitempty"`
	// Delete or not
	IsDeleted bool `protobuf:"varint,7,opt,name=isDeleted,proto3" json:"isDeleted,omitempty"`
	// contains filtered or unexported fields
}

Differentiate the actual deployment environment of the service and addon

func (*Tenant) Descriptor deprecated

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

Deprecated: Use Tenant.ProtoReflect.Descriptor instead.

func (*Tenant) GetCreateTime

func (x *Tenant) GetCreateTime() int64

func (*Tenant) GetId

func (x *Tenant) GetId() string

func (*Tenant) GetIsDeleted

func (x *Tenant) GetIsDeleted() bool

func (*Tenant) GetProjectID

func (x *Tenant) GetProjectID() string

func (*Tenant) GetType

func (x *Tenant) GetType() string

func (*Tenant) GetUpdateTime

func (x *Tenant) GetUpdateTime() int64

func (*Tenant) GetWorkspace

func (x *Tenant) GetWorkspace() string

func (*Tenant) MarshalJSON

func (m *Tenant) MarshalJSON() ([]byte, error)

Tenant implement json.Marshaler.

func (*Tenant) ProtoMessage

func (*Tenant) ProtoMessage()

func (*Tenant) ProtoReflect

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

func (*Tenant) Reset

func (x *Tenant) Reset()

func (*Tenant) String

func (x *Tenant) String() string

func (*Tenant) UnmarshalJSON

func (m *Tenant) UnmarshalJSON(b []byte) error

Tenant implement json.Marshaler.

func (*Tenant) UnmarshalURLValues

func (m *Tenant) UnmarshalURLValues(prefix string, values url.Values) error

Tenant implement urlenc.URLValuesUnmarshaler.

func (*Tenant) Validate

func (this *Tenant) Validate() error

type TenantServiceClient

type TenantServiceClient interface {
	CreateTenant(ctx context.Context, in *CreateTenantRequest, opts ...grpc.CallOption) (*CreateTenantResponse, error)
	GetTenant(ctx context.Context, in *GetTenantRequest, opts ...grpc.CallOption) (*GetTenantResponse, error)
	DeleteTenant(ctx context.Context, in *DeleteTenantRequest, opts ...grpc.CallOption) (*DeleteTenantResponse, error)
}

TenantServiceClient is the client API for TenantService 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 TenantServiceHandler

type TenantServiceHandler interface {
	// POST /api/msp/tenant
	CreateTenant(context.Context, *CreateTenantRequest) (*CreateTenantResponse, error)
	// GET /api/msp/tenant
	GetTenant(context.Context, *GetTenantRequest) (*GetTenantResponse, error)
	// DELETE /api/msp/tenant
	DeleteTenant(context.Context, *DeleteTenantRequest) (*DeleteTenantResponse, error)
}

TenantServiceHandler is the server API for TenantService service.

type TenantServiceServer

type TenantServiceServer interface {
	CreateTenant(context.Context, *CreateTenantRequest) (*CreateTenantResponse, error)
	GetTenant(context.Context, *GetTenantRequest) (*GetTenantResponse, error)
	DeleteTenant(context.Context, *DeleteTenantRequest) (*DeleteTenantResponse, error)
}

TenantServiceServer is the server API for TenantService service. All implementations should embed UnimplementedTenantServiceServer for forward compatibility

type Type

type Type int32
const (
	Type_DOP Type = 0
	Type_MSP Type = 1
)

func (Type) Descriptor

func (Type) Descriptor() protoreflect.EnumDescriptor

func (Type) Enum

func (x Type) Enum() *Type

func (Type) EnumDescriptor deprecated

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

Deprecated: Use Type.Descriptor instead.

func (Type) Number

func (x Type) Number() protoreflect.EnumNumber

func (Type) String

func (x Type) String() string

func (Type) Type

func (Type) Type() protoreflect.EnumType

type UnimplementedTenantServiceServer

type UnimplementedTenantServiceServer struct {
}

UnimplementedTenantServiceServer should be embedded to have forward compatible implementations.

func (*UnimplementedTenantServiceServer) CreateTenant

func (*UnimplementedTenantServiceServer) DeleteTenant

func (*UnimplementedTenantServiceServer) GetTenant

type Workspace

type Workspace int32
const (
	Workspace_DEV     Workspace = 0
	Workspace_TEST    Workspace = 1
	Workspace_STAGING Workspace = 2
	Workspace_PROD    Workspace = 3
	Workspace_DEFAULT Workspace = 4
)

func (Workspace) Descriptor

func (Workspace) Descriptor() protoreflect.EnumDescriptor

func (Workspace) Enum

func (x Workspace) Enum() *Workspace

func (Workspace) EnumDescriptor deprecated

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

Deprecated: Use Workspace.Descriptor instead.

func (Workspace) Number

func (x Workspace) Number() protoreflect.EnumNumber

func (Workspace) String

func (x Workspace) String() string

func (Workspace) Type

Jump to

Keyboard shortcuts

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