csbi

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2021 License: BSD-3-Clause Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	State_name = map[int32]string{
		0: "ANNOUNCED",
		1: "BUILT",
		2: "DEPLOYED",
		3: "RUNNING",
		4: "DECOMMISSIONED",
	}
	State_value = map[string]int32{
		"ANNOUNCED":      0,
		"BUILT":          1,
		"DEPLOYED":       2,
		"RUNNING":        3,
		"DECOMMISSIONED": 4,
	}
)

Enum value maps for State.

View Source
var (
	DeleteResponseStatus_name = map[int32]string{
		0: "OK",
		1: "ERROR",
	}
	DeleteResponseStatus_value = map[string]int32{
		"OK":    0,
		"ERROR": 1,
	}
)

Enum value maps for DeleteResponseStatus.

View Source
var File_gosdn_csbi_csbi_proto protoreflect.FileDescriptor

Functions

func RegisterCsbiServer

func RegisterCsbiServer(s *grpc.Server, srv CsbiServer)

Types

type Ack

type Ack struct {
	Timestamp       int64                      `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch.
	TransportOption *transport.TransportOption `protobuf:"bytes,2,opt,name=TransportOption,proto3" json:"TransportOption,omitempty"`
	// contains filtered or unexported fields
}

func (*Ack) Descriptor deprecated

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

Deprecated: Use Ack.ProtoReflect.Descriptor instead.

func (*Ack) GetTimestamp

func (x *Ack) GetTimestamp() int64

func (*Ack) GetTransportOption

func (x *Ack) GetTransportOption() *transport.TransportOption

func (*Ack) ProtoMessage

func (*Ack) ProtoMessage()

func (*Ack) ProtoReflect

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

func (*Ack) Reset

func (x *Ack) Reset()

func (*Ack) String

func (x *Ack) String() string

type CreateRequest

type CreateRequest struct {
	Timestamp       int64                        `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch.
	TransportOption []*transport.TransportOption `protobuf:"bytes,2,rep,name=TransportOption,proto3" json:"TransportOption,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateRequest) Descriptor deprecated

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

Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.

func (*CreateRequest) GetTimestamp

func (x *CreateRequest) GetTimestamp() int64

func (*CreateRequest) GetTransportOption

func (x *CreateRequest) GetTransportOption() []*transport.TransportOption

func (*CreateRequest) ProtoMessage

func (*CreateRequest) ProtoMessage()

func (*CreateRequest) ProtoReflect

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

func (*CreateRequest) Reset

func (x *CreateRequest) Reset()

func (*CreateRequest) String

func (x *CreateRequest) String() string

type CreateResponse

type CreateResponse struct {
	Timestamp   int64         `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch.
	Deployments []*Deployment `protobuf:"bytes,2,rep,name=deployments,proto3" json:"deployments,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateResponse) Descriptor deprecated

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

Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead.

func (*CreateResponse) GetDeployments

func (x *CreateResponse) GetDeployments() []*Deployment

func (*CreateResponse) GetTimestamp

func (x *CreateResponse) GetTimestamp() int64

func (*CreateResponse) ProtoMessage

func (*CreateResponse) ProtoMessage()

func (*CreateResponse) ProtoReflect

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

func (*CreateResponse) Reset

func (x *CreateResponse) Reset()

func (*CreateResponse) String

func (x *CreateResponse) String() string

type CsbiClient

type CsbiClient interface {
	Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
	Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error)
	Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error)
	Hello(ctx context.Context, in *Syn, opts ...grpc.CallOption) (*Ack, error)
}

CsbiClient is the client API for Csbi 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 NewCsbiClient

func NewCsbiClient(cc grpc.ClientConnInterface) CsbiClient

type CsbiServer

type CsbiServer interface {
	Get(context.Context, *GetRequest) (*GetResponse, error)
	Create(context.Context, *CreateRequest) (*CreateResponse, error)
	Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
	Hello(context.Context, *Syn) (*Ack, error)
	// contains filtered or unexported methods
}

CsbiServer is the server API for Csbi service. All implementations must embed UnimplementedCsbiServer for forward compatibility

type DeleteRequest

type DeleteRequest struct {
	Timestamp int64    `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch.
	Did       []string `protobuf:"bytes,2,rep,name=did,proto3" json:"did,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteRequest) Descriptor deprecated

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

Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.

func (*DeleteRequest) GetDid

func (x *DeleteRequest) GetDid() []string

func (*DeleteRequest) GetTimestamp

func (x *DeleteRequest) GetTimestamp() int64

func (*DeleteRequest) ProtoMessage

func (*DeleteRequest) ProtoMessage()

func (*DeleteRequest) ProtoReflect

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

func (*DeleteRequest) Reset

func (x *DeleteRequest) Reset()

func (*DeleteRequest) String

func (x *DeleteRequest) String() string

type DeleteResponse

type DeleteResponse struct {
	Timestamp int64                `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch.
	Status    DeleteResponseStatus `protobuf:"varint,2,opt,name=Status,proto3,enum=gosdn.csbi.DeleteResponseStatus" json:"Status,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteResponse) Descriptor deprecated

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

Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead.

func (*DeleteResponse) GetStatus

func (x *DeleteResponse) GetStatus() DeleteResponseStatus

func (*DeleteResponse) GetTimestamp

func (x *DeleteResponse) GetTimestamp() int64

func (*DeleteResponse) ProtoMessage

func (*DeleteResponse) ProtoMessage()

func (*DeleteResponse) ProtoReflect

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

func (*DeleteResponse) Reset

func (x *DeleteResponse) Reset()

func (*DeleteResponse) String

func (x *DeleteResponse) String() string

type DeleteResponseStatus

type DeleteResponseStatus int32
const (
	DeleteResponse_OK    DeleteResponseStatus = 0
	DeleteResponse_ERROR DeleteResponseStatus = 1
)

func (DeleteResponseStatus) Descriptor

func (DeleteResponseStatus) Enum

func (DeleteResponseStatus) EnumDescriptor deprecated

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

Deprecated: Use DeleteResponseStatus.Descriptor instead.

func (DeleteResponseStatus) Number

func (DeleteResponseStatus) String

func (x DeleteResponseStatus) String() string

func (DeleteResponseStatus) Type

type Deployment

type Deployment struct {
	Id    string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name  string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	State State  `protobuf:"varint,3,opt,name=state,proto3,enum=gosdn.csbi.State" json:"state,omitempty"`
	// contains filtered or unexported fields
}

func (*Deployment) Descriptor deprecated

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

Deprecated: Use Deployment.ProtoReflect.Descriptor instead.

func (*Deployment) GetId

func (x *Deployment) GetId() string

func (*Deployment) GetName

func (x *Deployment) GetName() string

func (*Deployment) GetState

func (x *Deployment) GetState() State

func (*Deployment) ProtoMessage

func (*Deployment) ProtoMessage()

func (*Deployment) ProtoReflect

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

func (*Deployment) Reset

func (x *Deployment) Reset()

func (*Deployment) String

func (x *Deployment) String() string

type GetRequest

type GetRequest struct {
	Timestamp int64    `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch.
	All       bool     `protobuf:"varint,2,opt,name=all,proto3" json:"all,omitempty"`
	Did       []string `protobuf:"bytes,3,rep,name=did,proto3" json:"did,omitempty"`
	// contains filtered or unexported fields
}

func (*GetRequest) Descriptor deprecated

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

Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.

func (*GetRequest) GetAll

func (x *GetRequest) GetAll() bool

func (*GetRequest) GetDid

func (x *GetRequest) GetDid() []string

func (*GetRequest) GetTimestamp

func (x *GetRequest) GetTimestamp() int64

func (*GetRequest) ProtoMessage

func (*GetRequest) ProtoMessage()

func (*GetRequest) ProtoReflect

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

func (*GetRequest) Reset

func (x *GetRequest) Reset()

func (*GetRequest) String

func (x *GetRequest) String() string

type GetResponse

type GetResponse struct {
	Timestamp   int64         `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch.
	Deployments []*Deployment `protobuf:"bytes,2,rep,name=deployments,proto3" json:"deployments,omitempty"`
	// contains filtered or unexported fields
}

func (*GetResponse) Descriptor deprecated

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

Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.

func (*GetResponse) GetDeployments

func (x *GetResponse) GetDeployments() []*Deployment

func (*GetResponse) GetTimestamp

func (x *GetResponse) GetTimestamp() int64

func (*GetResponse) ProtoMessage

func (*GetResponse) ProtoMessage()

func (*GetResponse) ProtoReflect

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

func (*GetResponse) Reset

func (x *GetResponse) Reset()

func (*GetResponse) String

func (x *GetResponse) String() string

type State

type State int32
const (
	State_ANNOUNCED      State = 0
	State_BUILT          State = 1
	State_DEPLOYED       State = 2
	State_RUNNING        State = 3
	State_DECOMMISSIONED State = 4
)

func (State) Descriptor

func (State) Descriptor() protoreflect.EnumDescriptor

func (State) Enum

func (x State) Enum() *State

func (State) EnumDescriptor deprecated

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

Deprecated: Use State.Descriptor instead.

func (State) Number

func (x State) Number() protoreflect.EnumNumber

func (State) String

func (x State) String() string

func (State) Type

func (State) Type() protoreflect.EnumType

type Syn

type Syn struct {
	Timestamp int64  `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch.
	Id        string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	Address   string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"`
	// contains filtered or unexported fields
}

func (*Syn) Descriptor deprecated

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

Deprecated: Use Syn.ProtoReflect.Descriptor instead.

func (*Syn) GetAddress

func (x *Syn) GetAddress() string

func (*Syn) GetId

func (x *Syn) GetId() string

func (*Syn) GetTimestamp

func (x *Syn) GetTimestamp() int64

func (*Syn) ProtoMessage

func (*Syn) ProtoMessage()

func (*Syn) ProtoReflect

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

func (*Syn) Reset

func (x *Syn) Reset()

func (*Syn) String

func (x *Syn) String() string

type UnimplementedCsbiServer

type UnimplementedCsbiServer struct {
}

UnimplementedCsbiServer must be embedded to have forward compatible implementations.

func (*UnimplementedCsbiServer) Create

func (*UnimplementedCsbiServer) Delete

func (*UnimplementedCsbiServer) Get

func (*UnimplementedCsbiServer) Hello

Jump to

Keyboard shortcuts

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