api

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2022 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterStenosisServiceQueryServer

func RegisterStenosisServiceQueryServer(s *grpc.Server, srv StenosisServiceQueryServer)

Types

type AliveRequest

type AliveRequest struct {
	// Id is the id to be echoed.
	Id                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

AliveRequest contains the id to be echoed by a successful Alive() call.

func (*AliveRequest) Descriptor

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

func (*AliveRequest) GetId

func (m *AliveRequest) GetId() string

func (*AliveRequest) ProtoMessage

func (*AliveRequest) ProtoMessage()

func (*AliveRequest) Reset

func (m *AliveRequest) Reset()

func (*AliveRequest) String

func (m *AliveRequest) String() string

func (*AliveRequest) XXX_DiscardUnknown

func (m *AliveRequest) XXX_DiscardUnknown()

func (*AliveRequest) XXX_Marshal

func (m *AliveRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AliveRequest) XXX_Merge

func (m *AliveRequest) XXX_Merge(src proto.Message)

func (*AliveRequest) XXX_Size

func (m *AliveRequest) XXX_Size() int

func (*AliveRequest) XXX_Unmarshal

func (m *AliveRequest) XXX_Unmarshal(b []byte) error

type AliveResponse

type AliveResponse struct {
	// Id is the echoed id of the preceeding request.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Ok is the fixed string http.StatusText(http.StatusOK)
	Ok                   string   `protobuf:"bytes,2,opt,name=ok,proto3" json:"ok,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

AliveResponse contains the echoed id of a preceeding Alive() request.

func (*AliveResponse) Descriptor

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

func (*AliveResponse) GetId

func (m *AliveResponse) GetId() string

func (*AliveResponse) GetOk

func (m *AliveResponse) GetOk() string

func (*AliveResponse) ProtoMessage

func (*AliveResponse) ProtoMessage()

func (*AliveResponse) Reset

func (m *AliveResponse) Reset()

func (*AliveResponse) String

func (m *AliveResponse) String() string

func (*AliveResponse) XXX_DiscardUnknown

func (m *AliveResponse) XXX_DiscardUnknown()

func (*AliveResponse) XXX_Marshal

func (m *AliveResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AliveResponse) XXX_Merge

func (m *AliveResponse) XXX_Merge(src proto.Message)

func (*AliveResponse) XXX_Size

func (m *AliveResponse) XXX_Size() int

func (*AliveResponse) XXX_Unmarshal

func (m *AliveResponse) XXX_Unmarshal(b []byte) error

type Hateoas

type Hateoas struct {
	// XLinks to avoid mingling with the automatic name assignment while
	// maintaining REST API stability towards DCSO's portal.
	XLinks               []*HateoasLink `protobuf:"bytes,1,rep,name=_links,json=Links,proto3" json:"_links,omitempty"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

Hateoas wraps a slice of (optional) HateoasLinks.

func (*Hateoas) Descriptor

func (*Hateoas) Descriptor() ([]byte, []int)
func (m *Hateoas) GetXLinks() []*HateoasLink

func (*Hateoas) ProtoMessage

func (*Hateoas) ProtoMessage()

func (*Hateoas) Reset

func (m *Hateoas) Reset()

func (*Hateoas) String

func (m *Hateoas) String() string

func (*Hateoas) XXX_DiscardUnknown

func (m *Hateoas) XXX_DiscardUnknown()

func (*Hateoas) XXX_Marshal

func (m *Hateoas) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Hateoas) XXX_Merge

func (m *Hateoas) XXX_Merge(src proto.Message)

func (*Hateoas) XXX_Size

func (m *Hateoas) XXX_Size() int

func (*Hateoas) XXX_Unmarshal

func (m *Hateoas) XXX_Unmarshal(b []byte) error
type HateoasLink struct {
	// Href maps link element can be mapped to an HTTP link.
	Href string `protobuf:"bytes,1,opt,name=href,proto3" json:"href,omitempty"`
	// Rel conveys the relation type.
	Rel string `protobuf:"bytes,2,opt,name=rel,proto3" json:"rel,omitempty"`
	// Type defines the HTTP method for the link element.
	Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
	// Length is an optional element recommended for "enclosure" relations.
	Length               int64    `protobuf:"varint,4,opt,name=length,proto3" json:"length,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

HateoasLink defines a HATEOAS link.

func (*HateoasLink) Descriptor

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

func (*HateoasLink) GetHref

func (m *HateoasLink) GetHref() string

func (*HateoasLink) GetLength

func (m *HateoasLink) GetLength() int64

func (*HateoasLink) GetRel

func (m *HateoasLink) GetRel() string

func (*HateoasLink) GetType

func (m *HateoasLink) GetType() string

func (*HateoasLink) ProtoMessage

func (*HateoasLink) ProtoMessage()

func (*HateoasLink) Reset

func (m *HateoasLink) Reset()

func (*HateoasLink) String

func (m *HateoasLink) String() string

func (*HateoasLink) XXX_DiscardUnknown

func (m *HateoasLink) XXX_DiscardUnknown()

func (*HateoasLink) XXX_Marshal

func (m *HateoasLink) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*HateoasLink) XXX_Merge

func (m *HateoasLink) XXX_Merge(src proto.Message)

func (*HateoasLink) XXX_Size

func (m *HateoasLink) XXX_Size() int

func (*HateoasLink) XXX_Unmarshal

func (m *HateoasLink) XXX_Unmarshal(b []byte) error

type QueryResponse

type QueryResponse struct {
	// Token is the task identifying token in hex encoding.
	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	// Hateoas provides RESTful state optionally fowarded by "gRPC gateway".
	// XLinks to avoid mingling with the automatic name assignment while
	// maintaining REST API stability towards DCSO's portal.
	// This field is subject to the request's omit_additional_data flag.
	XLinks               []*HateoasLink `protobuf:"bytes,2,rep,name=_links,json=Links,proto3" json:"_links,omitempty"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

QueryResponse contains the response to a QueryRequest.

func (*QueryResponse) Descriptor

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

func (*QueryResponse) GetToken

func (m *QueryResponse) GetToken() string
func (m *QueryResponse) GetXLinks() []*HateoasLink

func (*QueryResponse) ProtoMessage

func (*QueryResponse) ProtoMessage()

func (*QueryResponse) Reset

func (m *QueryResponse) Reset()

func (*QueryResponse) String

func (m *QueryResponse) String() string

func (*QueryResponse) XXX_DiscardUnknown

func (m *QueryResponse) XXX_DiscardUnknown()

func (*QueryResponse) XXX_Marshal

func (m *QueryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryResponse) XXX_Merge

func (m *QueryResponse) XXX_Merge(src proto.Message)

func (*QueryResponse) XXX_Size

func (m *QueryResponse) XXX_Size() int

func (*QueryResponse) XXX_Unmarshal

func (m *QueryResponse) XXX_Unmarshal(b []byte) error

type StenosisServiceQueryClient

type StenosisServiceQueryClient interface {
	// Alive checks whether a gRPC server is actively listening to requests by
	// echoing the request id.
	Alive(ctx context.Context, in *AliveRequest, opts ...grpc.CallOption) (*AliveResponse, error)
	// Query forwards a task.Query and responds with an identifying task.Token in
	// return.
	Query(ctx context.Context, in *task.Query, opts ...grpc.CallOption) (*QueryResponse, error)
}

StenosisServiceQueryClient is the client API for StenosisServiceQuery service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewStenosisServiceQueryClient

func NewStenosisServiceQueryClient(cc *grpc.ClientConn) StenosisServiceQueryClient

type StenosisServiceQueryServer

type StenosisServiceQueryServer interface {
	// Alive checks whether a gRPC server is actively listening to requests by
	// echoing the request id.
	Alive(context.Context, *AliveRequest) (*AliveResponse, error)
	// Query forwards a task.Query and responds with an identifying task.Token in
	// return.
	Query(context.Context, *task.Query) (*QueryResponse, error)
}

StenosisServiceQueryServer is the server API for StenosisServiceQuery service.

type UnimplementedStenosisServiceQueryServer

type UnimplementedStenosisServiceQueryServer struct {
}

UnimplementedStenosisServiceQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedStenosisServiceQueryServer) Alive

func (*UnimplementedStenosisServiceQueryServer) Query

Jump to

Keyboard shortcuts

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