types

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	EventTypeCreateService            = "create_service"
	EventTypeUpdateService            = "update_service"
	EventTypeActivateService          = "activate_service"
	EventTypeDeactivateService        = "deactivate_service"
	EventTypeDeleteService            = "delete_service"
	EventTypeTransferServiceOwnership = "transfer_service_ownership"
	EventTypeSetServiceParams         = "set_service_params"

	AttributeKeyServiceID = "service_id"
	AttributeKeyNewAdmin  = "new_admin"
)
View Source
const (
	ModuleName = "services"
	StoreKey   = ModuleName

	DoNotModify = "[do-not-modify]"
)

Variables

View Source
var (
	ErrServiceNotFound      = errors.Wrap(sdkerrors.ErrNotFound, "service not found")
	ErrInvalidGenesis       = errors.Register(ModuleName, 1, "invalid genesis state")
	ErrInsufficientShares   = errors.Register(ModuleName, 2, "insufficient delegation shares")
	ErrServiceAlreadyActive = errors.Register(ModuleName, 3, "service is already active")
	ErrServiceNotActive     = errors.Register(ModuleName, 4, "service is not active")
	ErrServiceIsActive      = errors.Register(ModuleName, 5, "service is active")
)
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 (
	ParamsKey = []byte{0x01}

	NextServiceIDKey        = []byte{0xa1}
	ServicePrefix           = []byte{0xa2}
	ServiceAddressSetPrefix = collections.NewPrefix(0xa3)
)
View Source
var (
	ErrInvalidLengthMessages        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMessages          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupMessages = fmt.Errorf("proto: unexpected end of group")
)
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 (
	ErrInvalidLengthParams        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowParams          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupParams = 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 = codec.NewLegacyAmino()

AminoCdc references the global x/services 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/services and defined at the application level.

View Source
var ServiceStatus_name = map[int32]string{
	0: "SERVICE_STATUS_UNSPECIFIED",
	1: "SERVICE_STATUS_CREATED",
	2: "SERVICE_STATUS_ACTIVE",
	3: "SERVICE_STATUS_INACTIVE",
}
View Source
var ServiceStatus_value = map[string]int32{
	"SERVICE_STATUS_UNSPECIFIED": 0,
	"SERVICE_STATUS_CREATED":     1,
	"SERVICE_STATUS_ACTIVE":      2,
	"SERVICE_STATUS_INACTIVE":    3,
}

Functions

func GetServiceAddress

func GetServiceAddress(serviceID uint32) sdk.AccAddress

GetServiceAddress generates a service address from its id

func GetServiceIDBytes

func GetServiceIDBytes(serviceID uint32) (serviceIDBz []byte)

GetServiceIDBytes returns the byte representation of the service ID

func GetServiceIDFromBytes

func GetServiceIDFromBytes(bz []byte) (serviceID uint32)

GetServiceIDFromBytes returns the service ID from a byte array

func ParseServiceID

func ParseServiceID(value string) (uint32, error)

ParseServiceID parses a string into a uint32

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 ServiceStoreKey

func ServiceStoreKey(serviceID uint32) []byte

ServiceStoreKey turns a service ID into a key used to store a service in the KVStore

Types

type AccountKeeper

type AccountKeeper interface {
	NewAccountWithAddress(ctx context.Context, addr sdk.AccAddress) sdk.AccountI
	HasAccount(ctx context.Context, addr sdk.AccAddress) bool
	SetAccount(ctx context.Context, acc sdk.AccountI)
}

type CommunityPoolKeeper

type CommunityPoolKeeper interface {
	FundCommunityPool(ctx context.Context, amount sdk.Coins, sender sdk.AccAddress) error
}

type GenesisState

type GenesisState struct {
	// Params defines the parameters of the module.
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
	// Services defines the list of services.
	Services []Service `protobuf:"bytes,2,rep,name=services,proto3" json:"services" yaml:"services"`
	// NextServiceID defines the ID that will be assigned to the
	// next service that gets created.
	NextServiceID uint32 `protobuf:"varint,3,opt,name=next_service_id,json=nextServiceId,proto3" json:"next_service_id,omitempty"`
}

GenesisState defines the services module's genesis state.

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis returns a default GenesisState

func NewGenesisState

func NewGenesisState(nextServiceID uint32, services []Service, params Params) *GenesisState

NewGenesisState returns a new GenesisState instance

func (*GenesisState) Descriptor

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

func (*GenesisState) GetNextServiceID

func (m *GenesisState) GetNextServiceID() uint32

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() Params

func (*GenesisState) GetServices

func (m *GenesisState) GetServices() []Service

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) Validate

func (data *GenesisState) Validate() error

Validate validates the GenesisState and returns an error if it is invalid.

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 MsgActivateService

type MsgActivateService struct {
	// Sender is the address of the user that wants to activate the service
	Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
	// ServiceID represents the ID of the service to be activated
	ServiceID uint32 `protobuf:"varint,2,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"`
}

MsgActivateService defines the message structure for the ActivateService gRPC

func NewMsgActivateService

func NewMsgActivateService(serviceID uint32, sender string) *MsgActivateService

NewMsgActivateService creates a new MsgActivateService instance

func (*MsgActivateService) Descriptor

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

func (*MsgActivateService) GetSender

func (m *MsgActivateService) GetSender() string

func (*MsgActivateService) GetServiceID

func (m *MsgActivateService) GetServiceID() uint32

func (*MsgActivateService) GetSignBytes

func (msg *MsgActivateService) GetSignBytes() []byte

GetSignBytes implements sdk.Msg

func (*MsgActivateService) GetSigners

func (msg *MsgActivateService) GetSigners() []sdk.AccAddress

GetSigners implements sdk.Msg

func (*MsgActivateService) Marshal

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

func (*MsgActivateService) MarshalTo

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

func (*MsgActivateService) MarshalToSizedBuffer

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

func (*MsgActivateService) ProtoMessage

func (*MsgActivateService) ProtoMessage()

func (*MsgActivateService) Reset

func (m *MsgActivateService) Reset()

func (*MsgActivateService) Size

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

func (*MsgActivateService) String

func (m *MsgActivateService) String() string

func (*MsgActivateService) Unmarshal

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

func (*MsgActivateService) ValidateBasic

func (msg *MsgActivateService) ValidateBasic() error

ValidateBasic implements sdk.Msg

func (*MsgActivateService) XXX_DiscardUnknown

func (m *MsgActivateService) XXX_DiscardUnknown()

func (*MsgActivateService) XXX_Marshal

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

func (*MsgActivateService) XXX_Merge

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

func (*MsgActivateService) XXX_Size

func (m *MsgActivateService) XXX_Size() int

func (*MsgActivateService) XXX_Unmarshal

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

type MsgActivateServiceResponse

type MsgActivateServiceResponse struct {
}

MsgActivateServiceResponse is the return value of MsgActivateService.

func (*MsgActivateServiceResponse) Descriptor

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

func (*MsgActivateServiceResponse) Marshal

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

func (*MsgActivateServiceResponse) MarshalTo

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

func (*MsgActivateServiceResponse) MarshalToSizedBuffer

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

func (*MsgActivateServiceResponse) ProtoMessage

func (*MsgActivateServiceResponse) ProtoMessage()

func (*MsgActivateServiceResponse) Reset

func (m *MsgActivateServiceResponse) Reset()

func (*MsgActivateServiceResponse) Size

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

func (*MsgActivateServiceResponse) String

func (m *MsgActivateServiceResponse) String() string

func (*MsgActivateServiceResponse) Unmarshal

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

func (*MsgActivateServiceResponse) XXX_DiscardUnknown

func (m *MsgActivateServiceResponse) XXX_DiscardUnknown()

func (*MsgActivateServiceResponse) XXX_Marshal

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

func (*MsgActivateServiceResponse) XXX_Merge

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

func (*MsgActivateServiceResponse) XXX_Size

func (m *MsgActivateServiceResponse) XXX_Size() int

func (*MsgActivateServiceResponse) XXX_Unmarshal

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

type MsgClient

type MsgClient interface {
	// CreateService defines the operation for registering a new service.
	CreateService(ctx context.Context, in *MsgCreateService, opts ...grpc.CallOption) (*MsgCreateServiceResponse, error)
	// UpdateService defines the operation for updating an existing service.
	UpdateService(ctx context.Context, in *MsgUpdateService, opts ...grpc.CallOption) (*MsgUpdateServiceResponse, error)
	// ActivateService defines the operation for activating an existing
	// service.
	ActivateService(ctx context.Context, in *MsgActivateService, opts ...grpc.CallOption) (*MsgActivateServiceResponse, error)
	// DeactivateService defines the operation for deactivating an existing
	// service.
	DeactivateService(ctx context.Context, in *MsgDeactivateService, opts ...grpc.CallOption) (*MsgDeactivateServiceResponse, error)
	// DeleteService defines the operation for deleting an existing service
	// that has been deactivated.
	DeleteService(ctx context.Context, in *MsgDeleteService, opts ...grpc.CallOption) (*MsgDeleteServiceResponse, error)
	// TransferServiceOwnership defines the operation for transferring the
	// ownership of a service to another account.
	TransferServiceOwnership(ctx context.Context, in *MsgTransferServiceOwnership, opts ...grpc.CallOption) (*MsgTransferServiceOwnershipResponse, error)
	// UpdateParams defines a (governance) operation for updating the module
	// parameters.
	// The authority defaults to the x/gov module account.
	UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, 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 MsgCreateService

type MsgCreateService struct {
	// Sender is the address of the user registering the service
	Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
	// Name is the name of the service
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty" yaml:"name"`
	// Description is the description of the service
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty" yaml:"description"`
	// Website is the website of the service
	Website string `protobuf:"bytes,4,opt,name=website,proto3" json:"website,omitempty" yaml:"website"`
	// PictureURL is the URL of the service picture
	PictureURL string `protobuf:"bytes,5,opt,name=picture_url,json=pictureUrl,proto3" json:"picture_url,omitempty" yaml:"picture_url"`
}

MsgCreateServiceResponse defines the message structure for the CreateService gRPC service method. It allows an account to register a new service that can be validated by operators. It requires a sender address as well as the details of the service to be registered.

func NewMsgCreateService

func NewMsgCreateService(name, description, website, pictureURL, sender string) *MsgCreateService

NewMsgCreateService creates a new MsgCreateService instance

func (*MsgCreateService) Descriptor

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

func (*MsgCreateService) GetDescription

func (m *MsgCreateService) GetDescription() string

func (*MsgCreateService) GetName

func (m *MsgCreateService) GetName() string

func (*MsgCreateService) GetPictureURL

func (m *MsgCreateService) GetPictureURL() string

func (*MsgCreateService) GetSender

func (m *MsgCreateService) GetSender() string

func (*MsgCreateService) GetSignBytes

func (msg *MsgCreateService) GetSignBytes() []byte

GetSignBytes implements sdk.Msg

func (*MsgCreateService) GetSigners

func (msg *MsgCreateService) GetSigners() []sdk.AccAddress

GetSigners implements sdk.Msg

func (*MsgCreateService) GetWebsite

func (m *MsgCreateService) GetWebsite() string

func (*MsgCreateService) Marshal

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

func (*MsgCreateService) MarshalTo

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

func (*MsgCreateService) MarshalToSizedBuffer

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

func (*MsgCreateService) ProtoMessage

func (*MsgCreateService) ProtoMessage()

func (*MsgCreateService) Reset

func (m *MsgCreateService) Reset()

func (*MsgCreateService) Size

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

func (*MsgCreateService) String

func (m *MsgCreateService) String() string

func (*MsgCreateService) Unmarshal

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

func (*MsgCreateService) ValidateBasic

func (msg *MsgCreateService) ValidateBasic() error

ValidateBasic implements sdk.Msg

func (*MsgCreateService) XXX_DiscardUnknown

func (m *MsgCreateService) XXX_DiscardUnknown()

func (*MsgCreateService) XXX_Marshal

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

func (*MsgCreateService) XXX_Merge

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

func (*MsgCreateService) XXX_Size

func (m *MsgCreateService) XXX_Size() int

func (*MsgCreateService) XXX_Unmarshal

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

type MsgCreateServiceResponse

type MsgCreateServiceResponse struct {
	// NewServiceID is the ID of the newly registered service
	NewServiceID uint32 `protobuf:"varint,1,opt,name=new_service_id,json=newServiceId,proto3" json:"new_service_id,omitempty"`
}

MsgCreateServiceResponse is the return value of MsgCreateService. It returns the newly created service ID.

func (*MsgCreateServiceResponse) Descriptor

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

func (*MsgCreateServiceResponse) GetNewServiceID

func (m *MsgCreateServiceResponse) GetNewServiceID() uint32

func (*MsgCreateServiceResponse) Marshal

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

func (*MsgCreateServiceResponse) MarshalTo

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

func (*MsgCreateServiceResponse) MarshalToSizedBuffer

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

func (*MsgCreateServiceResponse) ProtoMessage

func (*MsgCreateServiceResponse) ProtoMessage()

func (*MsgCreateServiceResponse) Reset

func (m *MsgCreateServiceResponse) Reset()

func (*MsgCreateServiceResponse) Size

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

func (*MsgCreateServiceResponse) String

func (m *MsgCreateServiceResponse) String() string

func (*MsgCreateServiceResponse) Unmarshal

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

func (*MsgCreateServiceResponse) XXX_DiscardUnknown

func (m *MsgCreateServiceResponse) XXX_DiscardUnknown()

func (*MsgCreateServiceResponse) XXX_Marshal

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

func (*MsgCreateServiceResponse) XXX_Merge

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

func (*MsgCreateServiceResponse) XXX_Size

func (m *MsgCreateServiceResponse) XXX_Size() int

func (*MsgCreateServiceResponse) XXX_Unmarshal

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

type MsgDeactivateService

type MsgDeactivateService struct {
	// Sender is the address of the user that wants to deactivate the service
	Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
	// ServiceID represents the ID of the service to be deactivated
	ServiceID uint32 `protobuf:"varint,2,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"`
}

MsgDeactivateService defines the message structure for the DeactivateService gRPC service method. It allows the service admin to deactivate an existing service.

func NewMsgDeactivateService

func NewMsgDeactivateService(serviceID uint32, sender string) *MsgDeactivateService

NewMsgDeactivateService creates a new MsgDeactivateService instance

func (*MsgDeactivateService) Descriptor

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

func (*MsgDeactivateService) GetSender

func (m *MsgDeactivateService) GetSender() string

func (*MsgDeactivateService) GetServiceID

func (m *MsgDeactivateService) GetServiceID() uint32

func (*MsgDeactivateService) GetSignBytes

func (msg *MsgDeactivateService) GetSignBytes() []byte

GetSignBytes implements sdk.Msg

func (*MsgDeactivateService) GetSigners

func (msg *MsgDeactivateService) GetSigners() []sdk.AccAddress

GetSigners implements sdk.Msg

func (*MsgDeactivateService) Marshal

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

func (*MsgDeactivateService) MarshalTo

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

func (*MsgDeactivateService) MarshalToSizedBuffer

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

func (*MsgDeactivateService) ProtoMessage

func (*MsgDeactivateService) ProtoMessage()

func (*MsgDeactivateService) Reset

func (m *MsgDeactivateService) Reset()

func (*MsgDeactivateService) Size

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

func (*MsgDeactivateService) String

func (m *MsgDeactivateService) String() string

func (*MsgDeactivateService) Unmarshal

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

func (*MsgDeactivateService) ValidateBasic

func (msg *MsgDeactivateService) ValidateBasic() error

ValidateBasic implements sdk.Msg

func (*MsgDeactivateService) XXX_DiscardUnknown

func (m *MsgDeactivateService) XXX_DiscardUnknown()

func (*MsgDeactivateService) XXX_Marshal

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

func (*MsgDeactivateService) XXX_Merge

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

func (*MsgDeactivateService) XXX_Size

func (m *MsgDeactivateService) XXX_Size() int

func (*MsgDeactivateService) XXX_Unmarshal

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

type MsgDeactivateServiceResponse

type MsgDeactivateServiceResponse struct {
}

MsgDeactivateServiceResponse is the return value of MsgDeactivateService.

func (*MsgDeactivateServiceResponse) Descriptor

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

func (*MsgDeactivateServiceResponse) Marshal

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

func (*MsgDeactivateServiceResponse) MarshalTo

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

func (*MsgDeactivateServiceResponse) MarshalToSizedBuffer

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

func (*MsgDeactivateServiceResponse) ProtoMessage

func (*MsgDeactivateServiceResponse) ProtoMessage()

func (*MsgDeactivateServiceResponse) Reset

func (m *MsgDeactivateServiceResponse) Reset()

func (*MsgDeactivateServiceResponse) Size

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

func (*MsgDeactivateServiceResponse) String

func (*MsgDeactivateServiceResponse) Unmarshal

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

func (*MsgDeactivateServiceResponse) XXX_DiscardUnknown

func (m *MsgDeactivateServiceResponse) XXX_DiscardUnknown()

func (*MsgDeactivateServiceResponse) XXX_Marshal

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

func (*MsgDeactivateServiceResponse) XXX_Merge

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

func (*MsgDeactivateServiceResponse) XXX_Size

func (m *MsgDeactivateServiceResponse) XXX_Size() int

func (*MsgDeactivateServiceResponse) XXX_Unmarshal

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

type MsgDeleteService added in v1.3.0

type MsgDeleteService struct {
	// Sender is the address of the user that wants to delete the service
	Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
	// ServiceID represents the ID of the service to be deleted
	ServiceID uint32 `protobuf:"varint,2,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"`
}

MsgDeleteService defines the message structure for the DeleteService gRPC service method. It allows the service admin to delete a previously deactivated service

func NewMsgDeleteService added in v1.3.0

func NewMsgDeleteService(serviceID uint32, sender string) *MsgDeleteService

NewMsgDeleteService creates a new MsgDeleteService instance.

func (*MsgDeleteService) Descriptor added in v1.3.0

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

func (*MsgDeleteService) GetSender added in v1.3.0

func (m *MsgDeleteService) GetSender() string

func (*MsgDeleteService) GetServiceID added in v1.3.0

func (m *MsgDeleteService) GetServiceID() uint32

func (*MsgDeleteService) Marshal added in v1.3.0

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

func (*MsgDeleteService) MarshalTo added in v1.3.0

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

func (*MsgDeleteService) MarshalToSizedBuffer added in v1.3.0

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

func (*MsgDeleteService) ProtoMessage added in v1.3.0

func (*MsgDeleteService) ProtoMessage()

func (*MsgDeleteService) Reset added in v1.3.0

func (m *MsgDeleteService) Reset()

func (*MsgDeleteService) Size added in v1.3.0

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

func (*MsgDeleteService) String added in v1.3.0

func (m *MsgDeleteService) String() string

func (*MsgDeleteService) Unmarshal added in v1.3.0

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

func (*MsgDeleteService) ValidateBasic added in v1.3.0

func (msg *MsgDeleteService) ValidateBasic() error

func (*MsgDeleteService) XXX_DiscardUnknown added in v1.3.0

func (m *MsgDeleteService) XXX_DiscardUnknown()

func (*MsgDeleteService) XXX_Marshal added in v1.3.0

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

func (*MsgDeleteService) XXX_Merge added in v1.3.0

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

func (*MsgDeleteService) XXX_Size added in v1.3.0

func (m *MsgDeleteService) XXX_Size() int

func (*MsgDeleteService) XXX_Unmarshal added in v1.3.0

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

type MsgDeleteServiceResponse added in v1.3.0

type MsgDeleteServiceResponse struct {
}

MsgDeleteServiceResponse is the return value of MsgDeleteService.

func (*MsgDeleteServiceResponse) Descriptor added in v1.3.0

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

func (*MsgDeleteServiceResponse) Marshal added in v1.3.0

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

func (*MsgDeleteServiceResponse) MarshalTo added in v1.3.0

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

func (*MsgDeleteServiceResponse) MarshalToSizedBuffer added in v1.3.0

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

func (*MsgDeleteServiceResponse) ProtoMessage added in v1.3.0

func (*MsgDeleteServiceResponse) ProtoMessage()

func (*MsgDeleteServiceResponse) Reset added in v1.3.0

func (m *MsgDeleteServiceResponse) Reset()

func (*MsgDeleteServiceResponse) Size added in v1.3.0

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

func (*MsgDeleteServiceResponse) String added in v1.3.0

func (m *MsgDeleteServiceResponse) String() string

func (*MsgDeleteServiceResponse) Unmarshal added in v1.3.0

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

func (*MsgDeleteServiceResponse) XXX_DiscardUnknown added in v1.3.0

func (m *MsgDeleteServiceResponse) XXX_DiscardUnknown()

func (*MsgDeleteServiceResponse) XXX_Marshal added in v1.3.0

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

func (*MsgDeleteServiceResponse) XXX_Merge added in v1.3.0

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

func (*MsgDeleteServiceResponse) XXX_Size added in v1.3.0

func (m *MsgDeleteServiceResponse) XXX_Size() int

func (*MsgDeleteServiceResponse) XXX_Unmarshal added in v1.3.0

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

type MsgServer

type MsgServer interface {
	// CreateService defines the operation for registering a new service.
	CreateService(context.Context, *MsgCreateService) (*MsgCreateServiceResponse, error)
	// UpdateService defines the operation for updating an existing service.
	UpdateService(context.Context, *MsgUpdateService) (*MsgUpdateServiceResponse, error)
	// ActivateService defines the operation for activating an existing
	// service.
	ActivateService(context.Context, *MsgActivateService) (*MsgActivateServiceResponse, error)
	// DeactivateService defines the operation for deactivating an existing
	// service.
	DeactivateService(context.Context, *MsgDeactivateService) (*MsgDeactivateServiceResponse, error)
	// DeleteService defines the operation for deleting an existing service
	// that has been deactivated.
	DeleteService(context.Context, *MsgDeleteService) (*MsgDeleteServiceResponse, error)
	// TransferServiceOwnership defines the operation for transferring the
	// ownership of a service to another account.
	TransferServiceOwnership(context.Context, *MsgTransferServiceOwnership) (*MsgTransferServiceOwnershipResponse, error)
	// UpdateParams defines a (governance) operation for updating the module
	// parameters.
	// The authority defaults to the x/gov module account.
	UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
}

MsgServer is the server API for Msg service.

type MsgTransferServiceOwnership

type MsgTransferServiceOwnership struct {
	// Sender is the address of the user transferring the ownership
	Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
	// ServiceID represents the ID of the service to transfer ownership
	ServiceID uint32 `protobuf:"varint,2,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"`
	// NewAdmin is the address of the new admin of the service
	NewAdmin string `protobuf:"bytes,3,opt,name=new_admin,json=newAdmin,proto3" json:"new_admin,omitempty"`
}

MsgTransferServiceOwnership defines the message structure for the TransferServiceOwnership gRPC service method. It allows a service admin to transfer the ownership of the service to another account.

func NewMsgTransferServiceOwnership

func NewMsgTransferServiceOwnership(serviceID uint32, newAdmin, sender string) *MsgTransferServiceOwnership

NewMsgTransferServiceOwnership creates a new MsgTransferServiceOwnership instance

func (*MsgTransferServiceOwnership) Descriptor

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

func (*MsgTransferServiceOwnership) GetNewAdmin

func (m *MsgTransferServiceOwnership) GetNewAdmin() string

func (*MsgTransferServiceOwnership) GetSender

func (m *MsgTransferServiceOwnership) GetSender() string

func (*MsgTransferServiceOwnership) GetServiceID

func (m *MsgTransferServiceOwnership) GetServiceID() uint32

func (*MsgTransferServiceOwnership) GetSignBytes

func (msg *MsgTransferServiceOwnership) GetSignBytes() []byte

GetSignBytes implements sdk.Msg

func (*MsgTransferServiceOwnership) GetSigners

func (msg *MsgTransferServiceOwnership) GetSigners() []sdk.AccAddress

GetSigners implements sdk.Msg

func (*MsgTransferServiceOwnership) Marshal

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

func (*MsgTransferServiceOwnership) MarshalTo

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

func (*MsgTransferServiceOwnership) MarshalToSizedBuffer

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

func (*MsgTransferServiceOwnership) ProtoMessage

func (*MsgTransferServiceOwnership) ProtoMessage()

func (*MsgTransferServiceOwnership) Reset

func (m *MsgTransferServiceOwnership) Reset()

func (*MsgTransferServiceOwnership) Size

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

func (*MsgTransferServiceOwnership) String

func (m *MsgTransferServiceOwnership) String() string

func (*MsgTransferServiceOwnership) Unmarshal

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

func (*MsgTransferServiceOwnership) ValidateBasic

func (msg *MsgTransferServiceOwnership) ValidateBasic() error

ValidateBasic implements sdk.Msg

func (*MsgTransferServiceOwnership) XXX_DiscardUnknown

func (m *MsgTransferServiceOwnership) XXX_DiscardUnknown()

func (*MsgTransferServiceOwnership) XXX_Marshal

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

func (*MsgTransferServiceOwnership) XXX_Merge

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

func (*MsgTransferServiceOwnership) XXX_Size

func (m *MsgTransferServiceOwnership) XXX_Size() int

func (*MsgTransferServiceOwnership) XXX_Unmarshal

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

type MsgTransferServiceOwnershipResponse

type MsgTransferServiceOwnershipResponse struct {
}

MsgTransferServiceOwnershipResponse is the return value of MsgTransferServiceOwnership.

func (*MsgTransferServiceOwnershipResponse) Descriptor

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

func (*MsgTransferServiceOwnershipResponse) Marshal

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

func (*MsgTransferServiceOwnershipResponse) MarshalTo

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

func (*MsgTransferServiceOwnershipResponse) MarshalToSizedBuffer

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

func (*MsgTransferServiceOwnershipResponse) ProtoMessage

func (*MsgTransferServiceOwnershipResponse) ProtoMessage()

func (*MsgTransferServiceOwnershipResponse) Reset

func (*MsgTransferServiceOwnershipResponse) Size

func (*MsgTransferServiceOwnershipResponse) String

func (*MsgTransferServiceOwnershipResponse) Unmarshal

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

func (*MsgTransferServiceOwnershipResponse) XXX_DiscardUnknown

func (m *MsgTransferServiceOwnershipResponse) XXX_DiscardUnknown()

func (*MsgTransferServiceOwnershipResponse) XXX_Marshal

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

func (*MsgTransferServiceOwnershipResponse) XXX_Merge

func (*MsgTransferServiceOwnershipResponse) XXX_Size

func (*MsgTransferServiceOwnershipResponse) XXX_Unmarshal

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

type MsgUpdateParams

type MsgUpdateParams struct {
	// Authority is the address that controls the module (defaults to x/gov unless
	// overwritten).
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty" yaml:"authority"`
	// Params define the parameters to update.
	//
	// NOTE: All parameters must be supplied.
	Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"`
}

MsgDeactivateService defines the message structure for the UpdateParams gRPC service method. It allows the authority to update the module parameters.

func NewMsgUpdateParams

func NewMsgUpdateParams(params Params, authority string) *MsgUpdateParams

func (*MsgUpdateParams) Descriptor

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

func (*MsgUpdateParams) GetAuthority

func (m *MsgUpdateParams) GetAuthority() string

func (*MsgUpdateParams) GetParams

func (m *MsgUpdateParams) GetParams() Params

func (*MsgUpdateParams) GetSignBytes

func (msg *MsgUpdateParams) GetSignBytes() []byte

GetSignBytes implements sdk.Msg

func (*MsgUpdateParams) GetSigners

func (msg *MsgUpdateParams) GetSigners() []sdk.AccAddress

GetSigners implements sdk.Msg

func (*MsgUpdateParams) Marshal

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

func (*MsgUpdateParams) MarshalTo

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

func (*MsgUpdateParams) MarshalToSizedBuffer

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

func (*MsgUpdateParams) ProtoMessage

func (*MsgUpdateParams) ProtoMessage()

func (*MsgUpdateParams) Reset

func (m *MsgUpdateParams) Reset()

func (*MsgUpdateParams) Size

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

func (*MsgUpdateParams) String

func (m *MsgUpdateParams) String() string

func (*MsgUpdateParams) Unmarshal

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

func (*MsgUpdateParams) ValidateBasic

func (msg *MsgUpdateParams) ValidateBasic() error

ValidateBasic implements sdk.Msg

func (*MsgUpdateParams) XXX_DiscardUnknown

func (m *MsgUpdateParams) XXX_DiscardUnknown()

func (*MsgUpdateParams) XXX_Marshal

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

func (*MsgUpdateParams) XXX_Merge

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

func (*MsgUpdateParams) XXX_Size

func (m *MsgUpdateParams) XXX_Size() int

func (*MsgUpdateParams) XXX_Unmarshal

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

type MsgUpdateParamsResponse

type MsgUpdateParamsResponse struct {
}

MsgDeactivateServiceResponse is the return value of MsgUpdateParams.

func (*MsgUpdateParamsResponse) Descriptor

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

func (*MsgUpdateParamsResponse) Marshal

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

func (*MsgUpdateParamsResponse) MarshalTo

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

func (*MsgUpdateParamsResponse) MarshalToSizedBuffer

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

func (*MsgUpdateParamsResponse) ProtoMessage

func (*MsgUpdateParamsResponse) ProtoMessage()

func (*MsgUpdateParamsResponse) Reset

func (m *MsgUpdateParamsResponse) Reset()

func (*MsgUpdateParamsResponse) Size

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

func (*MsgUpdateParamsResponse) String

func (m *MsgUpdateParamsResponse) String() string

func (*MsgUpdateParamsResponse) Unmarshal

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

func (*MsgUpdateParamsResponse) XXX_DiscardUnknown

func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown()

func (*MsgUpdateParamsResponse) XXX_Marshal

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

func (*MsgUpdateParamsResponse) XXX_Merge

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

func (*MsgUpdateParamsResponse) XXX_Size

func (m *MsgUpdateParamsResponse) XXX_Size() int

func (*MsgUpdateParamsResponse) XXX_Unmarshal

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

type MsgUpdateService

type MsgUpdateService struct {
	// Sender is the address of the user updating the service
	Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
	// ID represents the ID of the service to be updated
	ServiceID uint32 `protobuf:"varint,2,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"`
	// Name is the new name of the service.
	// If it shouldn't be changed, use [do-not-modify] instead.
	Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty" yaml:"name"`
	// Description is the new description of the service.
	// If it shouldn't be changed, use [do-not-modify] instead.
	Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty" yaml:"description"`
	// Website is the new website of the service.
	// If it shouldn't be changed, use [do-not-modify] instead.
	Website string `protobuf:"bytes,5,opt,name=website,proto3" json:"website,omitempty" yaml:"website"`
	// PictureURL is the new URL of the service picture.
	// If it shouldn't be changed, use [do-not-modify] instead.
	PictureURL string `protobuf:"bytes,6,opt,name=picture_url,json=pictureUrl,proto3" json:"picture_url,omitempty" yaml:"picture_url"`
}

MsgUpdateService defines the message structure for the UpdateService gRPC service method. It allows the service admin to update the details of an existing service.

func NewMsgUpdateService

func NewMsgUpdateService(serviceID uint32, name, description, website, pictureURL, sender string) *MsgUpdateService

NewMsgUpdateService creates a new MsgUpdateService instance

func (*MsgUpdateService) Descriptor

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

func (*MsgUpdateService) GetDescription

func (m *MsgUpdateService) GetDescription() string

func (*MsgUpdateService) GetName

func (m *MsgUpdateService) GetName() string

func (*MsgUpdateService) GetPictureURL

func (m *MsgUpdateService) GetPictureURL() string

func (*MsgUpdateService) GetSender

func (m *MsgUpdateService) GetSender() string

func (*MsgUpdateService) GetServiceID

func (m *MsgUpdateService) GetServiceID() uint32

func (*MsgUpdateService) GetSignBytes

func (msg *MsgUpdateService) GetSignBytes() []byte

GetSignBytes implements sdk.Msg

func (*MsgUpdateService) GetSigners

func (msg *MsgUpdateService) GetSigners() []sdk.AccAddress

GetSigners implements sdk.Msg

func (*MsgUpdateService) GetWebsite

func (m *MsgUpdateService) GetWebsite() string

func (*MsgUpdateService) Marshal

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

func (*MsgUpdateService) MarshalTo

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

func (*MsgUpdateService) MarshalToSizedBuffer

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

func (*MsgUpdateService) ProtoMessage

func (*MsgUpdateService) ProtoMessage()

func (*MsgUpdateService) Reset

func (m *MsgUpdateService) Reset()

func (*MsgUpdateService) Size

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

func (*MsgUpdateService) String

func (m *MsgUpdateService) String() string

func (*MsgUpdateService) Unmarshal

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

func (*MsgUpdateService) ValidateBasic

func (msg *MsgUpdateService) ValidateBasic() error

ValidateBasic implements sdk.Msg

func (*MsgUpdateService) XXX_DiscardUnknown

func (m *MsgUpdateService) XXX_DiscardUnknown()

func (*MsgUpdateService) XXX_Marshal

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

func (*MsgUpdateService) XXX_Merge

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

func (*MsgUpdateService) XXX_Size

func (m *MsgUpdateService) XXX_Size() int

func (*MsgUpdateService) XXX_Unmarshal

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

type MsgUpdateServiceResponse

type MsgUpdateServiceResponse struct {
}

MsgUpdateServiceResponse is the return value of MsgUpdateService.

func (*MsgUpdateServiceResponse) Descriptor

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

func (*MsgUpdateServiceResponse) Marshal

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

func (*MsgUpdateServiceResponse) MarshalTo

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

func (*MsgUpdateServiceResponse) MarshalToSizedBuffer

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

func (*MsgUpdateServiceResponse) ProtoMessage

func (*MsgUpdateServiceResponse) ProtoMessage()

func (*MsgUpdateServiceResponse) Reset

func (m *MsgUpdateServiceResponse) Reset()

func (*MsgUpdateServiceResponse) Size

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

func (*MsgUpdateServiceResponse) String

func (m *MsgUpdateServiceResponse) String() string

func (*MsgUpdateServiceResponse) Unmarshal

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

func (*MsgUpdateServiceResponse) XXX_DiscardUnknown

func (m *MsgUpdateServiceResponse) XXX_DiscardUnknown()

func (*MsgUpdateServiceResponse) XXX_Marshal

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

func (*MsgUpdateServiceResponse) XXX_Merge

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

func (*MsgUpdateServiceResponse) XXX_Size

func (m *MsgUpdateServiceResponse) XXX_Size() int

func (*MsgUpdateServiceResponse) XXX_Unmarshal

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

type MultiServicesHooks

type MultiServicesHooks []ServicesHooks

MultiServicesHooks combines multiple services hooks, all hook functions are run in array sequence

func NewMultiServicesHooks

func NewMultiServicesHooks(hooks ...ServicesHooks) MultiServicesHooks

NewMultiServicesHooks creates a new MultiServicesHooks object

func (MultiServicesHooks) AfterServiceActivated

func (m MultiServicesHooks) AfterServiceActivated(ctx sdk.Context, serviceID uint32) error

AfterServiceActivated implements ServicesHooks

func (MultiServicesHooks) AfterServiceCreated

func (m MultiServicesHooks) AfterServiceCreated(ctx sdk.Context, serviceID uint32) error

AfterServiceCreated implements ServicesHooks

func (MultiServicesHooks) AfterServiceDeactivated

func (m MultiServicesHooks) AfterServiceDeactivated(ctx sdk.Context, serviceID uint32) error

AfterServiceDeactivated implements ServicesHooks

func (MultiServicesHooks) AfterServiceDeleted added in v1.3.0

func (m MultiServicesHooks) AfterServiceDeleted(ctx sdk.Context, serviceID uint32) error

AfterServiceDeleted implements ServicesHooks

type Params

type Params struct {
	// ServiceRegistrationFee defines the fee to register a new service.
	// The fee is drawn from the MsgRegisterService sender's account,
	// and transferred to the community pool.
	ServiceRegistrationFee github_com_cosmos_cosmos_sdk_types.Coins `` /* 205-byte string literal not displayed */
}

Params defines the parameters for the module.

func DefaultParams

func DefaultParams() Params

DefaultParams returns a default set of parameters.

func NewParams

func NewParams(serviceRegistrationFee sdk.Coins) Params

NewParams creates a new Params object

func (*Params) Descriptor

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

func (*Params) GetServiceRegistrationFee

func (m *Params) GetServiceRegistrationFee() github_com_cosmos_cosmos_sdk_types.Coins

func (*Params) Marshal

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

func (*Params) MarshalTo

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

func (*Params) MarshalToSizedBuffer

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

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

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

func (*Params) String

func (m *Params) String() string

func (*Params) Unmarshal

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

func (*Params) Validate

func (p *Params) Validate() error

Validate checks that the parameters have valid values.

func (*Params) XXX_DiscardUnknown

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal

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

func (*Params) XXX_Merge

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

func (*Params) XXX_Size

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal

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

type QueryClient

type QueryClient interface {
	// Service defines a gRPC query method that returns the service by the given
	// service id.
	Service(ctx context.Context, in *QueryServiceRequest, opts ...grpc.CallOption) (*QueryServiceResponse, error)
	// Services defines a gRPC query method that returns the actively validates
	// services currently registered in the module.
	Services(ctx context.Context, in *QueryServicesRequest, opts ...grpc.CallOption) (*QueryServicesResponse, error)
	// Params defines a gRPC query method that returns the parameters of the
	// module.
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, 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 QueryParamsRequest

type QueryParamsRequest struct {
}

QueryParamsRequest is the request type for the Query/Params RPC method.

func NewQueryParamsRequest

func NewQueryParamsRequest() *QueryParamsRequest

NewQueryParamsRequest creates a new QueryParamsRequest instance

func (*QueryParamsRequest) Descriptor

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

func (*QueryParamsRequest) Marshal

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

func (*QueryParamsRequest) MarshalTo

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

func (*QueryParamsRequest) MarshalToSizedBuffer

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

func (*QueryParamsRequest) ProtoMessage

func (*QueryParamsRequest) ProtoMessage()

func (*QueryParamsRequest) Reset

func (m *QueryParamsRequest) Reset()

func (*QueryParamsRequest) Size

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

func (*QueryParamsRequest) String

func (m *QueryParamsRequest) String() string

func (*QueryParamsRequest) Unmarshal

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

func (*QueryParamsRequest) XXX_DiscardUnknown

func (m *QueryParamsRequest) XXX_DiscardUnknown()

func (*QueryParamsRequest) XXX_Marshal

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

func (*QueryParamsRequest) XXX_Merge

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

func (*QueryParamsRequest) XXX_Size

func (m *QueryParamsRequest) XXX_Size() int

func (*QueryParamsRequest) XXX_Unmarshal

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

type QueryParamsResponse

type QueryParamsResponse struct {
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

QueryParamsResponse is the response type for the Query/Params RPC method.

func (*QueryParamsResponse) Descriptor

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

func (*QueryParamsResponse) GetParams

func (m *QueryParamsResponse) GetParams() Params

func (*QueryParamsResponse) Marshal

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

func (*QueryParamsResponse) MarshalTo

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

func (*QueryParamsResponse) MarshalToSizedBuffer

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

func (*QueryParamsResponse) ProtoMessage

func (*QueryParamsResponse) ProtoMessage()

func (*QueryParamsResponse) Reset

func (m *QueryParamsResponse) Reset()

func (*QueryParamsResponse) Size

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

func (*QueryParamsResponse) String

func (m *QueryParamsResponse) String() string

func (*QueryParamsResponse) Unmarshal

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

func (*QueryParamsResponse) XXX_DiscardUnknown

func (m *QueryParamsResponse) XXX_DiscardUnknown()

func (*QueryParamsResponse) XXX_Marshal

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

func (*QueryParamsResponse) XXX_Merge

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

func (*QueryParamsResponse) XXX_Size

func (m *QueryParamsResponse) XXX_Size() int

func (*QueryParamsResponse) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	// Service defines a gRPC query method that returns the service by the given
	// service id.
	Service(context.Context, *QueryServiceRequest) (*QueryServiceResponse, error)
	// Services defines a gRPC query method that returns the actively validates
	// services currently registered in the module.
	Services(context.Context, *QueryServicesRequest) (*QueryServicesResponse, error)
	// Params defines a gRPC query method that returns the parameters of the
	// module.
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
}

QueryServer is the server API for Query service.

type QueryServiceRequest

type QueryServiceRequest struct {
	// ServiceID is the ID of the service to query
	ServiceId uint32 `protobuf:"varint,1,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"`
}

QueryServiceRequest is the request type for the Query/Service RPC method.

func NewQueryServiceRequest

func NewQueryServiceRequest(serviceID uint32) *QueryServiceRequest

NewQueryServiceRequest creates a new QueryServiceRequest instance

func (*QueryServiceRequest) Descriptor

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

func (*QueryServiceRequest) GetServiceId

func (m *QueryServiceRequest) GetServiceId() uint32

func (*QueryServiceRequest) Marshal

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

func (*QueryServiceRequest) MarshalTo

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

func (*QueryServiceRequest) MarshalToSizedBuffer

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

func (*QueryServiceRequest) ProtoMessage

func (*QueryServiceRequest) ProtoMessage()

func (*QueryServiceRequest) Reset

func (m *QueryServiceRequest) Reset()

func (*QueryServiceRequest) Size

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

func (*QueryServiceRequest) String

func (m *QueryServiceRequest) String() string

func (*QueryServiceRequest) Unmarshal

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

func (*QueryServiceRequest) XXX_DiscardUnknown

func (m *QueryServiceRequest) XXX_DiscardUnknown()

func (*QueryServiceRequest) XXX_Marshal

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

func (*QueryServiceRequest) XXX_Merge

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

func (*QueryServiceRequest) XXX_Size

func (m *QueryServiceRequest) XXX_Size() int

func (*QueryServiceRequest) XXX_Unmarshal

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

type QueryServiceResponse

type QueryServiceResponse struct {
	Service Service `protobuf:"bytes,1,opt,name=service,proto3" json:"service"`
}

QueryServiceResponse is the response type for the Query/Service RPC method.

func (*QueryServiceResponse) Descriptor

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

func (*QueryServiceResponse) GetService

func (m *QueryServiceResponse) GetService() Service

func (*QueryServiceResponse) Marshal

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

func (*QueryServiceResponse) MarshalTo

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

func (*QueryServiceResponse) MarshalToSizedBuffer

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

func (*QueryServiceResponse) ProtoMessage

func (*QueryServiceResponse) ProtoMessage()

func (*QueryServiceResponse) Reset

func (m *QueryServiceResponse) Reset()

func (*QueryServiceResponse) Size

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

func (*QueryServiceResponse) String

func (m *QueryServiceResponse) String() string

func (*QueryServiceResponse) Unmarshal

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

func (*QueryServiceResponse) XXX_DiscardUnknown

func (m *QueryServiceResponse) XXX_DiscardUnknown()

func (*QueryServiceResponse) XXX_Marshal

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

func (*QueryServiceResponse) XXX_Merge

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

func (*QueryServiceResponse) XXX_Size

func (m *QueryServiceResponse) XXX_Size() int

func (*QueryServiceResponse) XXX_Unmarshal

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

type QueryServicesRequest

type QueryServicesRequest struct {
	Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryServicesRequest is the request type for the Query/Services RPC method.

func NewQueryServicesRequest

func NewQueryServicesRequest(pagination *query.PageRequest) *QueryServicesRequest

NewQueryServicesRequest creates a new QueryServiceRequest instance

func (*QueryServicesRequest) Descriptor

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

func (*QueryServicesRequest) GetPagination

func (m *QueryServicesRequest) GetPagination() *query.PageRequest

func (*QueryServicesRequest) Marshal

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

func (*QueryServicesRequest) MarshalTo

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

func (*QueryServicesRequest) MarshalToSizedBuffer

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

func (*QueryServicesRequest) ProtoMessage

func (*QueryServicesRequest) ProtoMessage()

func (*QueryServicesRequest) Reset

func (m *QueryServicesRequest) Reset()

func (*QueryServicesRequest) Size

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

func (*QueryServicesRequest) String

func (m *QueryServicesRequest) String() string

func (*QueryServicesRequest) Unmarshal

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

func (*QueryServicesRequest) XXX_DiscardUnknown

func (m *QueryServicesRequest) XXX_DiscardUnknown()

func (*QueryServicesRequest) XXX_Marshal

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

func (*QueryServicesRequest) XXX_Merge

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

func (*QueryServicesRequest) XXX_Size

func (m *QueryServicesRequest) XXX_Size() int

func (*QueryServicesRequest) XXX_Unmarshal

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

type QueryServicesResponse

type QueryServicesResponse struct {
	// Services services defines the list of actively validates services
	Services []Service `protobuf:"bytes,1,rep,name=services,proto3" json:"services"`
	// Pagination defines the pagination response
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryServicesResponse is the response type for the Query/Services RPC method.

func (*QueryServicesResponse) Descriptor

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

func (*QueryServicesResponse) GetPagination

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

func (*QueryServicesResponse) GetServices

func (m *QueryServicesResponse) GetServices() []Service

func (*QueryServicesResponse) Marshal

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

func (*QueryServicesResponse) MarshalTo

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

func (*QueryServicesResponse) MarshalToSizedBuffer

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

func (*QueryServicesResponse) ProtoMessage

func (*QueryServicesResponse) ProtoMessage()

func (*QueryServicesResponse) Reset

func (m *QueryServicesResponse) Reset()

func (*QueryServicesResponse) Size

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

func (*QueryServicesResponse) String

func (m *QueryServicesResponse) String() string

func (*QueryServicesResponse) Unmarshal

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

func (*QueryServicesResponse) XXX_DiscardUnknown

func (m *QueryServicesResponse) XXX_DiscardUnknown()

func (*QueryServicesResponse) XXX_Marshal

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

func (*QueryServicesResponse) XXX_Merge

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

func (*QueryServicesResponse) XXX_Size

func (m *QueryServicesResponse) XXX_Size() int

func (*QueryServicesResponse) XXX_Unmarshal

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

type Service

type Service struct {
	// ID is the unique identifier of the service
	ID uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// Status is the status of the service
	Status ServiceStatus `protobuf:"varint,2,opt,name=status,proto3,enum=milkyway.services.v1.ServiceStatus" json:"status,omitempty"`
	// Admin is the address of the user that has administrative power over the
	// service
	Admin string `protobuf:"bytes,3,opt,name=admin,proto3" json:"admin,omitempty"`
	// Name is the name of the service
	Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
	// Description is the description of the service
	Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
	// Website is the website of the service
	Website string `protobuf:"bytes,6,opt,name=website,proto3" json:"website,omitempty"`
	// PictureURL is the URL of the picture of the service
	PictureURL string `protobuf:"bytes,7,opt,name=picture_url,json=pictureUrl,proto3" json:"picture_url,omitempty"`
	// Address is the address of the account associated with the service.
	// This will be used in order to store all the tokens that are delegated to
	// this service by various users.
	Address string `protobuf:"bytes,8,opt,name=address,proto3" json:"address,omitempty"`
	// Tokens define the delegated tokens.
	Tokens github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,9,rep,name=tokens,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"tokens"`
	// DelegatorShares define the total shares issued to a service's delegators.
	DelegatorShares github_com_cosmos_cosmos_sdk_types.DecCoins `` /* 154-byte string literal not displayed */
}

Service defines the fields of a service

func NewService

func NewService(
	id uint32,
	status ServiceStatus,
	name string,
	description string,
	website string,
	pictureURL string,
	admin string,
) Service

NewService creates a new Service instance

func (Service) AddTokensFromDelegation

func (s Service) AddTokensFromDelegation(amount sdk.Coins) (Service, sdk.DecCoins)

AddTokensFromDelegation adds the given amount of tokens to the service's total tokens, also updating the service's delegator shares. It returns the updated service and the shares issued.

func (*Service) Descriptor

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

func (Service) GetAddress

func (s Service) GetAddress() string

func (Service) GetDelegatorShares

func (s Service) GetDelegatorShares() sdk.DecCoins

func (Service) GetID

func (s Service) GetID() uint32

func (Service) GetSharesDenom

func (s Service) GetSharesDenom(tokenDenom string) string

GetSharesDenom returns the shares denom for a service and token denom

func (Service) GetTokens

func (s Service) GetTokens() sdk.Coins

func (Service) InvalidExRate

func (s Service) InvalidExRate() bool

InvalidExRate returns whether the exchange rates is invalid. This can happen e.g. if Service loses all tokens due to slashing. In this case, make all future delegations invalid.

func (Service) IsActive

func (s Service) IsActive() bool

IsActive returns whether the service is active.

func (*Service) Marshal

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

func (*Service) MarshalTo

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

func (*Service) MarshalToSizedBuffer

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

func (*Service) ProtoMessage

func (*Service) ProtoMessage()

func (Service) RemoveDelShares

func (s Service) RemoveDelShares(delShares sdk.DecCoins) (Service, sdk.Coins)

RemoveDelShares removes delegator shares from a service. NOTE: Because token fractions are left in the service, the exchange rate of future shares of this validator can increase.

func (*Service) Reset

func (m *Service) Reset()

func (Service) SharesFromDecCoins

func (s Service) SharesFromDecCoins(coins sdk.DecCoins) (sdk.DecCoins, error)

SharesFromDecCoins returns the shares of a delegation given a bond amount. It returns an error if the service has no tokens.

func (Service) SharesFromTokens

func (s Service) SharesFromTokens(tokens sdk.Coins) (sdk.DecCoins, error)

SharesFromTokens returns the shares of a delegation given a bond amount. It returns an error if the service has no tokens.

func (Service) SharesFromTokensTruncated

func (s Service) SharesFromTokensTruncated(tokens sdk.Coins) (sdk.DecCoins, error)

SharesFromTokensTruncated returns the truncated shares of a delegation given a bond amount. It returns an error if the service has no tokens.

func (*Service) Size

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

func (*Service) String

func (m *Service) String() string

func (Service) TokensFromShares

func (s Service) TokensFromShares(shares sdk.DecCoins) sdk.DecCoins

TokensFromShares calculates the token worth of provided shares

func (Service) TokensFromSharesTruncated

func (s Service) TokensFromSharesTruncated(shares sdk.DecCoins) sdk.DecCoins

TokensFromSharesTruncated calculates the token worth of provided shares, truncated

func (*Service) Unmarshal

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

func (*Service) Update

func (s *Service) Update(update ServiceUpdate) Service

Update returns a new Service with updated fields.

func (Service) Validate

func (s Service) Validate() error

Validate checks that the Service has valid values.

func (*Service) XXX_DiscardUnknown

func (m *Service) XXX_DiscardUnknown()

func (*Service) XXX_Marshal

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

func (*Service) XXX_Merge

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

func (*Service) XXX_Size

func (m *Service) XXX_Size() int

func (*Service) XXX_Unmarshal

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

type ServiceStatus

type ServiceStatus int32

ServiceStatus defines the status of a service

const (
	// SERVICE_STATUS_UNSPECIFIED defines an unspecified status
	SERVICE_STATUS_UNSPECIFIED ServiceStatus = 0
	// SERVICE_STATUS_CREATED identifies a recently created service that is not
	// yet active
	SERVICE_STATUS_CREATED ServiceStatus = 1
	// SERVICE_STATUS_ACTIVE identifies an active service
	SERVICE_STATUS_ACTIVE ServiceStatus = 2
	// SERVICE_STATUS_INACTIVE identifies an inactive service
	SERVICE_STATUS_INACTIVE ServiceStatus = 3
)

func (ServiceStatus) EnumDescriptor

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

func (ServiceStatus) String

func (x ServiceStatus) String() string

type ServiceUpdate

type ServiceUpdate struct {
	Name        string
	Description string
	Website     string
	PictureURL  string
}

ServiceUpdate defines the fields that can be updated in a Service.

func NewServiceUpdate

func NewServiceUpdate(
	name string,
	description string,
	website string,
	pictureURL string,
) ServiceUpdate

NewServiceUpdate returns a new ServiceUpdate instance.

type ServicesHooks

type ServicesHooks interface {
	AfterServiceCreated(ctx sdk.Context, serviceID uint32) error     // Must be called after a service is created
	AfterServiceActivated(ctx sdk.Context, serviceID uint32) error   // Must be called after a service is registered
	AfterServiceDeactivated(ctx sdk.Context, serviceID uint32) error // Must be called after a service is deregistered
	AfterServiceDeleted(ctx sdk.Context, serviceID uint32) error     // Must be called after a service is deleted
}

ServicesHooks event hooks for services objects (noalias)

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) ActivateService

func (*UnimplementedMsgServer) CreateService

func (*UnimplementedMsgServer) DeactivateService

func (*UnimplementedMsgServer) DeleteService added in v1.3.0

func (*UnimplementedMsgServer) TransferServiceOwnership

func (*UnimplementedMsgServer) UpdateParams

func (*UnimplementedMsgServer) UpdateService

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Params

func (*UnimplementedQueryServer) Service

func (*UnimplementedQueryServer) Services

Jump to

Keyboard shortcuts

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