captain

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_captain_proto protoreflect.FileDescriptor

Functions

func NewCaptainServer

func NewCaptainServer(handler Captain, opts ...CaptainServerOption) http.Handler

Types

type Captain

type Captain interface {
	CreateSpace(context.Context, *CreateSpaceRequest) (*Space, error)
	GetSpace(context.Context, *ID) (*Space, error)
	ListSpaces(context.Context, *SpacesQuery) (*SpacesPage, error)
	DeleteSpace(context.Context, *ID) (*Empty, error)
}

type CaptainClient

type CaptainClient struct {
	ranger.Client
	// contains filtered or unexported fields
}

func NewCaptainClient

func NewCaptainClient(addr string, client ranger.HTTPClient, plugins ...ranger.ClientPlugin) (*CaptainClient, error)

func (*CaptainClient) CreateSpace

func (c *CaptainClient) CreateSpace(ctx context.Context, in *CreateSpaceRequest) (*Space, error)

func (*CaptainClient) DeleteSpace

func (c *CaptainClient) DeleteSpace(ctx context.Context, in *ID) (*Empty, error)

func (*CaptainClient) GetSpace

func (c *CaptainClient) GetSpace(ctx context.Context, in *ID) (*Space, error)

func (*CaptainClient) ListSpaces

func (c *CaptainClient) ListSpaces(ctx context.Context, in *SpacesQuery) (*SpacesPage, error)

type CaptainServer

type CaptainServer struct {
	// contains filtered or unexported fields
}

func (*CaptainServer) CreateSpace

func (p *CaptainServer) CreateSpace(ctx context.Context, reqBytes *[]byte) (pb.Message, error)

func (*CaptainServer) DeleteSpace

func (p *CaptainServer) DeleteSpace(ctx context.Context, reqBytes *[]byte) (pb.Message, error)

func (*CaptainServer) GetSpace

func (p *CaptainServer) GetSpace(ctx context.Context, reqBytes *[]byte) (pb.Message, error)

func (*CaptainServer) ListSpaces

func (p *CaptainServer) ListSpaces(ctx context.Context, reqBytes *[]byte) (pb.Message, error)

type CaptainServerOption

type CaptainServerOption func(s *CaptainServer)

func WithUnknownFieldsForCaptainServer

func WithUnknownFieldsForCaptainServer() CaptainServerOption

type CreateSpaceRequest

type CreateSpaceRequest 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"`
	Mrn          string        `protobuf:"bytes,3,opt,name=mrn,proto3" json:"mrn,omitempty"`
	Organization *Organization `protobuf:"bytes,4,opt,name=organization,proto3" json:"organization,omitempty"`
	// string title = 6;
	// string description = 7;
	OwnerMrn string         `protobuf:"bytes,7,opt,name=ownerMrn,proto3" json:"ownerMrn,omitempty"`
	Settings *SpaceSettings `protobuf:"bytes,8,opt,name=settings,proto3" json:"settings,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateSpaceRequest) Descriptor deprecated

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

Deprecated: Use CreateSpaceRequest.ProtoReflect.Descriptor instead.

func (*CreateSpaceRequest) GetID

func (x *CreateSpaceRequest) GetID() string

func (*CreateSpaceRequest) GetMrn

func (x *CreateSpaceRequest) GetMrn() string

func (*CreateSpaceRequest) GetName

func (x *CreateSpaceRequest) GetName() string

func (*CreateSpaceRequest) GetOrganization

func (x *CreateSpaceRequest) GetOrganization() *Organization

func (*CreateSpaceRequest) GetOwnerMrn

func (x *CreateSpaceRequest) GetOwnerMrn() string

func (*CreateSpaceRequest) GetSettings

func (x *CreateSpaceRequest) GetSettings() *SpaceSettings

func (*CreateSpaceRequest) ProtoMessage

func (*CreateSpaceRequest) ProtoMessage()

func (*CreateSpaceRequest) ProtoReflect

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

func (*CreateSpaceRequest) Reset

func (x *CreateSpaceRequest) Reset()

func (*CreateSpaceRequest) String

func (x *CreateSpaceRequest) String() string

type Empty

type Empty struct {
	// contains filtered or unexported fields
}

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type ID

type ID struct {
	Mrn string `protobuf:"bytes,1,opt,name=mrn,proto3" json:"mrn,omitempty"`
	// contains filtered or unexported fields
}

func (*ID) Descriptor deprecated

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

Deprecated: Use ID.ProtoReflect.Descriptor instead.

func (*ID) GetMrn

func (x *ID) GetMrn() string

func (*ID) ProtoMessage

func (*ID) ProtoMessage()

func (*ID) ProtoReflect

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

func (*ID) Reset

func (x *ID) Reset()

func (*ID) String

func (x *ID) String() string

type Organization

type Organization 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"`
	Mrn          string            `protobuf:"bytes,3,opt,name=mrn,proto3" json:"mrn,omitempty"`
	Capabilities map[string]string `` /* 165-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Organization) Descriptor deprecated

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

Deprecated: Use Organization.ProtoReflect.Descriptor instead.

func (*Organization) GetCapabilities

func (x *Organization) GetCapabilities() map[string]string

func (*Organization) GetID

func (x *Organization) GetID() string

func (*Organization) GetMrn

func (x *Organization) GetMrn() string

func (*Organization) GetName

func (x *Organization) GetName() string

func (*Organization) ProtoMessage

func (*Organization) ProtoMessage()

func (*Organization) ProtoReflect

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

func (*Organization) Reset

func (x *Organization) Reset()

func (*Organization) String

func (x *Organization) String() string

type Space

type Space 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"`
	Mrn          string        `protobuf:"bytes,3,opt,name=mrn,proto3" json:"mrn,omitempty"`
	Organization *Organization `protobuf:"bytes,4,opt,name=organization,proto3" json:"organization,omitempty"`
	// string title = 5;
	// string description = 6;
	Settings *SpaceSettings `protobuf:"bytes,5,opt,name=settings,proto3" json:"settings,omitempty"`
	// contains filtered or unexported fields
}

func (*Space) Descriptor deprecated

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

Deprecated: Use Space.ProtoReflect.Descriptor instead.

func (*Space) GetID

func (x *Space) GetID() string

func (*Space) GetMrn

func (x *Space) GetMrn() string

func (*Space) GetName

func (x *Space) GetName() string

func (*Space) GetOrganization

func (x *Space) GetOrganization() *Organization

func (*Space) GetSettings

func (x *Space) GetSettings() *SpaceSettings

func (*Space) ProtoMessage

func (*Space) ProtoMessage()

func (*Space) ProtoReflect

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

func (*Space) Reset

func (x *Space) Reset()

func (*Space) String

func (x *Space) String() string

type SpaceSettings

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

func (*SpaceSettings) Descriptor deprecated

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

Deprecated: Use SpaceSettings.ProtoReflect.Descriptor instead.

func (*SpaceSettings) GetTerminatedAssetsConfiguration

func (x *SpaceSettings) GetTerminatedAssetsConfiguration() *TerminatedAssetsConfiguration

func (*SpaceSettings) ProtoMessage

func (*SpaceSettings) ProtoMessage()

func (*SpaceSettings) ProtoReflect

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

func (*SpaceSettings) Reset

func (x *SpaceSettings) Reset()

func (*SpaceSettings) String

func (x *SpaceSettings) String() string

type SpacesPage

type SpacesPage struct {
	Page *api.PageInfo `protobuf:"bytes,1,opt,name=page,proto3" json:"page,omitempty"`
	List []*Space      `protobuf:"bytes,2,rep,name=list,proto3" json:"list,omitempty"`
	// contains filtered or unexported fields
}

func (*SpacesPage) Descriptor deprecated

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

Deprecated: Use SpacesPage.ProtoReflect.Descriptor instead.

func (*SpacesPage) GetList

func (x *SpacesPage) GetList() []*Space

func (*SpacesPage) GetPage

func (x *SpacesPage) GetPage() *api.PageInfo

func (*SpacesPage) ProtoMessage

func (*SpacesPage) ProtoMessage()

func (*SpacesPage) ProtoReflect

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

func (*SpacesPage) Reset

func (x *SpacesPage) Reset()

func (*SpacesPage) String

func (x *SpacesPage) String() string

type SpacesQuery

type SpacesQuery struct {
	Page            *api.PageRequest `protobuf:"bytes,1,opt,name=page,proto3" json:"page,omitempty"`
	OrganizationMrn string           `protobuf:"bytes,2,opt,name=organizationMrn,proto3" json:"organizationMrn,omitempty"`
	// contains filtered or unexported fields
}

func (*SpacesQuery) Descriptor deprecated

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

Deprecated: Use SpacesQuery.ProtoReflect.Descriptor instead.

func (*SpacesQuery) GetOrganizationMrn

func (x *SpacesQuery) GetOrganizationMrn() string

func (*SpacesQuery) GetPage

func (x *SpacesQuery) GetPage() *api.PageRequest

func (*SpacesQuery) ProtoMessage

func (*SpacesQuery) ProtoMessage()

func (*SpacesQuery) ProtoReflect

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

func (*SpacesQuery) Reset

func (x *SpacesQuery) Reset()

func (*SpacesQuery) String

func (x *SpacesQuery) String() string

type TerminatedAssetsConfiguration

type TerminatedAssetsConfiguration struct {
	Cleanup bool  `protobuf:"varint,1,opt,name=cleanup,proto3" json:"cleanup,omitempty"`
	After   int32 `protobuf:"varint,2,opt,name=after,proto3" json:"after,omitempty"`
	// contains filtered or unexported fields
}

func (*TerminatedAssetsConfiguration) Descriptor deprecated

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

Deprecated: Use TerminatedAssetsConfiguration.ProtoReflect.Descriptor instead.

func (*TerminatedAssetsConfiguration) GetAfter

func (x *TerminatedAssetsConfiguration) GetAfter() int32

func (*TerminatedAssetsConfiguration) GetCleanup

func (x *TerminatedAssetsConfiguration) GetCleanup() bool

func (*TerminatedAssetsConfiguration) ProtoMessage

func (*TerminatedAssetsConfiguration) ProtoMessage()

func (*TerminatedAssetsConfiguration) ProtoReflect

func (*TerminatedAssetsConfiguration) Reset

func (x *TerminatedAssetsConfiguration) Reset()

func (*TerminatedAssetsConfiguration) String

Jump to

Keyboard shortcuts

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