model

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: May 17, 2020 License: Apache-2.0 Imports: 12 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ArcDataFormat_name = map[int32]string{
		0: "JSON",
		1: "ARC",
		2: "PUML",
	}
	ArcDataFormat_value = map[string]int32{
		"JSON": 0,
		"ARC":  1,
		"PUML": 2,
	}
)

Enum value maps for ArcDataFormat.

View Source
var (
	PresentationPerspective_name = map[int32]string{
		0: "CONTEXT",
		1: "CONTAINER",
		2: "COMPONENT",
		4: "CODE",
		5: "LANDSCAPE",
	}
	PresentationPerspective_value = map[string]int32{
		"CONTEXT":   0,
		"CONTAINER": 1,
		"COMPONENT": 2,
		"CODE":      4,
		"LANDSCAPE": 5,
	}
)

Enum value maps for PresentationPerspective.

View Source
var (
	ArcVisualFormat_name = map[int32]string{
		0: "PNG",
		1: "SVG",
		3: "PDF",
	}
	ArcVisualFormat_value = map[string]int32{
		"PNG": 0,
		"SVG": 1,
		"PDF": 3,
	}
)

Enum value maps for ArcVisualFormat.

View Source
var File_model_proto protoreflect.FileDescriptor

Functions

func RegisterArcVizServer

func RegisterArcVizServer(s *grpc.Server, srv ArcVizServer)

Types

type ArcDataFormat

type ArcDataFormat int32
const (
	ArcDataFormat_JSON ArcDataFormat = 0
	ArcDataFormat_ARC  ArcDataFormat = 1
	ArcDataFormat_PUML ArcDataFormat = 2
)

func (ArcDataFormat) Descriptor

func (ArcDataFormat) Enum

func (x ArcDataFormat) Enum() *ArcDataFormat

func (ArcDataFormat) EnumDescriptor deprecated

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

Deprecated: Use ArcDataFormat.Descriptor instead.

func (ArcDataFormat) Number

func (ArcDataFormat) String

func (x ArcDataFormat) String() string

func (ArcDataFormat) Type

type ArcPresentation

type ArcPresentation struct {

	//Format of the presentation
	Format ArcVisualFormat `protobuf:"varint,1,opt,name=format,proto3,enum=model.ArcVisualFormat" json:"format,omitempty"`
	//Serialized raw data to be shared
	Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*ArcPresentation) Descriptor deprecated

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

Deprecated: Use ArcPresentation.ProtoReflect.Descriptor instead.

func (*ArcPresentation) GetData

func (x *ArcPresentation) GetData() []byte

func (*ArcPresentation) GetFormat

func (x *ArcPresentation) GetFormat() ArcVisualFormat

func (*ArcPresentation) ProtoMessage

func (*ArcPresentation) ProtoMessage()

func (*ArcPresentation) ProtoReflect

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

func (*ArcPresentation) Reset

func (x *ArcPresentation) Reset()

func (*ArcPresentation) String

func (x *ArcPresentation) String() string

type ArcType

type ArcType struct {
	App             string           `yaml:"app"`
	Desc            string           `yaml:"desc"`
	Users           []User           `yaml:"users"`
	InternalSystems []InternalSystem `yaml:"internal-systems"`
	ExternalSystems []ExternalSystem `yaml:"external-systems"`
	Relations       []Relation       `yaml:"relations"`
}

ArcType is the core data structure of a software architecture

func (*ArcType) Decode

func (a *ArcType) Decode(inData []byte) error

Decode struct to byte

func (*ArcType) Encode

func (a *ArcType) Encode() ([]byte, error)

Encode struct to byte

type ArcVisualFormat

type ArcVisualFormat int32
const (
	ArcVisualFormat_PNG ArcVisualFormat = 0
	ArcVisualFormat_SVG ArcVisualFormat = 1
	ArcVisualFormat_PDF ArcVisualFormat = 3
)

func (ArcVisualFormat) Descriptor

func (ArcVisualFormat) Enum

func (x ArcVisualFormat) Enum() *ArcVisualFormat

func (ArcVisualFormat) EnumDescriptor deprecated

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

Deprecated: Use ArcVisualFormat.Descriptor instead.

func (ArcVisualFormat) Number

func (ArcVisualFormat) String

func (x ArcVisualFormat) String() string

func (ArcVisualFormat) Type

type ArcVizClient

type ArcVizClient interface {
	//Render serve the presentation given the raw data and type
	Render(ctx context.Context, in *RenderRequest, opts ...grpc.CallOption) (*ArcPresentation, error)
}

ArcVizClient is the client API for ArcViz service.

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

func NewArcVizClient

func NewArcVizClient(cc grpc.ClientConnInterface) ArcVizClient

type ArcVizServer

type ArcVizServer interface {
	//Render serve the presentation given the raw data and type
	Render(context.Context, *RenderRequest) (*ArcPresentation, error)
}

ArcVizServer is the server API for ArcViz service.

type Component

type Component struct {
	Name string `yaml:"name"`
	Role string `yaml:"role"`
	Desc string `yaml:"desc"`
	Code string `yaml:"code"`
}

Component represent a Component that make up the implementation of a software running in a Container

type Container

type Container struct {
	Name       string      `yaml:"name"`
	Role       string      `yaml:"role"`
	Desc       string      `yaml:"desc"`
	Runtime    string      `yaml:"runtime"`
	Technology string      `yaml:"technology"`
	Components []Component `yaml:"components"`
}

Container represent a Container software runtime

type ExternalSystem

type ExternalSystem struct {
	Name string `yaml:"name"`
	Role string `yaml:"role"`
	Desc string `yaml:"desc"`
}

ExternalSystem represent an external software system

type InternalSystem

type InternalSystem struct {
	Name       string      `yaml:"name"`
	Role       string      `yaml:"role"`
	Desc       string      `yaml:"desc"`
	Containers []Container `yaml:"containers"`
}

InternalSystem represent a software system in the application

type PresentationPerspective

type PresentationPerspective int32
const (
	PresentationPerspective_CONTEXT   PresentationPerspective = 0
	PresentationPerspective_CONTAINER PresentationPerspective = 1
	PresentationPerspective_COMPONENT PresentationPerspective = 2
	PresentationPerspective_CODE      PresentationPerspective = 4
	PresentationPerspective_LANDSCAPE PresentationPerspective = 5
)

func (PresentationPerspective) Descriptor

func (PresentationPerspective) Enum

func (PresentationPerspective) EnumDescriptor deprecated

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

Deprecated: Use PresentationPerspective.Descriptor instead.

func (PresentationPerspective) Number

func (PresentationPerspective) String

func (x PresentationPerspective) String() string

func (PresentationPerspective) Type

type Relation

type Relation struct {
	Subject string `yaml:"s"`
	Pointer string `yaml:"p"`
	Object  string `yaml:"o"`
}

Relation represent a relationship path between different elements

type RenderRequest

type RenderRequest struct {

	//Type of the data
	DataFormat ArcDataFormat `protobuf:"varint,1,opt,name=dataFormat,proto3,enum=model.ArcDataFormat" json:"dataFormat,omitempty"`
	//visualFormat of the render request
	VisualFormat ArcVisualFormat `protobuf:"varint,2,opt,name=visualFormat,proto3,enum=model.ArcVisualFormat" json:"visualFormat,omitempty"`
	//data is the raw serialized byte array of the arc data type
	Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	//perspective specify the level of architecture view to render
	Perspective PresentationPerspective `protobuf:"varint,4,opt,name=perspective,proto3,enum=model.PresentationPerspective" json:"perspective,omitempty"`
	//target specify the specific element to render
	Target []string `protobuf:"bytes,5,rep,name=target,proto3" json:"target,omitempty"`
	// contains filtered or unexported fields
}

func (*RenderRequest) Descriptor deprecated

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

Deprecated: Use RenderRequest.ProtoReflect.Descriptor instead.

func (*RenderRequest) GetData

func (x *RenderRequest) GetData() []byte

func (*RenderRequest) GetDataFormat

func (x *RenderRequest) GetDataFormat() ArcDataFormat

func (*RenderRequest) GetPerspective

func (x *RenderRequest) GetPerspective() PresentationPerspective

func (*RenderRequest) GetTarget

func (x *RenderRequest) GetTarget() []string

func (*RenderRequest) GetVisualFormat

func (x *RenderRequest) GetVisualFormat() ArcVisualFormat

func (*RenderRequest) ProtoMessage

func (*RenderRequest) ProtoMessage()

func (*RenderRequest) ProtoReflect

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

func (*RenderRequest) Reset

func (x *RenderRequest) Reset()

func (*RenderRequest) String

func (x *RenderRequest) String() string

type UnimplementedArcVizServer

type UnimplementedArcVizServer struct {
}

UnimplementedArcVizServer can be embedded to have forward compatible implementations.

func (*UnimplementedArcVizServer) Render

type User

type User struct {
	Name string `yaml:"name"`
	Role string `yaml:"role"`
	Desc string `yaml:"desc"`
}

User represent a person who use some software

Jump to

Keyboard shortcuts

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