types

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 23 Imported by: 137

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	// ModuleName defines the module name
	ModuleName = "circuit"

	// StoreKey defines the primary module store key
	StoreKey = ModuleName

	// RouterKey defines the module's message routing key
	RouterKey = ModuleName
)

Variables

View Source
var (
	AccountPermissionPrefix = collections.NewPrefix(1)
	DisableListPrefix       = collections.NewPrefix(2)
)

KVStore keys

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 (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTypes        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTypes          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
)
View Source
var Permissions_Level_name = map[int32]string{
	0: "LEVEL_NONE_UNSPECIFIED",
	1: "LEVEL_SOME_MSGS",
	2: "LEVEL_ALL_MSGS",
	3: "LEVEL_SUPER_ADMIN",
}
View Source
var Permissions_Level_value = map[string]int32{
	"LEVEL_NONE_UNSPECIFIED": 0,
	"LEVEL_SOME_MSGS":        1,
	"LEVEL_ALL_MSGS":         2,
	"LEVEL_SUPER_ADMIN":      3,
}

Functions

func CheckPermission

func CheckPermission(account *GenesisAccountPermissions) error

func RegisterInterfaces

func RegisterInterfaces(registry types.InterfaceRegistry)

RegisterInterfaces registers the interfaces types with the interface registry.

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)

Types

type AccountResponse

type AccountResponse struct {
	Permission *Permissions `protobuf:"bytes,1,opt,name=permission,proto3" json:"permission,omitempty"`
}

AccountResponse is the response type for the Query/Account RPC method.

func (*AccountResponse) Descriptor

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

func (*AccountResponse) GetPermission

func (m *AccountResponse) GetPermission() *Permissions

func (*AccountResponse) Marshal

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

func (*AccountResponse) MarshalTo

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

func (*AccountResponse) MarshalToSizedBuffer

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

func (*AccountResponse) ProtoMessage

func (*AccountResponse) ProtoMessage()

func (*AccountResponse) Reset

func (m *AccountResponse) Reset()

func (*AccountResponse) Size

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

func (*AccountResponse) String

func (m *AccountResponse) String() string

func (*AccountResponse) Unmarshal

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

func (*AccountResponse) XXX_DiscardUnknown

func (m *AccountResponse) XXX_DiscardUnknown()

func (*AccountResponse) XXX_Marshal

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

func (*AccountResponse) XXX_Merge

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

func (*AccountResponse) XXX_Size

func (m *AccountResponse) XXX_Size() int

func (*AccountResponse) XXX_Unmarshal

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

type AccountsResponse

type AccountsResponse struct {
	Accounts []*GenesisAccountPermissions `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"`
	// pagination defines the pagination in the response.
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

AccountsResponse is the response type for the Query/Accounts RPC method.

func (*AccountsResponse) Descriptor

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

func (*AccountsResponse) GetAccounts

func (m *AccountsResponse) GetAccounts() []*GenesisAccountPermissions

func (*AccountsResponse) GetPagination

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

func (*AccountsResponse) Marshal

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

func (*AccountsResponse) MarshalTo

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

func (*AccountsResponse) MarshalToSizedBuffer

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

func (*AccountsResponse) ProtoMessage

func (*AccountsResponse) ProtoMessage()

func (*AccountsResponse) Reset

func (m *AccountsResponse) Reset()

func (*AccountsResponse) Size

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

func (*AccountsResponse) String

func (m *AccountsResponse) String() string

func (*AccountsResponse) Unmarshal

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

func (*AccountsResponse) XXX_DiscardUnknown

func (m *AccountsResponse) XXX_DiscardUnknown()

func (*AccountsResponse) XXX_Marshal

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

func (*AccountsResponse) XXX_Merge

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

func (*AccountsResponse) XXX_Size

func (m *AccountsResponse) XXX_Size() int

func (*AccountsResponse) XXX_Unmarshal

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

type DisabledListResponse

type DisabledListResponse struct {
	DisabledList []string `protobuf:"bytes,1,rep,name=disabled_list,json=disabledList,proto3" json:"disabled_list,omitempty"`
}

DisabledListResponse is the response type for the Query/DisabledList RPC method.

func (*DisabledListResponse) Descriptor

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

func (*DisabledListResponse) GetDisabledList

func (m *DisabledListResponse) GetDisabledList() []string

func (*DisabledListResponse) Marshal

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

func (*DisabledListResponse) MarshalTo

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

func (*DisabledListResponse) MarshalToSizedBuffer

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

func (*DisabledListResponse) ProtoMessage

func (*DisabledListResponse) ProtoMessage()

func (*DisabledListResponse) Reset

func (m *DisabledListResponse) Reset()

func (*DisabledListResponse) Size

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

func (*DisabledListResponse) String

func (m *DisabledListResponse) String() string

func (*DisabledListResponse) Unmarshal

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

func (*DisabledListResponse) XXX_DiscardUnknown

func (m *DisabledListResponse) XXX_DiscardUnknown()

func (*DisabledListResponse) XXX_Marshal

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

func (*DisabledListResponse) XXX_Merge

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

func (*DisabledListResponse) XXX_Size

func (m *DisabledListResponse) XXX_Size() int

func (*DisabledListResponse) XXX_Unmarshal

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

type GenesisAccountPermissions

type GenesisAccountPermissions struct {
	Address     string       `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	Permissions *Permissions `protobuf:"bytes,2,opt,name=permissions,proto3" json:"permissions,omitempty"`
}

GenesisAccountPermissions is the account permissions for the circuit breaker in genesis

func (*GenesisAccountPermissions) Descriptor

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

func (*GenesisAccountPermissions) GetAddress

func (m *GenesisAccountPermissions) GetAddress() string

func (*GenesisAccountPermissions) GetPermissions

func (m *GenesisAccountPermissions) GetPermissions() *Permissions

func (*GenesisAccountPermissions) Marshal

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

func (*GenesisAccountPermissions) MarshalTo

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

func (*GenesisAccountPermissions) MarshalToSizedBuffer

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

func (*GenesisAccountPermissions) ProtoMessage

func (*GenesisAccountPermissions) ProtoMessage()

func (*GenesisAccountPermissions) Reset

func (m *GenesisAccountPermissions) Reset()

func (*GenesisAccountPermissions) Size

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

func (*GenesisAccountPermissions) String

func (m *GenesisAccountPermissions) String() string

func (*GenesisAccountPermissions) Unmarshal

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

func (*GenesisAccountPermissions) XXX_DiscardUnknown

func (m *GenesisAccountPermissions) XXX_DiscardUnknown()

func (*GenesisAccountPermissions) XXX_Marshal

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

func (*GenesisAccountPermissions) XXX_Merge

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

func (*GenesisAccountPermissions) XXX_Size

func (m *GenesisAccountPermissions) XXX_Size() int

func (*GenesisAccountPermissions) XXX_Unmarshal

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

type GenesisState

type GenesisState struct {
	AccountPermissions []*GenesisAccountPermissions `protobuf:"bytes,1,rep,name=account_permissions,json=accountPermissions,proto3" json:"account_permissions,omitempty"`
	DisabledTypeUrls   []string                     `protobuf:"bytes,2,rep,name=disabled_type_urls,json=disabledTypeUrls,proto3" json:"disabled_type_urls,omitempty"`
}

GenesisState is the state that must be provided at genesis.

func DefaultGenesisState

func DefaultGenesisState() *GenesisState

func (*GenesisState) Descriptor

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

func (*GenesisState) GetAccountPermissions

func (m *GenesisState) GetAccountPermissions() []*GenesisAccountPermissions

func (*GenesisState) GetDisabledTypeUrls

func (m *GenesisState) GetDisabledTypeUrls() []string

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 (gs *GenesisState) Validate() 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 MsgAuthorizeCircuitBreaker

type MsgAuthorizeCircuitBreaker struct {
	// granter is the granter of the circuit breaker permissions and must have
	// LEVEL_SUPER_ADMIN.
	Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"`
	// grantee is the account authorized with the provided permissions.
	Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"`
	// permissions are the circuit breaker permissions that the grantee receives.
	// These will overwrite any existing permissions. LEVEL_NONE_UNSPECIFIED can
	// be specified to revoke all permissions.
	Permissions *Permissions `protobuf:"bytes,3,opt,name=permissions,proto3" json:"permissions,omitempty"`
}

MsgAuthorizeCircuitBreaker defines the Msg/AuthorizeCircuitBreaker request type.

func (*MsgAuthorizeCircuitBreaker) Descriptor

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

func (*MsgAuthorizeCircuitBreaker) GetGrantee

func (m *MsgAuthorizeCircuitBreaker) GetGrantee() string

func (*MsgAuthorizeCircuitBreaker) GetGranter

func (m *MsgAuthorizeCircuitBreaker) GetGranter() string

func (*MsgAuthorizeCircuitBreaker) GetPermissions

func (m *MsgAuthorizeCircuitBreaker) GetPermissions() *Permissions

func (*MsgAuthorizeCircuitBreaker) Marshal

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

func (*MsgAuthorizeCircuitBreaker) MarshalTo

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

func (*MsgAuthorizeCircuitBreaker) MarshalToSizedBuffer

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

func (*MsgAuthorizeCircuitBreaker) ProtoMessage

func (*MsgAuthorizeCircuitBreaker) ProtoMessage()

func (*MsgAuthorizeCircuitBreaker) Reset

func (m *MsgAuthorizeCircuitBreaker) Reset()

func (*MsgAuthorizeCircuitBreaker) Size

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

func (*MsgAuthorizeCircuitBreaker) String

func (m *MsgAuthorizeCircuitBreaker) String() string

func (*MsgAuthorizeCircuitBreaker) Unmarshal

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

func (*MsgAuthorizeCircuitBreaker) XXX_DiscardUnknown

func (m *MsgAuthorizeCircuitBreaker) XXX_DiscardUnknown()

func (*MsgAuthorizeCircuitBreaker) XXX_Marshal

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

func (*MsgAuthorizeCircuitBreaker) XXX_Merge

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

func (*MsgAuthorizeCircuitBreaker) XXX_Size

func (m *MsgAuthorizeCircuitBreaker) XXX_Size() int

func (*MsgAuthorizeCircuitBreaker) XXX_Unmarshal

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

type MsgAuthorizeCircuitBreakerResponse

type MsgAuthorizeCircuitBreakerResponse struct {
	Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
}

MsgAuthorizeCircuitBreakerResponse defines the Msg/AuthorizeCircuitBreaker response type.

func (*MsgAuthorizeCircuitBreakerResponse) Descriptor

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

func (*MsgAuthorizeCircuitBreakerResponse) GetSuccess

func (m *MsgAuthorizeCircuitBreakerResponse) GetSuccess() bool

func (*MsgAuthorizeCircuitBreakerResponse) Marshal

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

func (*MsgAuthorizeCircuitBreakerResponse) MarshalTo

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

func (*MsgAuthorizeCircuitBreakerResponse) MarshalToSizedBuffer

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

func (*MsgAuthorizeCircuitBreakerResponse) ProtoMessage

func (*MsgAuthorizeCircuitBreakerResponse) ProtoMessage()

func (*MsgAuthorizeCircuitBreakerResponse) Reset

func (*MsgAuthorizeCircuitBreakerResponse) Size

func (*MsgAuthorizeCircuitBreakerResponse) String

func (*MsgAuthorizeCircuitBreakerResponse) Unmarshal

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

func (*MsgAuthorizeCircuitBreakerResponse) XXX_DiscardUnknown

func (m *MsgAuthorizeCircuitBreakerResponse) XXX_DiscardUnknown()

func (*MsgAuthorizeCircuitBreakerResponse) XXX_Marshal

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

func (*MsgAuthorizeCircuitBreakerResponse) XXX_Merge

func (*MsgAuthorizeCircuitBreakerResponse) XXX_Size

func (*MsgAuthorizeCircuitBreakerResponse) XXX_Unmarshal

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

type MsgClient

type MsgClient interface {
	// AuthorizeCircuitBreaker allows a super-admin to grant (or revoke) another
	// account's circuit breaker permissions.
	AuthorizeCircuitBreaker(ctx context.Context, in *MsgAuthorizeCircuitBreaker, opts ...grpc.CallOption) (*MsgAuthorizeCircuitBreakerResponse, error)
	// TripCircuitBreaker pauses processing of Msg's in the state machine.
	TripCircuitBreaker(ctx context.Context, in *MsgTripCircuitBreaker, opts ...grpc.CallOption) (*MsgTripCircuitBreakerResponse, error)
	// ResetCircuitBreaker resumes processing of Msg's in the state machine that
	// have been been paused using TripCircuitBreaker.
	ResetCircuitBreaker(ctx context.Context, in *MsgResetCircuitBreaker, opts ...grpc.CallOption) (*MsgResetCircuitBreakerResponse, 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 MsgResetCircuitBreaker

type MsgResetCircuitBreaker struct {
	// authority is the account authorized to trip or reset the circuit breaker.
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	// msg_type_urls specifies a list of Msg type URLs to resume processing. If
	// it is left empty all Msg processing for type URLs that the account is
	// authorized to trip will resume.
	MsgTypeUrls []string `protobuf:"bytes,3,rep,name=msg_type_urls,json=msgTypeUrls,proto3" json:"msg_type_urls,omitempty"`
}

MsgResetCircuitBreaker defines the Msg/ResetCircuitBreaker request type.

func (*MsgResetCircuitBreaker) Descriptor

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

func (*MsgResetCircuitBreaker) GetAuthority

func (m *MsgResetCircuitBreaker) GetAuthority() string

func (*MsgResetCircuitBreaker) GetMsgTypeUrls

func (m *MsgResetCircuitBreaker) GetMsgTypeUrls() []string

func (*MsgResetCircuitBreaker) Marshal

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

func (*MsgResetCircuitBreaker) MarshalTo

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

func (*MsgResetCircuitBreaker) MarshalToSizedBuffer

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

func (*MsgResetCircuitBreaker) ProtoMessage

func (*MsgResetCircuitBreaker) ProtoMessage()

func (*MsgResetCircuitBreaker) Reset

func (m *MsgResetCircuitBreaker) Reset()

func (*MsgResetCircuitBreaker) Size

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

func (*MsgResetCircuitBreaker) String

func (m *MsgResetCircuitBreaker) String() string

func (*MsgResetCircuitBreaker) Unmarshal

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

func (*MsgResetCircuitBreaker) XXX_DiscardUnknown

func (m *MsgResetCircuitBreaker) XXX_DiscardUnknown()

func (*MsgResetCircuitBreaker) XXX_Marshal

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

func (*MsgResetCircuitBreaker) XXX_Merge

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

func (*MsgResetCircuitBreaker) XXX_Size

func (m *MsgResetCircuitBreaker) XXX_Size() int

func (*MsgResetCircuitBreaker) XXX_Unmarshal

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

type MsgResetCircuitBreakerResponse

type MsgResetCircuitBreakerResponse struct {
	Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
}

MsgResetCircuitBreakerResponse defines the Msg/ResetCircuitBreaker response type.

func (*MsgResetCircuitBreakerResponse) Descriptor

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

func (*MsgResetCircuitBreakerResponse) GetSuccess

func (m *MsgResetCircuitBreakerResponse) GetSuccess() bool

func (*MsgResetCircuitBreakerResponse) Marshal

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

func (*MsgResetCircuitBreakerResponse) MarshalTo

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

func (*MsgResetCircuitBreakerResponse) MarshalToSizedBuffer

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

func (*MsgResetCircuitBreakerResponse) ProtoMessage

func (*MsgResetCircuitBreakerResponse) ProtoMessage()

func (*MsgResetCircuitBreakerResponse) Reset

func (m *MsgResetCircuitBreakerResponse) Reset()

func (*MsgResetCircuitBreakerResponse) Size

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

func (*MsgResetCircuitBreakerResponse) String

func (*MsgResetCircuitBreakerResponse) Unmarshal

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

func (*MsgResetCircuitBreakerResponse) XXX_DiscardUnknown

func (m *MsgResetCircuitBreakerResponse) XXX_DiscardUnknown()

func (*MsgResetCircuitBreakerResponse) XXX_Marshal

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

func (*MsgResetCircuitBreakerResponse) XXX_Merge

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

func (*MsgResetCircuitBreakerResponse) XXX_Size

func (m *MsgResetCircuitBreakerResponse) XXX_Size() int

func (*MsgResetCircuitBreakerResponse) XXX_Unmarshal

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

type MsgServer

type MsgServer interface {
	// AuthorizeCircuitBreaker allows a super-admin to grant (or revoke) another
	// account's circuit breaker permissions.
	AuthorizeCircuitBreaker(context.Context, *MsgAuthorizeCircuitBreaker) (*MsgAuthorizeCircuitBreakerResponse, error)
	// TripCircuitBreaker pauses processing of Msg's in the state machine.
	TripCircuitBreaker(context.Context, *MsgTripCircuitBreaker) (*MsgTripCircuitBreakerResponse, error)
	// ResetCircuitBreaker resumes processing of Msg's in the state machine that
	// have been been paused using TripCircuitBreaker.
	ResetCircuitBreaker(context.Context, *MsgResetCircuitBreaker) (*MsgResetCircuitBreakerResponse, error)
}

MsgServer is the server API for Msg service.

type MsgTripCircuitBreaker

type MsgTripCircuitBreaker struct {
	// authority is the account authorized to trip the circuit breaker.
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	// msg_type_urls specifies a list of type URLs to immediately stop processing.
	// IF IT IS LEFT EMPTY, ALL MSG PROCESSING WILL STOP IMMEDIATELY.
	// This value is validated against the authority's permissions and if the
	// authority does not have permissions to trip the specified msg type URLs
	// (or all URLs), the operation will fail.
	MsgTypeUrls []string `protobuf:"bytes,2,rep,name=msg_type_urls,json=msgTypeUrls,proto3" json:"msg_type_urls,omitempty"`
}

MsgTripCircuitBreaker defines the Msg/TripCircuitBreaker request type.

func (*MsgTripCircuitBreaker) Descriptor

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

func (*MsgTripCircuitBreaker) GetAuthority

func (m *MsgTripCircuitBreaker) GetAuthority() string

func (*MsgTripCircuitBreaker) GetMsgTypeUrls

func (m *MsgTripCircuitBreaker) GetMsgTypeUrls() []string

func (*MsgTripCircuitBreaker) Marshal

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

func (*MsgTripCircuitBreaker) MarshalTo

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

func (*MsgTripCircuitBreaker) MarshalToSizedBuffer

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

func (*MsgTripCircuitBreaker) ProtoMessage

func (*MsgTripCircuitBreaker) ProtoMessage()

func (*MsgTripCircuitBreaker) Reset

func (m *MsgTripCircuitBreaker) Reset()

func (*MsgTripCircuitBreaker) Size

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

func (*MsgTripCircuitBreaker) String

func (m *MsgTripCircuitBreaker) String() string

func (*MsgTripCircuitBreaker) Unmarshal

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

func (*MsgTripCircuitBreaker) XXX_DiscardUnknown

func (m *MsgTripCircuitBreaker) XXX_DiscardUnknown()

func (*MsgTripCircuitBreaker) XXX_Marshal

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

func (*MsgTripCircuitBreaker) XXX_Merge

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

func (*MsgTripCircuitBreaker) XXX_Size

func (m *MsgTripCircuitBreaker) XXX_Size() int

func (*MsgTripCircuitBreaker) XXX_Unmarshal

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

type MsgTripCircuitBreakerResponse

type MsgTripCircuitBreakerResponse struct {
	Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
}

MsgTripCircuitBreakerResponse defines the Msg/TripCircuitBreaker response type.

func (*MsgTripCircuitBreakerResponse) Descriptor

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

func (*MsgTripCircuitBreakerResponse) GetSuccess

func (m *MsgTripCircuitBreakerResponse) GetSuccess() bool

func (*MsgTripCircuitBreakerResponse) Marshal

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

func (*MsgTripCircuitBreakerResponse) MarshalTo

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

func (*MsgTripCircuitBreakerResponse) MarshalToSizedBuffer

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

func (*MsgTripCircuitBreakerResponse) ProtoMessage

func (*MsgTripCircuitBreakerResponse) ProtoMessage()

func (*MsgTripCircuitBreakerResponse) Reset

func (m *MsgTripCircuitBreakerResponse) Reset()

func (*MsgTripCircuitBreakerResponse) Size

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

func (*MsgTripCircuitBreakerResponse) String

func (*MsgTripCircuitBreakerResponse) Unmarshal

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

func (*MsgTripCircuitBreakerResponse) XXX_DiscardUnknown

func (m *MsgTripCircuitBreakerResponse) XXX_DiscardUnknown()

func (*MsgTripCircuitBreakerResponse) XXX_Marshal

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

func (*MsgTripCircuitBreakerResponse) XXX_Merge

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

func (*MsgTripCircuitBreakerResponse) XXX_Size

func (m *MsgTripCircuitBreakerResponse) XXX_Size() int

func (*MsgTripCircuitBreakerResponse) XXX_Unmarshal

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

type Permissions

type Permissions struct {
	// level is the level of permissions granted to this account.
	Level Permissions_Level `protobuf:"varint,1,opt,name=level,proto3,enum=cosmos.circuit.v1.Permissions_Level" json:"level,omitempty"`
	// limit_type_urls is used with LEVEL_SOME_MSGS to limit the lists of Msg type
	// URLs that the account can trip. It is an error to use limit_type_urls with
	// a level other than LEVEL_SOME_MSGS.
	LimitTypeUrls []string `protobuf:"bytes,2,rep,name=limit_type_urls,json=limitTypeUrls,proto3" json:"limit_type_urls,omitempty"`
}

Permissions are the permissions that an account has to trip or reset the circuit breaker.

func (*Permissions) Descriptor

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

func (*Permissions) GetLevel

func (m *Permissions) GetLevel() Permissions_Level

func (*Permissions) GetLimitTypeUrls

func (m *Permissions) GetLimitTypeUrls() []string

func (*Permissions) Marshal

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

func (*Permissions) MarshalTo

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

func (*Permissions) MarshalToSizedBuffer

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

func (*Permissions) ProtoMessage

func (*Permissions) ProtoMessage()

func (*Permissions) Reset

func (m *Permissions) Reset()

func (*Permissions) Size

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

func (*Permissions) String

func (m *Permissions) String() string

func (*Permissions) Unmarshal

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

func (*Permissions) XXX_DiscardUnknown

func (m *Permissions) XXX_DiscardUnknown()

func (*Permissions) XXX_Marshal

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

func (*Permissions) XXX_Merge

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

func (*Permissions) XXX_Size

func (m *Permissions) XXX_Size() int

func (*Permissions) XXX_Unmarshal

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

type Permissions_Level

type Permissions_Level int32

Level is the permission level.

const (
	// LEVEL_NONE_UNSPECIFIED indicates that the account will have no circuit
	// breaker permissions.
	Permissions_LEVEL_NONE_UNSPECIFIED Permissions_Level = 0
	// LEVEL_SOME_MSGS indicates that the account will have permission to
	// trip or reset the circuit breaker for some Msg type URLs. If this level
	// is chosen, a non-empty list of Msg type URLs must be provided in
	// limit_type_urls.
	Permissions_LEVEL_SOME_MSGS Permissions_Level = 1
	// LEVEL_ALL_MSGS indicates that the account can trip or reset the circuit
	// breaker for Msg's of all type URLs.
	Permissions_LEVEL_ALL_MSGS Permissions_Level = 2
	// LEVEL_SUPER_ADMIN indicates that the account can take all circuit breaker
	// actions and can grant permissions to other accounts.
	Permissions_LEVEL_SUPER_ADMIN Permissions_Level = 3
)

func (Permissions_Level) EnumDescriptor

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

func (Permissions_Level) String

func (x Permissions_Level) String() string

type QueryAccountRequest

type QueryAccountRequest struct {
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
}

QueryAccountRequest is the request type for the Query/Account RPC method.

func (*QueryAccountRequest) Descriptor

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

func (*QueryAccountRequest) GetAddress

func (m *QueryAccountRequest) GetAddress() string

func (*QueryAccountRequest) Marshal

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

func (*QueryAccountRequest) MarshalTo

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

func (*QueryAccountRequest) MarshalToSizedBuffer

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

func (*QueryAccountRequest) ProtoMessage

func (*QueryAccountRequest) ProtoMessage()

func (*QueryAccountRequest) Reset

func (m *QueryAccountRequest) Reset()

func (*QueryAccountRequest) Size

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

func (*QueryAccountRequest) String

func (m *QueryAccountRequest) String() string

func (*QueryAccountRequest) Unmarshal

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

func (*QueryAccountRequest) XXX_DiscardUnknown

func (m *QueryAccountRequest) XXX_DiscardUnknown()

func (*QueryAccountRequest) XXX_Marshal

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

func (*QueryAccountRequest) XXX_Merge

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

func (*QueryAccountRequest) XXX_Size

func (m *QueryAccountRequest) XXX_Size() int

func (*QueryAccountRequest) XXX_Unmarshal

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

type QueryAccountsRequest

type QueryAccountsRequest struct {
	// pagination defines an optional pagination for the request.
	Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryAccountsRequest is the request type for the Query/Accounts RPC method.

func (*QueryAccountsRequest) Descriptor

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

func (*QueryAccountsRequest) GetPagination

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

func (*QueryAccountsRequest) Marshal

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

func (*QueryAccountsRequest) MarshalTo

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

func (*QueryAccountsRequest) MarshalToSizedBuffer

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

func (*QueryAccountsRequest) ProtoMessage

func (*QueryAccountsRequest) ProtoMessage()

func (*QueryAccountsRequest) Reset

func (m *QueryAccountsRequest) Reset()

func (*QueryAccountsRequest) Size

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

func (*QueryAccountsRequest) String

func (m *QueryAccountsRequest) String() string

func (*QueryAccountsRequest) Unmarshal

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

func (*QueryAccountsRequest) XXX_DiscardUnknown

func (m *QueryAccountsRequest) XXX_DiscardUnknown()

func (*QueryAccountsRequest) XXX_Marshal

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

func (*QueryAccountsRequest) XXX_Merge

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

func (*QueryAccountsRequest) XXX_Size

func (m *QueryAccountsRequest) XXX_Size() int

func (*QueryAccountsRequest) XXX_Unmarshal

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

type QueryClient

type QueryClient interface {
	// Account returns account permissions.
	Account(ctx context.Context, in *QueryAccountRequest, opts ...grpc.CallOption) (*AccountResponse, error)
	// Account returns account permissions.
	Accounts(ctx context.Context, in *QueryAccountsRequest, opts ...grpc.CallOption) (*AccountsResponse, error)
	// DisabledList returns a list of disabled message urls
	DisabledList(ctx context.Context, in *QueryDisabledListRequest, opts ...grpc.CallOption) (*DisabledListResponse, 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 QueryDisabledListRequest

type QueryDisabledListRequest struct {
}

QueryDisableListRequest is the request type for the Query/DisabledList RPC method.

func (*QueryDisabledListRequest) Descriptor

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

func (*QueryDisabledListRequest) Marshal

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

func (*QueryDisabledListRequest) MarshalTo

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

func (*QueryDisabledListRequest) MarshalToSizedBuffer

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

func (*QueryDisabledListRequest) ProtoMessage

func (*QueryDisabledListRequest) ProtoMessage()

func (*QueryDisabledListRequest) Reset

func (m *QueryDisabledListRequest) Reset()

func (*QueryDisabledListRequest) Size

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

func (*QueryDisabledListRequest) String

func (m *QueryDisabledListRequest) String() string

func (*QueryDisabledListRequest) Unmarshal

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

func (*QueryDisabledListRequest) XXX_DiscardUnknown

func (m *QueryDisabledListRequest) XXX_DiscardUnknown()

func (*QueryDisabledListRequest) XXX_Marshal

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

func (*QueryDisabledListRequest) XXX_Merge

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

func (*QueryDisabledListRequest) XXX_Size

func (m *QueryDisabledListRequest) XXX_Size() int

func (*QueryDisabledListRequest) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	// Account returns account permissions.
	Account(context.Context, *QueryAccountRequest) (*AccountResponse, error)
	// Account returns account permissions.
	Accounts(context.Context, *QueryAccountsRequest) (*AccountsResponse, error)
	// DisabledList returns a list of disabled message urls
	DisabledList(context.Context, *QueryDisabledListRequest) (*DisabledListResponse, error)
}

QueryServer is the server API for Query service.

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) AuthorizeCircuitBreaker

func (*UnimplementedMsgServer) ResetCircuitBreaker

func (*UnimplementedMsgServer) TripCircuitBreaker

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Account

func (*UnimplementedQueryServer) Accounts

func (*UnimplementedQueryServer) DisabledList

Jump to

Keyboard shortcuts

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