types

package
v5.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2023 License: Apache-2.0 Imports: 30 Imported by: 3

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	EventTypeRelationshipCreated = "create_relationship"
	EventTypeRelationshipDeleted = "delete_relationship"
	EventTypeBlockUser           = "block_user"
	EventTypeUnblockUser         = "unblock_user"

	AttributeValueCategory            = ModuleName
	AttributeRelationshipCreator      = "creator"
	AttributeRelationshipCounterparty = "counterparty"
	AttributeKeyUserBlockBlocker      = "blocker"
	AttributeKeyUserBlockBlocked      = "blocked"
	AttributeKeySubspace              = "subspace"
)
View Source
const (
	ModuleName = "relationships"
	RouterKey  = ModuleName
	StoreKey   = ModuleName

	ActionCreateRelationship = "create_relationship"
	ActionDeleteRelationship = "delete_relationship"
	ActionBlockUser          = "block_user"
	ActionUnblockUser        = "unblock_user"
)

Variables

View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	RelationshipsStorePrefix = []byte{0x01}
	UsersBlocksStorePrefix   = []byte{0x02}
)
View Source
var (
	ErrInvalidLengthModels        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowModels          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupModels = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthMsgs        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMsgs          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupMsgs = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (

	// AminoCdc references the global x/relationships module codec. Note, the codec should
	// ONLY be used in certain instances of tests and for JSON encoding as Amino is
	// still used for that purpose.
	//
	// The actual codec used for serialization should be provided to x/relationships and
	// defined at the application level.
	AminoCdc = codec.NewAminoCodec(amino)
)

Functions

func BlockerSubspacePrefix

func BlockerSubspacePrefix(subspaceID uint64, blocker string) []byte

BlockerSubspacePrefix returns the store prefix used to store the blocks that the given blocker has created inside the specified subspace

func ContainDuplicatesBlocks

func ContainDuplicatesBlocks(blocks []UserBlock, block UserBlock) bool

ContainDuplicatesBlocks tells whether the given blocks slice contain duplicates of the provided block

func ContainDuplicatesRelationships

func ContainDuplicatesRelationships(relationships []Relationship, relationship Relationship) bool

ContainDuplicatesRelationships tells whether the given relationships slice contain duplicates of the provided relationship

func MustMarshalRelationship

func MustMarshalRelationship(cdc codec.BinaryCodec, relationship Relationship) []byte

MustMarshalRelationship serializes the given relationship using the provided BinaryCodec

func MustMarshalUserBlock

func MustMarshalUserBlock(cdc codec.BinaryCodec, userBlock UserBlock) []byte

MustMarshalUserBlock serializes the given user block using the provided BinaryCodec

func RegisterInterfaces

func RegisterInterfaces(registry types.InterfaceRegistry)

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterQueryHandlerClient

func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error

RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.

func RegisterQueryHandlerFromEndpoint

func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterQueryHandlerServer

func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error

RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

func RelationshipsStoreKey

func RelationshipsStoreKey(user, counterparty string, subspace uint64) []byte

RelationshipsStoreKey returns the store key used to store the relationships containing the given data

func SubspaceBlocksPrefix

func SubspaceBlocksPrefix(subspaceID uint64) []byte

SubspaceBlocksPrefix returns the store prefix used to store the blocks for the given subspace

func SubspaceRelationshipsPrefix

func SubspaceRelationshipsPrefix(subspaceID uint64) []byte

SubspaceRelationshipsPrefix returns the prefix used to store all relationships for the given subspace

func UserBlockStoreKey

func UserBlockStoreKey(blocker, blockedUser string, subspace uint64) []byte

UserBlockStoreKey returns the store key used to save the block made by the given blocker, inside the specified subspace and towards the given blocked user

func UserRelationshipsSubspacePrefix

func UserRelationshipsSubspacePrefix(subspace uint64, user string) []byte

UserRelationshipsSubspacePrefix returns the prefix used to store all the relationships created by the user with the given address for the subspace having the given id

func ValidateGenesis

func ValidateGenesis(data *GenesisState) error

ValidateGenesis validates the given genesis state and returns an error if something is invalid

Types

type GenesisState

type GenesisState struct {
	Relationships []Relationship `protobuf:"bytes,1,rep,name=relationships,proto3" json:"relationships" yaml:"relationships"`
	Blocks        []UserBlock    `protobuf:"bytes,2,rep,name=blocks,proto3" json:"blocks" yaml:"blocks"`
}

GenesisState defines the profiles module's genesis state.

func DefaultGenesisState

func DefaultGenesisState() *GenesisState

DefaultGenesisState returns a default GenesisState

func NewGenesisState

func NewGenesisState(relationships []Relationship, blocks []UserBlock) *GenesisState

NewGenesisState creates a new genesis state

func (*GenesisState) Descriptor

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

func (*GenesisState) Marshal

func (m *GenesisState) Marshal() (dAtA []byte, err error)

func (*GenesisState) MarshalTo

func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)

func (*GenesisState) MarshalToSizedBuffer

func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset

func (m *GenesisState) Reset()

func (*GenesisState) Size

func (m *GenesisState) Size() (n int)

func (*GenesisState) String

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal

func (m *GenesisState) Unmarshal(dAtA []byte) error

func (*GenesisState) XXX_DiscardUnknown

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal

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

func (*GenesisState) XXX_Merge

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

func (*GenesisState) XXX_Size

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal

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

type MsgBlockUser

type MsgBlockUser struct {
	// Address of the user blocking the other user
	Blocker string `protobuf:"bytes,1,opt,name=blocker,proto3" json:"blocker,omitempty" yaml:"blocker"`
	// Address of the user that should be blocked
	Blocked string `protobuf:"bytes,2,opt,name=blocked,proto3" json:"blocked,omitempty" yaml:"blocked"`
	// (optional) Reason why the user has been blocked
	Reason string `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason,omitempty" yaml:"reason"`
	// Id of the subspace inside which the user should be blocked
	SubspaceID uint64 `protobuf:"varint,4,opt,name=subspace_id,json=subspaceId,proto3" json:"subspace_id,omitempty" yaml:"subspace_id"`
}

MsgBlockUser represents a message to block another user specifying an optional reason.

func NewMsgBlockUser

func NewMsgBlockUser(blocker, blocked, reason string, subspaceID uint64) *MsgBlockUser

NewMsgBlockUser returns a new MsgBlockUser instance

func (*MsgBlockUser) Descriptor

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

func (*MsgBlockUser) GetBlocked

func (m *MsgBlockUser) GetBlocked() string

func (*MsgBlockUser) GetBlocker

func (m *MsgBlockUser) GetBlocker() string

func (*MsgBlockUser) GetReason

func (m *MsgBlockUser) GetReason() string

func (MsgBlockUser) GetSignBytes

func (msg MsgBlockUser) GetSignBytes() []byte

GetSignBytes encodes the message for signing

func (MsgBlockUser) GetSigners

func (msg MsgBlockUser) GetSigners() []sdk.AccAddress

GetSigners defines whose signature is required

func (*MsgBlockUser) GetSubspaceID

func (m *MsgBlockUser) GetSubspaceID() uint64

func (*MsgBlockUser) Marshal

func (m *MsgBlockUser) Marshal() (dAtA []byte, err error)

func (*MsgBlockUser) MarshalTo

func (m *MsgBlockUser) MarshalTo(dAtA []byte) (int, error)

func (*MsgBlockUser) MarshalToSizedBuffer

func (m *MsgBlockUser) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgBlockUser) ProtoMessage

func (*MsgBlockUser) ProtoMessage()

func (*MsgBlockUser) Reset

func (m *MsgBlockUser) Reset()

func (MsgBlockUser) Route

func (msg MsgBlockUser) Route() string

Route should return the name of the module

func (*MsgBlockUser) Size

func (m *MsgBlockUser) Size() (n int)

func (*MsgBlockUser) String

func (m *MsgBlockUser) String() string

func (MsgBlockUser) Type

func (msg MsgBlockUser) Type() string

Type should return the action

func (*MsgBlockUser) Unmarshal

func (m *MsgBlockUser) Unmarshal(dAtA []byte) error

func (MsgBlockUser) ValidateBasic

func (msg MsgBlockUser) ValidateBasic() error

ValidateBasic runs stateless checks on the message

func (*MsgBlockUser) XXX_DiscardUnknown

func (m *MsgBlockUser) XXX_DiscardUnknown()

func (*MsgBlockUser) XXX_Marshal

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

func (*MsgBlockUser) XXX_Merge

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

func (*MsgBlockUser) XXX_Size

func (m *MsgBlockUser) XXX_Size() int

func (*MsgBlockUser) XXX_Unmarshal

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

type MsgBlockUserResponse

type MsgBlockUserResponse struct {
}

MsgBlockUserResponse defines the Msg/BlockUser response type.

func (*MsgBlockUserResponse) Descriptor

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

func (*MsgBlockUserResponse) Marshal

func (m *MsgBlockUserResponse) Marshal() (dAtA []byte, err error)

func (*MsgBlockUserResponse) MarshalTo

func (m *MsgBlockUserResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgBlockUserResponse) MarshalToSizedBuffer

func (m *MsgBlockUserResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgBlockUserResponse) ProtoMessage

func (*MsgBlockUserResponse) ProtoMessage()

func (*MsgBlockUserResponse) Reset

func (m *MsgBlockUserResponse) Reset()

func (*MsgBlockUserResponse) Size

func (m *MsgBlockUserResponse) Size() (n int)

func (*MsgBlockUserResponse) String

func (m *MsgBlockUserResponse) String() string

func (*MsgBlockUserResponse) Unmarshal

func (m *MsgBlockUserResponse) Unmarshal(dAtA []byte) error

func (*MsgBlockUserResponse) XXX_DiscardUnknown

func (m *MsgBlockUserResponse) XXX_DiscardUnknown()

func (*MsgBlockUserResponse) XXX_Marshal

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

func (*MsgBlockUserResponse) XXX_Merge

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

func (*MsgBlockUserResponse) XXX_Size

func (m *MsgBlockUserResponse) XXX_Size() int

func (*MsgBlockUserResponse) XXX_Unmarshal

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

type MsgClient

type MsgClient interface {
	// CreateRelationship defines a method for creating a new relationship
	CreateRelationship(ctx context.Context, in *MsgCreateRelationship, opts ...grpc.CallOption) (*MsgCreateRelationshipResponse, error)
	// DeleteRelationship defines a method for deleting a relationship
	DeleteRelationship(ctx context.Context, in *MsgDeleteRelationship, opts ...grpc.CallOption) (*MsgDeleteRelationshipResponse, error)
	// BlockUser defines a method for blocking a user
	BlockUser(ctx context.Context, in *MsgBlockUser, opts ...grpc.CallOption) (*MsgBlockUserResponse, error)
	// UnblockUser defines a method for unblocking a user
	UnblockUser(ctx context.Context, in *MsgUnblockUser, opts ...grpc.CallOption) (*MsgUnblockUserResponse, error)
}

MsgClient is the client API for Msg service.

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

func NewMsgClient

func NewMsgClient(cc grpc1.ClientConn) MsgClient

type MsgCreateRelationship

type MsgCreateRelationship struct {
	// User creating the relationship
	Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty" yaml:"signer"`
	// Counterparty of the relationship (i.e. user to be followed)
	Counterparty string `protobuf:"bytes,2,opt,name=counterparty,proto3" json:"counterparty,omitempty" yaml:"counterparty"`
	// Subspace id inside which the relationship will be valid
	SubspaceID uint64 `protobuf:"varint,3,opt,name=subspace_id,json=subspaceId,proto3" json:"subspace_id,omitempty" yaml:"subspace_id"`
}

MsgCreateRelationship represents a message to create a relationship between two users on a specific subspace.

func NewMsgCreateRelationship

func NewMsgCreateRelationship(signer, counterparty string, subspaceID uint64) *MsgCreateRelationship

NewMsgCreateRelationship returns a new MsgCreateRelationship instance

func (*MsgCreateRelationship) Descriptor

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

func (*MsgCreateRelationship) GetCounterparty

func (m *MsgCreateRelationship) GetCounterparty() string

func (MsgCreateRelationship) GetSignBytes

func (msg MsgCreateRelationship) GetSignBytes() []byte

GetSignBytes encodes the message for signing

func (*MsgCreateRelationship) GetSigner

func (m *MsgCreateRelationship) GetSigner() string

func (MsgCreateRelationship) GetSigners

func (msg MsgCreateRelationship) GetSigners() []sdk.AccAddress

GetSigners defines whose signature is required

func (*MsgCreateRelationship) GetSubspaceID

func (m *MsgCreateRelationship) GetSubspaceID() uint64

func (*MsgCreateRelationship) Marshal

func (m *MsgCreateRelationship) Marshal() (dAtA []byte, err error)

func (*MsgCreateRelationship) MarshalTo

func (m *MsgCreateRelationship) MarshalTo(dAtA []byte) (int, error)

func (*MsgCreateRelationship) MarshalToSizedBuffer

func (m *MsgCreateRelationship) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgCreateRelationship) ProtoMessage

func (*MsgCreateRelationship) ProtoMessage()

func (*MsgCreateRelationship) Reset

func (m *MsgCreateRelationship) Reset()

func (MsgCreateRelationship) Route

func (msg MsgCreateRelationship) Route() string

Route should return the name of the module

func (*MsgCreateRelationship) Size

func (m *MsgCreateRelationship) Size() (n int)

func (*MsgCreateRelationship) String

func (m *MsgCreateRelationship) String() string

func (MsgCreateRelationship) Type

func (msg MsgCreateRelationship) Type() string

Type should return the action

func (*MsgCreateRelationship) Unmarshal

func (m *MsgCreateRelationship) Unmarshal(dAtA []byte) error

func (MsgCreateRelationship) ValidateBasic

func (msg MsgCreateRelationship) ValidateBasic() error

ValidateBasic runs stateless checks on the message

func (*MsgCreateRelationship) XXX_DiscardUnknown

func (m *MsgCreateRelationship) XXX_DiscardUnknown()

func (*MsgCreateRelationship) XXX_Marshal

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

func (*MsgCreateRelationship) XXX_Merge

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

func (*MsgCreateRelationship) XXX_Size

func (m *MsgCreateRelationship) XXX_Size() int

func (*MsgCreateRelationship) XXX_Unmarshal

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

type MsgCreateRelationshipResponse

type MsgCreateRelationshipResponse struct {
}

MsgCreateRelationshipResponse defines the Msg/CreateRelationship response type.

func (*MsgCreateRelationshipResponse) Descriptor

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

func (*MsgCreateRelationshipResponse) Marshal

func (m *MsgCreateRelationshipResponse) Marshal() (dAtA []byte, err error)

func (*MsgCreateRelationshipResponse) MarshalTo

func (m *MsgCreateRelationshipResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgCreateRelationshipResponse) MarshalToSizedBuffer

func (m *MsgCreateRelationshipResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgCreateRelationshipResponse) ProtoMessage

func (*MsgCreateRelationshipResponse) ProtoMessage()

func (*MsgCreateRelationshipResponse) Reset

func (m *MsgCreateRelationshipResponse) Reset()

func (*MsgCreateRelationshipResponse) Size

func (m *MsgCreateRelationshipResponse) Size() (n int)

func (*MsgCreateRelationshipResponse) String

func (*MsgCreateRelationshipResponse) Unmarshal

func (m *MsgCreateRelationshipResponse) Unmarshal(dAtA []byte) error

func (*MsgCreateRelationshipResponse) XXX_DiscardUnknown

func (m *MsgCreateRelationshipResponse) XXX_DiscardUnknown()

func (*MsgCreateRelationshipResponse) XXX_Marshal

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

func (*MsgCreateRelationshipResponse) XXX_Merge

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

func (*MsgCreateRelationshipResponse) XXX_Size

func (m *MsgCreateRelationshipResponse) XXX_Size() int

func (*MsgCreateRelationshipResponse) XXX_Unmarshal

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

type MsgDeleteRelationship

type MsgDeleteRelationship struct {
	// User that created the relationship
	Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty" yaml:"signer"`
	// Counterparty of the relationship that should be deleted
	Counterparty string `protobuf:"bytes,2,opt,name=counterparty,proto3" json:"counterparty,omitempty" yaml:"counterparty"`
	// Id of the subspace inside which the relationship to delete exists
	SubspaceID uint64 `protobuf:"varint,3,opt,name=subspace_id,json=subspaceId,proto3" json:"subspace_id,omitempty" yaml:"subspace_id"`
}

MsgDeleteRelationship represents a message to delete the relationship between two users.

func NewMsgDeleteRelationship

func NewMsgDeleteRelationship(signer, counterparty string, subspaceID uint64) *MsgDeleteRelationship

NewMsgDeleteRelationship returns a new MsgDeleteRelationship instance

func (*MsgDeleteRelationship) Descriptor

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

func (*MsgDeleteRelationship) GetCounterparty

func (m *MsgDeleteRelationship) GetCounterparty() string

func (MsgDeleteRelationship) GetSignBytes

func (msg MsgDeleteRelationship) GetSignBytes() []byte

GetSignBytes encodes the message for signing

func (*MsgDeleteRelationship) GetSigner

func (m *MsgDeleteRelationship) GetSigner() string

func (MsgDeleteRelationship) GetSigners

func (msg MsgDeleteRelationship) GetSigners() []sdk.AccAddress

GetSigners defines whose signature is required

func (*MsgDeleteRelationship) GetSubspaceID

func (m *MsgDeleteRelationship) GetSubspaceID() uint64

func (*MsgDeleteRelationship) Marshal

func (m *MsgDeleteRelationship) Marshal() (dAtA []byte, err error)

func (*MsgDeleteRelationship) MarshalTo

func (m *MsgDeleteRelationship) MarshalTo(dAtA []byte) (int, error)

func (*MsgDeleteRelationship) MarshalToSizedBuffer

func (m *MsgDeleteRelationship) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgDeleteRelationship) ProtoMessage

func (*MsgDeleteRelationship) ProtoMessage()

func (*MsgDeleteRelationship) Reset

func (m *MsgDeleteRelationship) Reset()

func (MsgDeleteRelationship) Route

func (msg MsgDeleteRelationship) Route() string

Route should return the name of the module

func (*MsgDeleteRelationship) Size

func (m *MsgDeleteRelationship) Size() (n int)

func (*MsgDeleteRelationship) String

func (m *MsgDeleteRelationship) String() string

func (MsgDeleteRelationship) Type

func (msg MsgDeleteRelationship) Type() string

Type should return the action

func (*MsgDeleteRelationship) Unmarshal

func (m *MsgDeleteRelationship) Unmarshal(dAtA []byte) error

func (MsgDeleteRelationship) ValidateBasic

func (msg MsgDeleteRelationship) ValidateBasic() error

ValidateBasic runs stateless checks on the message

func (*MsgDeleteRelationship) XXX_DiscardUnknown

func (m *MsgDeleteRelationship) XXX_DiscardUnknown()

func (*MsgDeleteRelationship) XXX_Marshal

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

func (*MsgDeleteRelationship) XXX_Merge

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

func (*MsgDeleteRelationship) XXX_Size

func (m *MsgDeleteRelationship) XXX_Size() int

func (*MsgDeleteRelationship) XXX_Unmarshal

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

type MsgDeleteRelationshipResponse

type MsgDeleteRelationshipResponse struct {
}

MsgDeleteRelationshipResponse defines the Msg/DeleteRelationship response type.

func (*MsgDeleteRelationshipResponse) Descriptor

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

func (*MsgDeleteRelationshipResponse) Marshal

func (m *MsgDeleteRelationshipResponse) Marshal() (dAtA []byte, err error)

func (*MsgDeleteRelationshipResponse) MarshalTo

func (m *MsgDeleteRelationshipResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgDeleteRelationshipResponse) MarshalToSizedBuffer

func (m *MsgDeleteRelationshipResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgDeleteRelationshipResponse) ProtoMessage

func (*MsgDeleteRelationshipResponse) ProtoMessage()

func (*MsgDeleteRelationshipResponse) Reset

func (m *MsgDeleteRelationshipResponse) Reset()

func (*MsgDeleteRelationshipResponse) Size

func (m *MsgDeleteRelationshipResponse) Size() (n int)

func (*MsgDeleteRelationshipResponse) String

func (*MsgDeleteRelationshipResponse) Unmarshal

func (m *MsgDeleteRelationshipResponse) Unmarshal(dAtA []byte) error

func (*MsgDeleteRelationshipResponse) XXX_DiscardUnknown

func (m *MsgDeleteRelationshipResponse) XXX_DiscardUnknown()

func (*MsgDeleteRelationshipResponse) XXX_Marshal

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

func (*MsgDeleteRelationshipResponse) XXX_Merge

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

func (*MsgDeleteRelationshipResponse) XXX_Size

func (m *MsgDeleteRelationshipResponse) XXX_Size() int

func (*MsgDeleteRelationshipResponse) XXX_Unmarshal

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

type MsgServer

type MsgServer interface {
	// CreateRelationship defines a method for creating a new relationship
	CreateRelationship(context.Context, *MsgCreateRelationship) (*MsgCreateRelationshipResponse, error)
	// DeleteRelationship defines a method for deleting a relationship
	DeleteRelationship(context.Context, *MsgDeleteRelationship) (*MsgDeleteRelationshipResponse, error)
	// BlockUser defines a method for blocking a user
	BlockUser(context.Context, *MsgBlockUser) (*MsgBlockUserResponse, error)
	// UnblockUser defines a method for unblocking a user
	UnblockUser(context.Context, *MsgUnblockUser) (*MsgUnblockUserResponse, error)
}

MsgServer is the server API for Msg service.

type MsgUnblockUser

type MsgUnblockUser struct {
	// Address of the user that blocked another user
	Blocker string `protobuf:"bytes,1,opt,name=blocker,proto3" json:"blocker,omitempty" yaml:"blocker"`
	// Address of the user that should be unblocked
	Blocked string `protobuf:"bytes,2,opt,name=blocked,proto3" json:"blocked,omitempty" yaml:"blocked"`
	// Id of the subspace inside which the user should be unblocked
	SubspaceID uint64 `protobuf:"varint,4,opt,name=subspace_id,json=subspaceId,proto3" json:"subspace_id,omitempty" yaml:"subspace_id"`
}

MsgUnblockUser represents a message to unblock a previously blocked user.

func NewMsgUnblockUser

func NewMsgUnblockUser(blocker, blocked string, subspaceID uint64) *MsgUnblockUser

NewMsgUnblockUser returns a new MsgUnblockUser instance

func (*MsgUnblockUser) Descriptor

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

func (*MsgUnblockUser) GetBlocked

func (m *MsgUnblockUser) GetBlocked() string

func (*MsgUnblockUser) GetBlocker

func (m *MsgUnblockUser) GetBlocker() string

func (MsgUnblockUser) GetSignBytes

func (msg MsgUnblockUser) GetSignBytes() []byte

GetSignBytes encodes the message for signing

func (MsgUnblockUser) GetSigners

func (msg MsgUnblockUser) GetSigners() []sdk.AccAddress

GetSigners defines whose signature is required

func (*MsgUnblockUser) GetSubspaceID

func (m *MsgUnblockUser) GetSubspaceID() uint64

func (*MsgUnblockUser) Marshal

func (m *MsgUnblockUser) Marshal() (dAtA []byte, err error)

func (*MsgUnblockUser) MarshalTo

func (m *MsgUnblockUser) MarshalTo(dAtA []byte) (int, error)

func (*MsgUnblockUser) MarshalToSizedBuffer

func (m *MsgUnblockUser) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgUnblockUser) ProtoMessage

func (*MsgUnblockUser) ProtoMessage()

func (*MsgUnblockUser) Reset

func (m *MsgUnblockUser) Reset()

func (MsgUnblockUser) Route

func (msg MsgUnblockUser) Route() string

Route should return the name of the module

func (*MsgUnblockUser) Size

func (m *MsgUnblockUser) Size() (n int)

func (*MsgUnblockUser) String

func (m *MsgUnblockUser) String() string

func (MsgUnblockUser) Type

func (msg MsgUnblockUser) Type() string

Type should return the action

func (*MsgUnblockUser) Unmarshal

func (m *MsgUnblockUser) Unmarshal(dAtA []byte) error

func (MsgUnblockUser) ValidateBasic

func (msg MsgUnblockUser) ValidateBasic() error

ValidateBasic runs stateless checks on the message

func (*MsgUnblockUser) XXX_DiscardUnknown

func (m *MsgUnblockUser) XXX_DiscardUnknown()

func (*MsgUnblockUser) XXX_Marshal

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

func (*MsgUnblockUser) XXX_Merge

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

func (*MsgUnblockUser) XXX_Size

func (m *MsgUnblockUser) XXX_Size() int

func (*MsgUnblockUser) XXX_Unmarshal

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

type MsgUnblockUserResponse

type MsgUnblockUserResponse struct {
}

MsgUnblockUserResponse defines the Msg/UnblockUser response type.

func (*MsgUnblockUserResponse) Descriptor

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

func (*MsgUnblockUserResponse) Marshal

func (m *MsgUnblockUserResponse) Marshal() (dAtA []byte, err error)

func (*MsgUnblockUserResponse) MarshalTo

func (m *MsgUnblockUserResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgUnblockUserResponse) MarshalToSizedBuffer

func (m *MsgUnblockUserResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgUnblockUserResponse) ProtoMessage

func (*MsgUnblockUserResponse) ProtoMessage()

func (*MsgUnblockUserResponse) Reset

func (m *MsgUnblockUserResponse) Reset()

func (*MsgUnblockUserResponse) Size

func (m *MsgUnblockUserResponse) Size() (n int)

func (*MsgUnblockUserResponse) String

func (m *MsgUnblockUserResponse) String() string

func (*MsgUnblockUserResponse) Unmarshal

func (m *MsgUnblockUserResponse) Unmarshal(dAtA []byte) error

func (*MsgUnblockUserResponse) XXX_DiscardUnknown

func (m *MsgUnblockUserResponse) XXX_DiscardUnknown()

func (*MsgUnblockUserResponse) XXX_Marshal

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

func (*MsgUnblockUserResponse) XXX_Merge

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

func (*MsgUnblockUserResponse) XXX_Size

func (m *MsgUnblockUserResponse) XXX_Size() int

func (*MsgUnblockUserResponse) XXX_Unmarshal

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

type QueryBlocksRequest

type QueryBlocksRequest struct {
	// subspace to query the blocks for
	SubspaceId uint64 `protobuf:"varint,1,opt,name=subspace_id,json=subspaceId,proto3" json:"subspace_id,omitempty"`
	// optional address of the blocker to query the blocks for
	Blocker string `protobuf:"bytes,2,opt,name=blocker,proto3" json:"blocker,omitempty"`
	// optional address of the blocked user to query the block for (used only if
	// the blocker is provided)
	Blocked string `protobuf:"bytes,3,opt,name=blocked,proto3" json:"blocked,omitempty"`
	// pagination defines an optional pagination for the request.
	Pagination *query.PageRequest `protobuf:"bytes,4,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryBlocksRequest is the request type for the Query/Blocks RPC endpoint

func NewQueryBlocksRequest

func NewQueryBlocksRequest(
	subspaceID uint64, blocker string, blocked string, pagination *query.PageRequest,
) *QueryBlocksRequest

NewQueryBlocksRequest returns a new QueryBlocksRequest instance

func (*QueryBlocksRequest) Descriptor

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

func (*QueryBlocksRequest) Marshal

func (m *QueryBlocksRequest) Marshal() (dAtA []byte, err error)

func (*QueryBlocksRequest) MarshalTo

func (m *QueryBlocksRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryBlocksRequest) MarshalToSizedBuffer

func (m *QueryBlocksRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryBlocksRequest) ProtoMessage

func (*QueryBlocksRequest) ProtoMessage()

func (*QueryBlocksRequest) Reset

func (m *QueryBlocksRequest) Reset()

func (*QueryBlocksRequest) Size

func (m *QueryBlocksRequest) Size() (n int)

func (*QueryBlocksRequest) String

func (m *QueryBlocksRequest) String() string

func (*QueryBlocksRequest) Unmarshal

func (m *QueryBlocksRequest) Unmarshal(dAtA []byte) error

func (*QueryBlocksRequest) XXX_DiscardUnknown

func (m *QueryBlocksRequest) XXX_DiscardUnknown()

func (*QueryBlocksRequest) XXX_Marshal

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

func (*QueryBlocksRequest) XXX_Merge

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

func (*QueryBlocksRequest) XXX_Size

func (m *QueryBlocksRequest) XXX_Size() int

func (*QueryBlocksRequest) XXX_Unmarshal

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

type QueryBlocksResponse

type QueryBlocksResponse struct {
	Blocks     []UserBlock         `protobuf:"bytes,1,rep,name=blocks,proto3" json:"blocks"`
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryBlocksResponse is the response type for the Query/Blocks RPC method.

func (*QueryBlocksResponse) Descriptor

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

func (*QueryBlocksResponse) GetBlocks

func (m *QueryBlocksResponse) GetBlocks() []UserBlock

func (*QueryBlocksResponse) GetPagination

func (m *QueryBlocksResponse) GetPagination() *query.PageResponse

func (*QueryBlocksResponse) Marshal

func (m *QueryBlocksResponse) Marshal() (dAtA []byte, err error)

func (*QueryBlocksResponse) MarshalTo

func (m *QueryBlocksResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryBlocksResponse) MarshalToSizedBuffer

func (m *QueryBlocksResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryBlocksResponse) ProtoMessage

func (*QueryBlocksResponse) ProtoMessage()

func (*QueryBlocksResponse) Reset

func (m *QueryBlocksResponse) Reset()

func (*QueryBlocksResponse) Size

func (m *QueryBlocksResponse) Size() (n int)

func (*QueryBlocksResponse) String

func (m *QueryBlocksResponse) String() string

func (*QueryBlocksResponse) Unmarshal

func (m *QueryBlocksResponse) Unmarshal(dAtA []byte) error

func (*QueryBlocksResponse) XXX_DiscardUnknown

func (m *QueryBlocksResponse) XXX_DiscardUnknown()

func (*QueryBlocksResponse) XXX_Marshal

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

func (*QueryBlocksResponse) XXX_Merge

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

func (*QueryBlocksResponse) XXX_Size

func (m *QueryBlocksResponse) XXX_Size() int

func (*QueryBlocksResponse) XXX_Unmarshal

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

type QueryClient

type QueryClient interface {
	// Relationships queries all relationships present inside a specific subspace
	Relationships(ctx context.Context, in *QueryRelationshipsRequest, opts ...grpc.CallOption) (*QueryRelationshipsResponse, error)
	// Blocks queries the blocks for the given user, if provided.
	// Otherwise, it queries all the stored blocks.
	Blocks(ctx context.Context, in *QueryBlocksRequest, opts ...grpc.CallOption) (*QueryBlocksResponse, error)
}

QueryClient is the client API for Query service.

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

func NewQueryClient

func NewQueryClient(cc grpc1.ClientConn) QueryClient

type QueryRelationshipsRequest

type QueryRelationshipsRequest struct {
	// subspace to query the relationships for
	SubspaceId uint64 `protobuf:"varint,1,opt,name=subspace_id,json=subspaceId,proto3" json:"subspace_id,omitempty"`
	// optional address of the user for which to query the relationships
	User string `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"`
	// optional address of the counterparty of the relationships (used only if the
	// user is provided)
	Counterparty string `protobuf:"bytes,3,opt,name=counterparty,proto3" json:"counterparty,omitempty"`
	// pagination defines an optional pagination for the request.
	Pagination *query.PageRequest `protobuf:"bytes,4,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryRelationshipsRequest is the request type for the Query/Relationships RPC method.

func NewQueryRelationshipsRequest

func NewQueryRelationshipsRequest(
	subspaceID uint64, user string, counterparty string, pagination *query.PageRequest,
) *QueryRelationshipsRequest

NewQueryRelationshipsRequest returns a new QueryRelationshipsRequest instance

func (*QueryRelationshipsRequest) Descriptor

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

func (*QueryRelationshipsRequest) Marshal

func (m *QueryRelationshipsRequest) Marshal() (dAtA []byte, err error)

func (*QueryRelationshipsRequest) MarshalTo

func (m *QueryRelationshipsRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryRelationshipsRequest) MarshalToSizedBuffer

func (m *QueryRelationshipsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryRelationshipsRequest) ProtoMessage

func (*QueryRelationshipsRequest) ProtoMessage()

func (*QueryRelationshipsRequest) Reset

func (m *QueryRelationshipsRequest) Reset()

func (*QueryRelationshipsRequest) Size

func (m *QueryRelationshipsRequest) Size() (n int)

func (*QueryRelationshipsRequest) String

func (m *QueryRelationshipsRequest) String() string

func (*QueryRelationshipsRequest) Unmarshal

func (m *QueryRelationshipsRequest) Unmarshal(dAtA []byte) error

func (*QueryRelationshipsRequest) XXX_DiscardUnknown

func (m *QueryRelationshipsRequest) XXX_DiscardUnknown()

func (*QueryRelationshipsRequest) XXX_Marshal

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

func (*QueryRelationshipsRequest) XXX_Merge

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

func (*QueryRelationshipsRequest) XXX_Size

func (m *QueryRelationshipsRequest) XXX_Size() int

func (*QueryRelationshipsRequest) XXX_Unmarshal

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

type QueryRelationshipsResponse

type QueryRelationshipsResponse struct {
	Relationships []Relationship      `protobuf:"bytes,1,rep,name=relationships,proto3" json:"relationships"`
	Pagination    *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryRelationshipsResponse is the response type for the Query/Relationships RPC method.

func (*QueryRelationshipsResponse) Descriptor

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

func (*QueryRelationshipsResponse) GetPagination

func (m *QueryRelationshipsResponse) GetPagination() *query.PageResponse

func (*QueryRelationshipsResponse) GetRelationships

func (m *QueryRelationshipsResponse) GetRelationships() []Relationship

func (*QueryRelationshipsResponse) Marshal

func (m *QueryRelationshipsResponse) Marshal() (dAtA []byte, err error)

func (*QueryRelationshipsResponse) MarshalTo

func (m *QueryRelationshipsResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryRelationshipsResponse) MarshalToSizedBuffer

func (m *QueryRelationshipsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryRelationshipsResponse) ProtoMessage

func (*QueryRelationshipsResponse) ProtoMessage()

func (*QueryRelationshipsResponse) Reset

func (m *QueryRelationshipsResponse) Reset()

func (*QueryRelationshipsResponse) Size

func (m *QueryRelationshipsResponse) Size() (n int)

func (*QueryRelationshipsResponse) String

func (m *QueryRelationshipsResponse) String() string

func (*QueryRelationshipsResponse) Unmarshal

func (m *QueryRelationshipsResponse) Unmarshal(dAtA []byte) error

func (*QueryRelationshipsResponse) XXX_DiscardUnknown

func (m *QueryRelationshipsResponse) XXX_DiscardUnknown()

func (*QueryRelationshipsResponse) XXX_Marshal

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

func (*QueryRelationshipsResponse) XXX_Merge

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

func (*QueryRelationshipsResponse) XXX_Size

func (m *QueryRelationshipsResponse) XXX_Size() int

func (*QueryRelationshipsResponse) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	// Relationships queries all relationships present inside a specific subspace
	Relationships(context.Context, *QueryRelationshipsRequest) (*QueryRelationshipsResponse, error)
	// Blocks queries the blocks for the given user, if provided.
	// Otherwise, it queries all the stored blocks.
	Blocks(context.Context, *QueryBlocksRequest) (*QueryBlocksResponse, error)
}

QueryServer is the server API for Query service.

type Relationship

type Relationship struct {
	// Creator represents the creator of the relationship
	Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty" yaml:"creator"`
	// Counterparty represents the other user involved in the relationship
	Counterparty string `protobuf:"bytes,2,opt,name=counterparty,proto3" json:"counterparty,omitempty" yaml:"counterparty"`
	// SubspaceID represents the id of the subspace for which the relationship is
	// valid
	SubspaceID uint64 `protobuf:"varint,3,opt,name=subspace_id,json=subspaceId,proto3" json:"subspace_id,omitempty" yaml:"subspace_id"`
}

Relationship is the struct of a relationship. It represent the concept of "follow" of traditional social networks.

func MustUnmarshalRelationship

func MustUnmarshalRelationship(cdc codec.BinaryCodec, bz []byte) Relationship

MustUnmarshalRelationship deserializes the given byte array as a relationship using the provided BinaryCodec

func NewRelationship

func NewRelationship(user string, counterparty string, subspaceID uint64) Relationship

NewRelationship returns a new relationships with the given recipient and subspace

func (*Relationship) Descriptor

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

func (*Relationship) Equal

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

func (*Relationship) GetCounterparty

func (m *Relationship) GetCounterparty() string

func (*Relationship) GetCreator

func (m *Relationship) GetCreator() string

func (*Relationship) GetSubspaceID

func (m *Relationship) GetSubspaceID() uint64

func (*Relationship) Marshal

func (m *Relationship) Marshal() (dAtA []byte, err error)

func (*Relationship) MarshalTo

func (m *Relationship) MarshalTo(dAtA []byte) (int, error)

func (*Relationship) MarshalToSizedBuffer

func (m *Relationship) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Relationship) ProtoMessage

func (*Relationship) ProtoMessage()

func (*Relationship) Reset

func (m *Relationship) Reset()

func (*Relationship) Size

func (m *Relationship) Size() (n int)

func (*Relationship) String

func (m *Relationship) String() string

func (*Relationship) Unmarshal

func (m *Relationship) Unmarshal(dAtA []byte) error

func (Relationship) Validate

func (r Relationship) Validate() error

Validate implement Validator

func (*Relationship) XXX_DiscardUnknown

func (m *Relationship) XXX_DiscardUnknown()

func (*Relationship) XXX_Marshal

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

func (*Relationship) XXX_Merge

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

func (*Relationship) XXX_Size

func (m *Relationship) XXX_Size() int

func (*Relationship) XXX_Unmarshal

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

type RelationshipsMsg

type RelationshipsMsg struct {
	CreateRelationship *json.RawMessage `json:"create_relationship"`
	DeleteRelationship *json.RawMessage `json:"delete_relationship"`
	BlockUser          *json.RawMessage `json:"block_user"`
	UnblockUser        *json.RawMessage `json:"unblock_user"`
}

type RelationshipsQuery

type RelationshipsQuery struct {
	Relationships *json.RawMessage `json:"relationships"`
	Blocks        *json.RawMessage `json:"blocks"`
}

type SubspacesKeeper

type SubspacesKeeper interface {
	HasSubspace(ctx sdk.Context, subspaceID uint64) bool
}

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) BlockUser

func (*UnimplementedMsgServer) CreateRelationship

func (*UnimplementedMsgServer) DeleteRelationship

func (*UnimplementedMsgServer) UnblockUser

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Blocks

func (*UnimplementedQueryServer) Relationships

type UserBlock

type UserBlock struct {
	// Blocker represents the address of the user blocking another one
	Blocker string `protobuf:"bytes,1,opt,name=blocker,proto3" json:"blocker,omitempty" yaml:"blocker"`
	// Blocked represents the address of the blocked user
	Blocked string `protobuf:"bytes,2,opt,name=blocked,proto3" json:"blocked,omitempty" yaml:"blocked"`
	// Reason represents the optional reason the user has been blocked for.
	Reason string `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason,omitempty" yaml:"reason"`
	// SubspaceID represents the ID of the subspace inside which the user should
	// be blocked
	SubspaceID uint64 `protobuf:"varint,4,opt,name=subspace_id,json=subspaceId,proto3" json:"subspace_id,omitempty" yaml:"subspace_id"`
}

UserBlock represents the fact that the Blocker has blocked the given Blocked user.

func MustUnmarshalUserBlock

func MustUnmarshalUserBlock(cdc codec.BinaryCodec, bz []byte) UserBlock

MustUnmarshalUserBlock deserializes the given byte array as a UserBlock using the provided BinaryCodec

func NewUserBlock

func NewUserBlock(blocker, blocked string, reason string, subspaceID uint64) UserBlock

NewUserBlock returns a new object representing the fact that one user has blocked another one for a specific reason on the given subspace.

func (*UserBlock) Descriptor

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

func (*UserBlock) Equal

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

func (*UserBlock) GetBlocked

func (m *UserBlock) GetBlocked() string

func (*UserBlock) GetBlocker

func (m *UserBlock) GetBlocker() string

func (*UserBlock) GetReason

func (m *UserBlock) GetReason() string

func (*UserBlock) GetSubspaceID

func (m *UserBlock) GetSubspaceID() uint64

func (*UserBlock) Marshal

func (m *UserBlock) Marshal() (dAtA []byte, err error)

func (*UserBlock) MarshalTo

func (m *UserBlock) MarshalTo(dAtA []byte) (int, error)

func (*UserBlock) MarshalToSizedBuffer

func (m *UserBlock) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*UserBlock) ProtoMessage

func (*UserBlock) ProtoMessage()

func (*UserBlock) Reset

func (m *UserBlock) Reset()

func (*UserBlock) Size

func (m *UserBlock) Size() (n int)

func (*UserBlock) String

func (m *UserBlock) String() string

func (*UserBlock) Unmarshal

func (m *UserBlock) Unmarshal(dAtA []byte) error

func (UserBlock) Validate

func (ub UserBlock) Validate() error

Validate implements validator

func (*UserBlock) XXX_DiscardUnknown

func (m *UserBlock) XXX_DiscardUnknown()

func (*UserBlock) XXX_Marshal

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

func (*UserBlock) XXX_Merge

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

func (*UserBlock) XXX_Size

func (m *UserBlock) XXX_Size() int

func (*UserBlock) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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