ownership

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Ownership_Resource_name = map[int32]string{
	0: "None",
	1: "Service",
	2: "Process",
	3: "Runner",
}
View Source
var Ownership_Resource_value = map[string]int32{
	"None":    0,
	"Service": 1,
	"Process": 2,
	"Runner":  3,
}

Functions

This section is empty.

Types

type Ownership

type Ownership struct {
	// Service's hash.
	Hash github_com_mesg_foundation_engine_hash.Hash `` /* 148-byte string literal not displayed */
	// The owner of the resource.
	// TODO: to transform to accAddress
	Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty" hash:"name:2" validate:"required"`
	// Resource's hash.
	ResourceHash github_com_mesg_foundation_engine_hash.Hash `` /* 169-byte string literal not displayed */
	// Resource's type.
	Resource Ownership_Resource `protobuf:"varint,4,opt,name=resource,proto3,enum=mesg.types.Ownership_Resource" json:"resource,omitempty" validate:"required"`
	// The address of the resource.
	ResourceAddress      github_com_cosmos_cosmos_sdk_types.AccAddress `` /* 178-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}                                      `json:"-"`
	XXX_unrecognized     []byte                                        `json:"-"`
	XXX_sizecache        int32                                         `json:"-"`
}

Ownership is a ownership relation between one owner and a resource.

func New added in v0.21.0

func New(owner string, resource Ownership_Resource, resourceHash hash.Hash, resourceAddress sdk.AccAddress) (*Ownership, error)

New returns a new ownership and validate it.

func (*Ownership) Descriptor

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

func (*Ownership) Equal

func (this *Ownership) Equal(that interface{}) bool

func (*Ownership) ProtoMessage

func (*Ownership) ProtoMessage()

func (*Ownership) Reset

func (m *Ownership) Reset()

func (*Ownership) String

func (m *Ownership) String() string

func (*Ownership) XXX_DiscardUnknown

func (m *Ownership) XXX_DiscardUnknown()

func (*Ownership) XXX_Marshal

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

func (*Ownership) XXX_Merge

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

func (*Ownership) XXX_Size

func (m *Ownership) XXX_Size() int

func (*Ownership) XXX_Unmarshal

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

type Ownership_Resource added in v0.18.0

type Ownership_Resource int32
const (
	Ownership_None    Ownership_Resource = 0
	Ownership_Service Ownership_Resource = 1
	Ownership_Process Ownership_Resource = 2
	Ownership_Runner  Ownership_Resource = 3
)

func (Ownership_Resource) EnumDescriptor added in v0.18.0

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

func (Ownership_Resource) String added in v0.18.0

func (x Ownership_Resource) String() string

Jump to

Keyboard shortcuts

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