Documentation ¶
Overview ¶
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func ExtractAddressesFromGrantKey(key []byte) (granterAddr, granteeAddr sdk.AccAddress)
- func GetAuthorizationStoreKey(grantee sdk.AccAddress, granter sdk.AccAddress, msgType string) []byte
- func RegisterInterfaces(registry types.InterfaceRegistry)
- func RegisterMsgServer(s grpc1.Server, srv MsgServer)
- func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
- func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
- func RegisterQueryServer(s grpc1.Server, srv QueryServer)
- func ValidateGenesis(data GenesisState) error
- type AccountKeeper
- type AuthorizationGrant
- func (*AuthorizationGrant) Descriptor() ([]byte, []int)
- func (m *AuthorizationGrant) GetAuthorization() *types.Any
- func (auth AuthorizationGrant) GetAuthorizationGrant() exported.Authorization
- func (m *AuthorizationGrant) GetExpiration() time.Time
- func (m *AuthorizationGrant) Marshal() (dAtA []byte, err error)
- func (m *AuthorizationGrant) MarshalTo(dAtA []byte) (int, error)
- func (m *AuthorizationGrant) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*AuthorizationGrant) ProtoMessage()
- func (m *AuthorizationGrant) Reset()
- func (m *AuthorizationGrant) Size() (n int)
- func (m *AuthorizationGrant) String() string
- func (m *AuthorizationGrant) Unmarshal(dAtA []byte) error
- func (auth AuthorizationGrant) UnpackInterfaces(unpacker types.AnyUnpacker) error
- func (m *AuthorizationGrant) XXX_DiscardUnknown()
- func (m *AuthorizationGrant) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AuthorizationGrant) XXX_Merge(src proto.Message)
- func (m *AuthorizationGrant) XXX_Size() int
- func (m *AuthorizationGrant) XXX_Unmarshal(b []byte) error
- type BankKeeper
- type GenericAuthorization
- func (cap GenericAuthorization) Accept(msg sdk.ServiceMsg, block tmproto.Header) (updated exported.Authorization, delete bool, err error)
- func (*GenericAuthorization) Descriptor() ([]byte, []int)
- func (m *GenericAuthorization) GetMessageName() string
- func (m *GenericAuthorization) Marshal() (dAtA []byte, err error)
- func (m *GenericAuthorization) MarshalTo(dAtA []byte) (int, error)
- func (m *GenericAuthorization) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (cap GenericAuthorization) MethodName() string
- func (*GenericAuthorization) ProtoMessage()
- func (m *GenericAuthorization) Reset()
- func (m *GenericAuthorization) Size() (n int)
- func (m *GenericAuthorization) String() string
- func (m *GenericAuthorization) Unmarshal(dAtA []byte) error
- func (m *GenericAuthorization) XXX_DiscardUnknown()
- func (m *GenericAuthorization) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GenericAuthorization) XXX_Merge(src proto.Message)
- func (m *GenericAuthorization) XXX_Size() int
- func (m *GenericAuthorization) XXX_Unmarshal(b []byte) error
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetAuthorization() []GrantAuthorization
- func (m *GenesisState) Marshal() (dAtA []byte, err error)
- func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)
- func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GenesisState) ProtoMessage()
- func (m *GenesisState) Reset()
- func (m *GenesisState) Size() (n int)
- func (m *GenesisState) String() string
- func (m *GenesisState) Unmarshal(dAtA []byte) error
- func (data GenesisState) UnpackInterfaces(unpacker types.AnyUnpacker) error
- func (m *GenesisState) XXX_DiscardUnknown()
- func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GenesisState) XXX_Merge(src proto.Message)
- func (m *GenesisState) XXX_Size() int
- func (m *GenesisState) XXX_Unmarshal(b []byte) error
- type GrantAuthorization
- func (*GrantAuthorization) Descriptor() ([]byte, []int)
- func (m *GrantAuthorization) GetAuthorization() *types.Any
- func (m *GrantAuthorization) GetExpiration() time.Time
- func (m *GrantAuthorization) GetGrantee() string
- func (m *GrantAuthorization) GetGranter() string
- func (m *GrantAuthorization) Marshal() (dAtA []byte, err error)
- func (m *GrantAuthorization) MarshalTo(dAtA []byte) (int, error)
- func (m *GrantAuthorization) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GrantAuthorization) ProtoMessage()
- func (m *GrantAuthorization) Reset()
- func (m *GrantAuthorization) Size() (n int)
- func (m *GrantAuthorization) String() string
- func (m *GrantAuthorization) Unmarshal(dAtA []byte) error
- func (msg GrantAuthorization) UnpackInterfaces(unpacker types.AnyUnpacker) error
- func (m *GrantAuthorization) XXX_DiscardUnknown()
- func (m *GrantAuthorization) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GrantAuthorization) XXX_Merge(src proto.Message)
- func (m *GrantAuthorization) XXX_Size() int
- func (m *GrantAuthorization) XXX_Unmarshal(b []byte) error
- type MsgClient
- type MsgExecAuthorizedRequest
- func (*MsgExecAuthorizedRequest) Descriptor() ([]byte, []int)
- func (m *MsgExecAuthorizedRequest) GetGrantee() string
- func (m *MsgExecAuthorizedRequest) GetMsgs() []*types.Any
- func (msg MsgExecAuthorizedRequest) GetServiceMsgs() ([]sdk.ServiceMsg, error)
- func (msg MsgExecAuthorizedRequest) GetSigners() []sdk.AccAddress
- func (m *MsgExecAuthorizedRequest) Marshal() (dAtA []byte, err error)
- func (m *MsgExecAuthorizedRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgExecAuthorizedRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgExecAuthorizedRequest) ProtoMessage()
- func (m *MsgExecAuthorizedRequest) Reset()
- func (m *MsgExecAuthorizedRequest) Size() (n int)
- func (m *MsgExecAuthorizedRequest) String() string
- func (m *MsgExecAuthorizedRequest) Unmarshal(dAtA []byte) error
- func (msg MsgExecAuthorizedRequest) UnpackInterfaces(unpacker types.AnyUnpacker) error
- func (msg MsgExecAuthorizedRequest) ValidateBasic() error
- func (m *MsgExecAuthorizedRequest) XXX_DiscardUnknown()
- func (m *MsgExecAuthorizedRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgExecAuthorizedRequest) XXX_Merge(src proto.Message)
- func (m *MsgExecAuthorizedRequest) XXX_Size() int
- func (m *MsgExecAuthorizedRequest) XXX_Unmarshal(b []byte) error
- type MsgExecAuthorizedResponse
- func (*MsgExecAuthorizedResponse) Descriptor() ([]byte, []int)
- func (m *MsgExecAuthorizedResponse) GetResult() *types1.Result
- func (m *MsgExecAuthorizedResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgExecAuthorizedResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgExecAuthorizedResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgExecAuthorizedResponse) ProtoMessage()
- func (m *MsgExecAuthorizedResponse) Reset()
- func (m *MsgExecAuthorizedResponse) Size() (n int)
- func (m *MsgExecAuthorizedResponse) String() string
- func (m *MsgExecAuthorizedResponse) Unmarshal(dAtA []byte) error
- func (m *MsgExecAuthorizedResponse) XXX_DiscardUnknown()
- func (m *MsgExecAuthorizedResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgExecAuthorizedResponse) XXX_Merge(src proto.Message)
- func (m *MsgExecAuthorizedResponse) XXX_Size() int
- func (m *MsgExecAuthorizedResponse) XXX_Unmarshal(b []byte) error
- type MsgGrantAuthorizationRequest
- func (*MsgGrantAuthorizationRequest) Descriptor() ([]byte, []int)
- func (m *MsgGrantAuthorizationRequest) GetAuthorization() *types.Any
- func (m *MsgGrantAuthorizationRequest) GetExpiration() time.Time
- func (msg *MsgGrantAuthorizationRequest) GetGrantAuthorization() exported.Authorization
- func (m *MsgGrantAuthorizationRequest) GetGrantee() string
- func (m *MsgGrantAuthorizationRequest) GetGranter() string
- func (msg MsgGrantAuthorizationRequest) GetSigners() []sdk.AccAddress
- func (m *MsgGrantAuthorizationRequest) Marshal() (dAtA []byte, err error)
- func (m *MsgGrantAuthorizationRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgGrantAuthorizationRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgGrantAuthorizationRequest) ProtoMessage()
- func (m *MsgGrantAuthorizationRequest) Reset()
- func (msg *MsgGrantAuthorizationRequest) SetAuthorization(authorization exported.Authorization) error
- func (m *MsgGrantAuthorizationRequest) Size() (n int)
- func (m *MsgGrantAuthorizationRequest) String() string
- func (m *MsgGrantAuthorizationRequest) Unmarshal(dAtA []byte) error
- func (msg MsgGrantAuthorizationRequest) UnpackInterfaces(unpacker types.AnyUnpacker) error
- func (msg MsgGrantAuthorizationRequest) ValidateBasic() error
- func (m *MsgGrantAuthorizationRequest) XXX_DiscardUnknown()
- func (m *MsgGrantAuthorizationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgGrantAuthorizationRequest) XXX_Merge(src proto.Message)
- func (m *MsgGrantAuthorizationRequest) XXX_Size() int
- func (m *MsgGrantAuthorizationRequest) XXX_Unmarshal(b []byte) error
- type MsgGrantAuthorizationResponse
- func (*MsgGrantAuthorizationResponse) Descriptor() ([]byte, []int)
- func (m *MsgGrantAuthorizationResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgGrantAuthorizationResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgGrantAuthorizationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgGrantAuthorizationResponse) ProtoMessage()
- func (m *MsgGrantAuthorizationResponse) Reset()
- func (m *MsgGrantAuthorizationResponse) Size() (n int)
- func (m *MsgGrantAuthorizationResponse) String() string
- func (m *MsgGrantAuthorizationResponse) Unmarshal(dAtA []byte) error
- func (m *MsgGrantAuthorizationResponse) XXX_DiscardUnknown()
- func (m *MsgGrantAuthorizationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgGrantAuthorizationResponse) XXX_Merge(src proto.Message)
- func (m *MsgGrantAuthorizationResponse) XXX_Size() int
- func (m *MsgGrantAuthorizationResponse) XXX_Unmarshal(b []byte) error
- type MsgRevokeAuthorizationRequest
- func (*MsgRevokeAuthorizationRequest) Descriptor() ([]byte, []int)
- func (m *MsgRevokeAuthorizationRequest) GetGrantee() string
- func (m *MsgRevokeAuthorizationRequest) GetGranter() string
- func (m *MsgRevokeAuthorizationRequest) GetMethodName() string
- func (msg MsgRevokeAuthorizationRequest) GetSigners() []sdk.AccAddress
- func (m *MsgRevokeAuthorizationRequest) Marshal() (dAtA []byte, err error)
- func (m *MsgRevokeAuthorizationRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgRevokeAuthorizationRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgRevokeAuthorizationRequest) ProtoMessage()
- func (m *MsgRevokeAuthorizationRequest) Reset()
- func (m *MsgRevokeAuthorizationRequest) Size() (n int)
- func (m *MsgRevokeAuthorizationRequest) String() string
- func (m *MsgRevokeAuthorizationRequest) Unmarshal(dAtA []byte) error
- func (msg MsgRevokeAuthorizationRequest) ValidateBasic() error
- func (m *MsgRevokeAuthorizationRequest) XXX_DiscardUnknown()
- func (m *MsgRevokeAuthorizationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgRevokeAuthorizationRequest) XXX_Merge(src proto.Message)
- func (m *MsgRevokeAuthorizationRequest) XXX_Size() int
- func (m *MsgRevokeAuthorizationRequest) XXX_Unmarshal(b []byte) error
- type MsgRevokeAuthorizationResponse
- func (*MsgRevokeAuthorizationResponse) Descriptor() ([]byte, []int)
- func (m *MsgRevokeAuthorizationResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgRevokeAuthorizationResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgRevokeAuthorizationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgRevokeAuthorizationResponse) ProtoMessage()
- func (m *MsgRevokeAuthorizationResponse) Reset()
- func (m *MsgRevokeAuthorizationResponse) Size() (n int)
- func (m *MsgRevokeAuthorizationResponse) String() string
- func (m *MsgRevokeAuthorizationResponse) Unmarshal(dAtA []byte) error
- func (m *MsgRevokeAuthorizationResponse) XXX_DiscardUnknown()
- func (m *MsgRevokeAuthorizationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgRevokeAuthorizationResponse) XXX_Merge(src proto.Message)
- func (m *MsgRevokeAuthorizationResponse) XXX_Size() int
- func (m *MsgRevokeAuthorizationResponse) XXX_Unmarshal(b []byte) error
- type MsgServer
- type QueryAuthorizationRequest
- func (*QueryAuthorizationRequest) Descriptor() ([]byte, []int)
- func (m *QueryAuthorizationRequest) GetGrantee() string
- func (m *QueryAuthorizationRequest) GetGranter() string
- func (m *QueryAuthorizationRequest) GetMethodName() string
- func (m *QueryAuthorizationRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryAuthorizationRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryAuthorizationRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryAuthorizationRequest) ProtoMessage()
- func (m *QueryAuthorizationRequest) Reset()
- func (m *QueryAuthorizationRequest) Size() (n int)
- func (m *QueryAuthorizationRequest) String() string
- func (m *QueryAuthorizationRequest) Unmarshal(dAtA []byte) error
- func (m *QueryAuthorizationRequest) XXX_DiscardUnknown()
- func (m *QueryAuthorizationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryAuthorizationRequest) XXX_Merge(src proto.Message)
- func (m *QueryAuthorizationRequest) XXX_Size() int
- func (m *QueryAuthorizationRequest) XXX_Unmarshal(b []byte) error
- type QueryAuthorizationResponse
- func (*QueryAuthorizationResponse) Descriptor() ([]byte, []int)
- func (m *QueryAuthorizationResponse) GetAuthorization() *AuthorizationGrant
- func (m *QueryAuthorizationResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryAuthorizationResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryAuthorizationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryAuthorizationResponse) ProtoMessage()
- func (m *QueryAuthorizationResponse) Reset()
- func (m *QueryAuthorizationResponse) Size() (n int)
- func (m *QueryAuthorizationResponse) String() string
- func (m *QueryAuthorizationResponse) Unmarshal(dAtA []byte) error
- func (m *QueryAuthorizationResponse) XXX_DiscardUnknown()
- func (m *QueryAuthorizationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryAuthorizationResponse) XXX_Merge(src proto.Message)
- func (m *QueryAuthorizationResponse) XXX_Size() int
- func (m *QueryAuthorizationResponse) XXX_Unmarshal(b []byte) error
- type QueryAuthorizationsRequest
- func (*QueryAuthorizationsRequest) Descriptor() ([]byte, []int)
- func (m *QueryAuthorizationsRequest) GetGrantee() string
- func (m *QueryAuthorizationsRequest) GetGranter() string
- func (m *QueryAuthorizationsRequest) GetPagination() *query.PageRequest
- func (m *QueryAuthorizationsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryAuthorizationsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryAuthorizationsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryAuthorizationsRequest) ProtoMessage()
- func (m *QueryAuthorizationsRequest) Reset()
- func (m *QueryAuthorizationsRequest) Size() (n int)
- func (m *QueryAuthorizationsRequest) String() string
- func (m *QueryAuthorizationsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryAuthorizationsRequest) XXX_DiscardUnknown()
- func (m *QueryAuthorizationsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryAuthorizationsRequest) XXX_Merge(src proto.Message)
- func (m *QueryAuthorizationsRequest) XXX_Size() int
- func (m *QueryAuthorizationsRequest) XXX_Unmarshal(b []byte) error
- type QueryAuthorizationsResponse
- func (*QueryAuthorizationsResponse) Descriptor() ([]byte, []int)
- func (m *QueryAuthorizationsResponse) GetAuthorizations() []*AuthorizationGrant
- func (m *QueryAuthorizationsResponse) GetPagination() *query.PageResponse
- func (m *QueryAuthorizationsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryAuthorizationsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryAuthorizationsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryAuthorizationsResponse) ProtoMessage()
- func (m *QueryAuthorizationsResponse) Reset()
- func (m *QueryAuthorizationsResponse) Size() (n int)
- func (m *QueryAuthorizationsResponse) String() string
- func (m *QueryAuthorizationsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryAuthorizationsResponse) XXX_DiscardUnknown()
- func (m *QueryAuthorizationsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryAuthorizationsResponse) XXX_Merge(src proto.Message)
- func (m *QueryAuthorizationsResponse) XXX_Size() int
- func (m *QueryAuthorizationsResponse) XXX_Unmarshal(b []byte) error
- type QueryClient
- type QueryServer
- type UnimplementedMsgServer
- func (*UnimplementedMsgServer) ExecAuthorized(ctx context.Context, req *MsgExecAuthorizedRequest) (*MsgExecAuthorizedResponse, error)
- func (*UnimplementedMsgServer) GrantAuthorization(ctx context.Context, req *MsgGrantAuthorizationRequest) (*MsgGrantAuthorizationResponse, error)
- func (*UnimplementedMsgServer) RevokeAuthorization(ctx context.Context, req *MsgRevokeAuthorizationRequest) (*MsgRevokeAuthorizationResponse, error)
- type UnimplementedQueryServer
Constants ¶
const ( EventGrantAuthorization = "grant-authorization" EventRevokeAuthorization = "revoke-authorization" EventExecuteAuthorization = "execute-authorization" AttributeKeyGrantType = "grant-type" AttributeKeyGranteeAddress = "grantee" AttributeKeyGranterAddress = "granter" AttributeValueCategory = ModuleName )
authz module events
const ( // ModuleName is the module name constant used in many places ModuleName = "authz" // StoreKey is the store key string for authz StoreKey = ModuleName // RouterKey is the message route for authz RouterKey = ModuleName // QuerierRoute is the querier route for authz QuerierRoute = ModuleName )
Variables ¶
var ( ErrInvalidLengthAuthz = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowAuthz = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupAuthz = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") )
var (
ErrInvalidExpirationTime = sdkerrors.Register(ModuleName, 3, "expiration time of authorization should be more than current time")
)
x/authz module sentinel errors
var ( // Keys for store prefixes GrantKey = []byte{0x01} // prefix for each key )
Functions ¶
func ExtractAddressesFromGrantKey ¶
func ExtractAddressesFromGrantKey(key []byte) (granterAddr, granteeAddr sdk.AccAddress)
ExtractAddressesFromGrantKey - split granter & grantee address from the authorization key
func GetAuthorizationStoreKey ¶
func GetAuthorizationStoreKey(grantee sdk.AccAddress, granter sdk.AccAddress, msgType string) []byte
GetAuthorizationStoreKey - return authorization store key
func RegisterInterfaces ¶
func RegisterInterfaces(registry types.InterfaceRegistry)
RegisterInterfaces registers the interfaces types with the interface registry
func RegisterMsgServer ¶
func RegisterQueryHandler ¶
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 (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.
func RegisterQueryServer ¶
func RegisterQueryServer(s grpc1.Server, srv QueryServer)
func ValidateGenesis ¶
func ValidateGenesis(data GenesisState) error
ValidateGenesis check the given genesis state has no integrity issues
Types ¶
type AccountKeeper ¶
AccountKeeper defines the expected account keeper (noalias)
type AuthorizationGrant ¶
type AuthorizationGrant struct { Authorization *types.Any `protobuf:"bytes,1,opt,name=authorization,proto3" json:"authorization,omitempty"` Expiration time.Time `protobuf:"bytes,2,opt,name=expiration,proto3,stdtime" json:"expiration"` }
AuthorizationGrant gives permissions to execute the provide method with expiration time.
func NewAuthorizationGrant ¶
func NewAuthorizationGrant(authorization exported.Authorization, expiration time.Time) (AuthorizationGrant, error)
NewAuthorizationGrant returns new AuthrizationGrant
func (*AuthorizationGrant) Descriptor ¶
func (*AuthorizationGrant) Descriptor() ([]byte, []int)
func (*AuthorizationGrant) GetAuthorization ¶
func (m *AuthorizationGrant) GetAuthorization() *types.Any
func (AuthorizationGrant) GetAuthorizationGrant ¶
func (auth AuthorizationGrant) GetAuthorizationGrant() exported.Authorization
GetAuthorizationGrant returns the cached value from the AuthorizationGrant.Authorization if present.
func (*AuthorizationGrant) GetExpiration ¶
func (m *AuthorizationGrant) GetExpiration() time.Time
func (*AuthorizationGrant) Marshal ¶
func (m *AuthorizationGrant) Marshal() (dAtA []byte, err error)
func (*AuthorizationGrant) MarshalTo ¶
func (m *AuthorizationGrant) MarshalTo(dAtA []byte) (int, error)
func (*AuthorizationGrant) MarshalToSizedBuffer ¶
func (m *AuthorizationGrant) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*AuthorizationGrant) ProtoMessage ¶
func (*AuthorizationGrant) ProtoMessage()
func (*AuthorizationGrant) Reset ¶
func (m *AuthorizationGrant) Reset()
func (*AuthorizationGrant) Size ¶
func (m *AuthorizationGrant) Size() (n int)
func (*AuthorizationGrant) String ¶
func (m *AuthorizationGrant) String() string
func (*AuthorizationGrant) Unmarshal ¶
func (m *AuthorizationGrant) Unmarshal(dAtA []byte) error
func (AuthorizationGrant) UnpackInterfaces ¶
func (auth AuthorizationGrant) UnpackInterfaces(unpacker types.AnyUnpacker) error
UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces
func (*AuthorizationGrant) XXX_DiscardUnknown ¶
func (m *AuthorizationGrant) XXX_DiscardUnknown()
func (*AuthorizationGrant) XXX_Marshal ¶
func (m *AuthorizationGrant) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AuthorizationGrant) XXX_Merge ¶
func (m *AuthorizationGrant) XXX_Merge(src proto.Message)
func (*AuthorizationGrant) XXX_Size ¶
func (m *AuthorizationGrant) XXX_Size() int
func (*AuthorizationGrant) XXX_Unmarshal ¶
func (m *AuthorizationGrant) XXX_Unmarshal(b []byte) error
type BankKeeper ¶
BankKeeper defines the expected interface needed to retrieve account balances.
type GenericAuthorization ¶
type GenericAuthorization struct { // method name to grant unrestricted permissions to execute // Note: MethodName() is already a method on `GenericAuthorization` type, // we need some custom naming here so using `MessageName` MessageName string `protobuf:"bytes,1,opt,name=method_name,json=methodName,proto3" json:"method_name,omitempty"` }
GenericAuthorization gives the grantee unrestricted permissions to execute the provided method on behalf of the granter's account.
func NewGenericAuthorization ¶
func NewGenericAuthorization(methodName string) *GenericAuthorization
NewGenericAuthorization creates a new GenericAuthorization object.
func (GenericAuthorization) Accept ¶
func (cap GenericAuthorization) Accept(msg sdk.ServiceMsg, block tmproto.Header) (updated exported.Authorization, delete bool, err error)
Accept implements Authorization.Accept.
func (*GenericAuthorization) Descriptor ¶
func (*GenericAuthorization) Descriptor() ([]byte, []int)
func (*GenericAuthorization) GetMessageName ¶
func (m *GenericAuthorization) GetMessageName() string
func (*GenericAuthorization) Marshal ¶
func (m *GenericAuthorization) Marshal() (dAtA []byte, err error)
func (*GenericAuthorization) MarshalTo ¶
func (m *GenericAuthorization) MarshalTo(dAtA []byte) (int, error)
func (*GenericAuthorization) MarshalToSizedBuffer ¶
func (m *GenericAuthorization) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (GenericAuthorization) MethodName ¶
func (cap GenericAuthorization) MethodName() string
MethodName implements Authorization.MethodName.
func (*GenericAuthorization) ProtoMessage ¶
func (*GenericAuthorization) ProtoMessage()
func (*GenericAuthorization) Reset ¶
func (m *GenericAuthorization) Reset()
func (*GenericAuthorization) Size ¶
func (m *GenericAuthorization) Size() (n int)
func (*GenericAuthorization) String ¶
func (m *GenericAuthorization) String() string
func (*GenericAuthorization) Unmarshal ¶
func (m *GenericAuthorization) Unmarshal(dAtA []byte) error
func (*GenericAuthorization) XXX_DiscardUnknown ¶
func (m *GenericAuthorization) XXX_DiscardUnknown()
func (*GenericAuthorization) XXX_Marshal ¶
func (m *GenericAuthorization) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GenericAuthorization) XXX_Merge ¶
func (m *GenericAuthorization) XXX_Merge(src proto.Message)
func (*GenericAuthorization) XXX_Size ¶
func (m *GenericAuthorization) XXX_Size() int
func (*GenericAuthorization) XXX_Unmarshal ¶
func (m *GenericAuthorization) XXX_Unmarshal(b []byte) error
type GenesisState ¶
type GenesisState struct {
Authorization []GrantAuthorization `protobuf:"bytes,1,rep,name=authorization,proto3" json:"authorization"`
}
GenesisState defines the authz module's genesis state.
func DefaultGenesisState ¶
func DefaultGenesisState() *GenesisState
DefaultGenesisState - Return a default genesis state
func NewGenesisState ¶
func NewGenesisState(entries []GrantAuthorization) *GenesisState
NewGenesisState creates new GenesisState object
func (*GenesisState) Descriptor ¶
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) GetAuthorization ¶
func (m *GenesisState) GetAuthorization() []GrantAuthorization
func (*GenesisState) Marshal ¶
func (m *GenesisState) Marshal() (dAtA []byte, err 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) UnpackInterfaces ¶
func (data GenesisState) UnpackInterfaces(unpacker types.AnyUnpacker) error
UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces
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 GrantAuthorization ¶
type GrantAuthorization struct { Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"` Authorization *types.Any `protobuf:"bytes,3,opt,name=authorization,proto3" json:"authorization,omitempty"` Expiration time.Time `protobuf:"bytes,4,opt,name=expiration,proto3,stdtime" json:"expiration"` }
GrantAuthorization defines the GenesisState/GrantAuthorization type.
func (*GrantAuthorization) Descriptor ¶
func (*GrantAuthorization) Descriptor() ([]byte, []int)
func (*GrantAuthorization) GetAuthorization ¶
func (m *GrantAuthorization) GetAuthorization() *types.Any
func (*GrantAuthorization) GetExpiration ¶
func (m *GrantAuthorization) GetExpiration() time.Time
func (*GrantAuthorization) GetGrantee ¶
func (m *GrantAuthorization) GetGrantee() string
func (*GrantAuthorization) GetGranter ¶
func (m *GrantAuthorization) GetGranter() string
func (*GrantAuthorization) Marshal ¶
func (m *GrantAuthorization) Marshal() (dAtA []byte, err error)
func (*GrantAuthorization) MarshalTo ¶
func (m *GrantAuthorization) MarshalTo(dAtA []byte) (int, error)
func (*GrantAuthorization) MarshalToSizedBuffer ¶
func (m *GrantAuthorization) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GrantAuthorization) ProtoMessage ¶
func (*GrantAuthorization) ProtoMessage()
func (*GrantAuthorization) Reset ¶
func (m *GrantAuthorization) Reset()
func (*GrantAuthorization) Size ¶
func (m *GrantAuthorization) Size() (n int)
func (*GrantAuthorization) String ¶
func (m *GrantAuthorization) String() string
func (*GrantAuthorization) Unmarshal ¶
func (m *GrantAuthorization) Unmarshal(dAtA []byte) error
func (GrantAuthorization) UnpackInterfaces ¶
func (msg GrantAuthorization) UnpackInterfaces(unpacker types.AnyUnpacker) error
UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces
func (*GrantAuthorization) XXX_DiscardUnknown ¶
func (m *GrantAuthorization) XXX_DiscardUnknown()
func (*GrantAuthorization) XXX_Marshal ¶
func (m *GrantAuthorization) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GrantAuthorization) XXX_Merge ¶
func (m *GrantAuthorization) XXX_Merge(src proto.Message)
func (*GrantAuthorization) XXX_Size ¶
func (m *GrantAuthorization) XXX_Size() int
func (*GrantAuthorization) XXX_Unmarshal ¶
func (m *GrantAuthorization) XXX_Unmarshal(b []byte) error
type MsgClient ¶
type MsgClient interface { // GrantAuthorization grants the provided authorization to the grantee on the granter's // account with the provided expiration time. GrantAuthorization(ctx context.Context, in *MsgGrantAuthorizationRequest, opts ...grpc.CallOption) (*MsgGrantAuthorizationResponse, error) // ExecAuthorized attempts to execute the provided messages using // authorizations granted to the grantee. Each message should have only // one signer corresponding to the granter of the authorization. ExecAuthorized(ctx context.Context, in *MsgExecAuthorizedRequest, opts ...grpc.CallOption) (*MsgExecAuthorizedResponse, error) // RevokeAuthorization revokes any authorization corresponding to the provided method name on the // granter's account that has been granted to the grantee. RevokeAuthorization(ctx context.Context, in *MsgRevokeAuthorizationRequest, opts ...grpc.CallOption) (*MsgRevokeAuthorizationResponse, 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 MsgExecAuthorizedRequest ¶
type MsgExecAuthorizedRequest struct { Grantee string `protobuf:"bytes,1,opt,name=grantee,proto3" json:"grantee,omitempty"` Msgs []*types.Any `protobuf:"bytes,2,rep,name=msgs,proto3" json:"msgs,omitempty"` }
MsgExecAuthorizedRequest attempts to execute the provided messages using authorizations granted to the grantee. Each message should have only one signer corresponding to the granter of the authorization.
func NewMsgExecAuthorized ¶
func NewMsgExecAuthorized(grantee sdk.AccAddress, msgs []sdk.ServiceMsg) MsgExecAuthorizedRequest
NewMsgExecAuthorized creates a new MsgExecAuthorized
func (*MsgExecAuthorizedRequest) Descriptor ¶
func (*MsgExecAuthorizedRequest) Descriptor() ([]byte, []int)
func (*MsgExecAuthorizedRequest) GetGrantee ¶
func (m *MsgExecAuthorizedRequest) GetGrantee() string
func (*MsgExecAuthorizedRequest) GetMsgs ¶
func (m *MsgExecAuthorizedRequest) GetMsgs() []*types.Any
func (MsgExecAuthorizedRequest) GetServiceMsgs ¶
func (msg MsgExecAuthorizedRequest) GetServiceMsgs() ([]sdk.ServiceMsg, error)
GetServiceMsgs returns the cache values from the MsgExecAuthorized.Msgs if present.
func (MsgExecAuthorizedRequest) GetSigners ¶
func (msg MsgExecAuthorizedRequest) GetSigners() []sdk.AccAddress
GetSigners implements Msg
func (*MsgExecAuthorizedRequest) Marshal ¶
func (m *MsgExecAuthorizedRequest) Marshal() (dAtA []byte, err error)
func (*MsgExecAuthorizedRequest) MarshalTo ¶
func (m *MsgExecAuthorizedRequest) MarshalTo(dAtA []byte) (int, error)
func (*MsgExecAuthorizedRequest) MarshalToSizedBuffer ¶
func (m *MsgExecAuthorizedRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgExecAuthorizedRequest) ProtoMessage ¶
func (*MsgExecAuthorizedRequest) ProtoMessage()
func (*MsgExecAuthorizedRequest) Reset ¶
func (m *MsgExecAuthorizedRequest) Reset()
func (*MsgExecAuthorizedRequest) Size ¶
func (m *MsgExecAuthorizedRequest) Size() (n int)
func (*MsgExecAuthorizedRequest) String ¶
func (m *MsgExecAuthorizedRequest) String() string
func (*MsgExecAuthorizedRequest) Unmarshal ¶
func (m *MsgExecAuthorizedRequest) Unmarshal(dAtA []byte) error
func (MsgExecAuthorizedRequest) UnpackInterfaces ¶
func (msg MsgExecAuthorizedRequest) UnpackInterfaces(unpacker types.AnyUnpacker) error
UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces
func (MsgExecAuthorizedRequest) ValidateBasic ¶
func (msg MsgExecAuthorizedRequest) ValidateBasic() error
ValidateBasic implements Msg
func (*MsgExecAuthorizedRequest) XXX_DiscardUnknown ¶
func (m *MsgExecAuthorizedRequest) XXX_DiscardUnknown()
func (*MsgExecAuthorizedRequest) XXX_Marshal ¶
func (m *MsgExecAuthorizedRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgExecAuthorizedRequest) XXX_Merge ¶
func (m *MsgExecAuthorizedRequest) XXX_Merge(src proto.Message)
func (*MsgExecAuthorizedRequest) XXX_Size ¶
func (m *MsgExecAuthorizedRequest) XXX_Size() int
func (*MsgExecAuthorizedRequest) XXX_Unmarshal ¶
func (m *MsgExecAuthorizedRequest) XXX_Unmarshal(b []byte) error
type MsgExecAuthorizedResponse ¶
type MsgExecAuthorizedResponse struct {
Result *types1.Result `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
}
MsgExecAuthorizedResponse defines the Msg/MsgExecAuthorizedResponse response type.
func (*MsgExecAuthorizedResponse) Descriptor ¶
func (*MsgExecAuthorizedResponse) Descriptor() ([]byte, []int)
func (*MsgExecAuthorizedResponse) GetResult ¶
func (m *MsgExecAuthorizedResponse) GetResult() *types1.Result
func (*MsgExecAuthorizedResponse) Marshal ¶
func (m *MsgExecAuthorizedResponse) Marshal() (dAtA []byte, err error)
func (*MsgExecAuthorizedResponse) MarshalTo ¶
func (m *MsgExecAuthorizedResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgExecAuthorizedResponse) MarshalToSizedBuffer ¶
func (m *MsgExecAuthorizedResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgExecAuthorizedResponse) ProtoMessage ¶
func (*MsgExecAuthorizedResponse) ProtoMessage()
func (*MsgExecAuthorizedResponse) Reset ¶
func (m *MsgExecAuthorizedResponse) Reset()
func (*MsgExecAuthorizedResponse) Size ¶
func (m *MsgExecAuthorizedResponse) Size() (n int)
func (*MsgExecAuthorizedResponse) String ¶
func (m *MsgExecAuthorizedResponse) String() string
func (*MsgExecAuthorizedResponse) Unmarshal ¶
func (m *MsgExecAuthorizedResponse) Unmarshal(dAtA []byte) error
func (*MsgExecAuthorizedResponse) XXX_DiscardUnknown ¶
func (m *MsgExecAuthorizedResponse) XXX_DiscardUnknown()
func (*MsgExecAuthorizedResponse) XXX_Marshal ¶
func (m *MsgExecAuthorizedResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgExecAuthorizedResponse) XXX_Merge ¶
func (m *MsgExecAuthorizedResponse) XXX_Merge(src proto.Message)
func (*MsgExecAuthorizedResponse) XXX_Size ¶
func (m *MsgExecAuthorizedResponse) XXX_Size() int
func (*MsgExecAuthorizedResponse) XXX_Unmarshal ¶
func (m *MsgExecAuthorizedResponse) XXX_Unmarshal(b []byte) error
type MsgGrantAuthorizationRequest ¶
type MsgGrantAuthorizationRequest struct { Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"` Authorization *types.Any `protobuf:"bytes,3,opt,name=authorization,proto3" json:"authorization,omitempty"` Expiration time.Time `protobuf:"bytes,4,opt,name=expiration,proto3,stdtime" json:"expiration"` }
MsgGrantAuthorizationRequest grants the provided authorization to the grantee on the granter's account with the provided expiration time.
func NewMsgGrantAuthorization ¶
func NewMsgGrantAuthorization(granter sdk.AccAddress, grantee sdk.AccAddress, authorization exported.Authorization, expiration time.Time) (*MsgGrantAuthorizationRequest, error)
NewMsgGrantAuthorization creates a new MsgGrantAuthorization
func (*MsgGrantAuthorizationRequest) Descriptor ¶
func (*MsgGrantAuthorizationRequest) Descriptor() ([]byte, []int)
func (*MsgGrantAuthorizationRequest) GetAuthorization ¶
func (m *MsgGrantAuthorizationRequest) GetAuthorization() *types.Any
func (*MsgGrantAuthorizationRequest) GetExpiration ¶
func (m *MsgGrantAuthorizationRequest) GetExpiration() time.Time
func (*MsgGrantAuthorizationRequest) GetGrantAuthorization ¶
func (msg *MsgGrantAuthorizationRequest) GetGrantAuthorization() exported.Authorization
GetGrantAuthorization returns the cache value from the MsgGrantAuthorization.Authorization if present.
func (*MsgGrantAuthorizationRequest) GetGrantee ¶
func (m *MsgGrantAuthorizationRequest) GetGrantee() string
func (*MsgGrantAuthorizationRequest) GetGranter ¶
func (m *MsgGrantAuthorizationRequest) GetGranter() string
func (MsgGrantAuthorizationRequest) GetSigners ¶
func (msg MsgGrantAuthorizationRequest) GetSigners() []sdk.AccAddress
GetSigners implements Msg
func (*MsgGrantAuthorizationRequest) Marshal ¶
func (m *MsgGrantAuthorizationRequest) Marshal() (dAtA []byte, err error)
func (*MsgGrantAuthorizationRequest) MarshalTo ¶
func (m *MsgGrantAuthorizationRequest) MarshalTo(dAtA []byte) (int, error)
func (*MsgGrantAuthorizationRequest) MarshalToSizedBuffer ¶
func (m *MsgGrantAuthorizationRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgGrantAuthorizationRequest) ProtoMessage ¶
func (*MsgGrantAuthorizationRequest) ProtoMessage()
func (*MsgGrantAuthorizationRequest) Reset ¶
func (m *MsgGrantAuthorizationRequest) Reset()
func (*MsgGrantAuthorizationRequest) SetAuthorization ¶
func (msg *MsgGrantAuthorizationRequest) SetAuthorization(authorization exported.Authorization) error
SetAuthorization converts Authorization to any and adds it to MsgGrantAuthorization.Authorization.
func (*MsgGrantAuthorizationRequest) Size ¶
func (m *MsgGrantAuthorizationRequest) Size() (n int)
func (*MsgGrantAuthorizationRequest) String ¶
func (m *MsgGrantAuthorizationRequest) String() string
func (*MsgGrantAuthorizationRequest) Unmarshal ¶
func (m *MsgGrantAuthorizationRequest) Unmarshal(dAtA []byte) error
func (MsgGrantAuthorizationRequest) UnpackInterfaces ¶
func (msg MsgGrantAuthorizationRequest) UnpackInterfaces(unpacker types.AnyUnpacker) error
UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces
func (MsgGrantAuthorizationRequest) ValidateBasic ¶
func (msg MsgGrantAuthorizationRequest) ValidateBasic() error
ValidateBasic implements Msg
func (*MsgGrantAuthorizationRequest) XXX_DiscardUnknown ¶
func (m *MsgGrantAuthorizationRequest) XXX_DiscardUnknown()
func (*MsgGrantAuthorizationRequest) XXX_Marshal ¶
func (m *MsgGrantAuthorizationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgGrantAuthorizationRequest) XXX_Merge ¶
func (m *MsgGrantAuthorizationRequest) XXX_Merge(src proto.Message)
func (*MsgGrantAuthorizationRequest) XXX_Size ¶
func (m *MsgGrantAuthorizationRequest) XXX_Size() int
func (*MsgGrantAuthorizationRequest) XXX_Unmarshal ¶
func (m *MsgGrantAuthorizationRequest) XXX_Unmarshal(b []byte) error
type MsgGrantAuthorizationResponse ¶
type MsgGrantAuthorizationResponse struct { }
MsgGrantAuthorizationResponse defines the Msg/MsgGrantAuthorization response type.
func (*MsgGrantAuthorizationResponse) Descriptor ¶
func (*MsgGrantAuthorizationResponse) Descriptor() ([]byte, []int)
func (*MsgGrantAuthorizationResponse) Marshal ¶
func (m *MsgGrantAuthorizationResponse) Marshal() (dAtA []byte, err error)
func (*MsgGrantAuthorizationResponse) MarshalTo ¶
func (m *MsgGrantAuthorizationResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgGrantAuthorizationResponse) MarshalToSizedBuffer ¶
func (m *MsgGrantAuthorizationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgGrantAuthorizationResponse) ProtoMessage ¶
func (*MsgGrantAuthorizationResponse) ProtoMessage()
func (*MsgGrantAuthorizationResponse) Reset ¶
func (m *MsgGrantAuthorizationResponse) Reset()
func (*MsgGrantAuthorizationResponse) Size ¶
func (m *MsgGrantAuthorizationResponse) Size() (n int)
func (*MsgGrantAuthorizationResponse) String ¶
func (m *MsgGrantAuthorizationResponse) String() string
func (*MsgGrantAuthorizationResponse) Unmarshal ¶
func (m *MsgGrantAuthorizationResponse) Unmarshal(dAtA []byte) error
func (*MsgGrantAuthorizationResponse) XXX_DiscardUnknown ¶
func (m *MsgGrantAuthorizationResponse) XXX_DiscardUnknown()
func (*MsgGrantAuthorizationResponse) XXX_Marshal ¶
func (m *MsgGrantAuthorizationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgGrantAuthorizationResponse) XXX_Merge ¶
func (m *MsgGrantAuthorizationResponse) XXX_Merge(src proto.Message)
func (*MsgGrantAuthorizationResponse) XXX_Size ¶
func (m *MsgGrantAuthorizationResponse) XXX_Size() int
func (*MsgGrantAuthorizationResponse) XXX_Unmarshal ¶
func (m *MsgGrantAuthorizationResponse) XXX_Unmarshal(b []byte) error
type MsgRevokeAuthorizationRequest ¶
type MsgRevokeAuthorizationRequest struct { Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"` MethodName string `protobuf:"bytes,3,opt,name=method_name,json=methodName,proto3" json:"method_name,omitempty"` }
MsgRevokeAuthorizationRequest revokes any authorization with the provided sdk.Msg type on the granter's account with that has been granted to the grantee.
func NewMsgRevokeAuthorization ¶
func NewMsgRevokeAuthorization(granter sdk.AccAddress, grantee sdk.AccAddress, methodName string) MsgRevokeAuthorizationRequest
NewMsgRevokeAuthorization creates a new MsgRevokeAuthorization
func (*MsgRevokeAuthorizationRequest) Descriptor ¶
func (*MsgRevokeAuthorizationRequest) Descriptor() ([]byte, []int)
func (*MsgRevokeAuthorizationRequest) GetGrantee ¶
func (m *MsgRevokeAuthorizationRequest) GetGrantee() string
func (*MsgRevokeAuthorizationRequest) GetGranter ¶
func (m *MsgRevokeAuthorizationRequest) GetGranter() string
func (*MsgRevokeAuthorizationRequest) GetMethodName ¶
func (m *MsgRevokeAuthorizationRequest) GetMethodName() string
func (MsgRevokeAuthorizationRequest) GetSigners ¶
func (msg MsgRevokeAuthorizationRequest) GetSigners() []sdk.AccAddress
GetSigners implements Msg
func (*MsgRevokeAuthorizationRequest) Marshal ¶
func (m *MsgRevokeAuthorizationRequest) Marshal() (dAtA []byte, err error)
func (*MsgRevokeAuthorizationRequest) MarshalTo ¶
func (m *MsgRevokeAuthorizationRequest) MarshalTo(dAtA []byte) (int, error)
func (*MsgRevokeAuthorizationRequest) MarshalToSizedBuffer ¶
func (m *MsgRevokeAuthorizationRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgRevokeAuthorizationRequest) ProtoMessage ¶
func (*MsgRevokeAuthorizationRequest) ProtoMessage()
func (*MsgRevokeAuthorizationRequest) Reset ¶
func (m *MsgRevokeAuthorizationRequest) Reset()
func (*MsgRevokeAuthorizationRequest) Size ¶
func (m *MsgRevokeAuthorizationRequest) Size() (n int)
func (*MsgRevokeAuthorizationRequest) String ¶
func (m *MsgRevokeAuthorizationRequest) String() string
func (*MsgRevokeAuthorizationRequest) Unmarshal ¶
func (m *MsgRevokeAuthorizationRequest) Unmarshal(dAtA []byte) error
func (MsgRevokeAuthorizationRequest) ValidateBasic ¶
func (msg MsgRevokeAuthorizationRequest) ValidateBasic() error
ValidateBasic implements MsgRequest.ValidateBasic
func (*MsgRevokeAuthorizationRequest) XXX_DiscardUnknown ¶
func (m *MsgRevokeAuthorizationRequest) XXX_DiscardUnknown()
func (*MsgRevokeAuthorizationRequest) XXX_Marshal ¶
func (m *MsgRevokeAuthorizationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgRevokeAuthorizationRequest) XXX_Merge ¶
func (m *MsgRevokeAuthorizationRequest) XXX_Merge(src proto.Message)
func (*MsgRevokeAuthorizationRequest) XXX_Size ¶
func (m *MsgRevokeAuthorizationRequest) XXX_Size() int
func (*MsgRevokeAuthorizationRequest) XXX_Unmarshal ¶
func (m *MsgRevokeAuthorizationRequest) XXX_Unmarshal(b []byte) error
type MsgRevokeAuthorizationResponse ¶
type MsgRevokeAuthorizationResponse struct { }
MsgRevokeAuthorizationResponse defines the Msg/MsgRevokeAuthorizationResponse response type.
func (*MsgRevokeAuthorizationResponse) Descriptor ¶
func (*MsgRevokeAuthorizationResponse) Descriptor() ([]byte, []int)
func (*MsgRevokeAuthorizationResponse) Marshal ¶
func (m *MsgRevokeAuthorizationResponse) Marshal() (dAtA []byte, err error)
func (*MsgRevokeAuthorizationResponse) MarshalTo ¶
func (m *MsgRevokeAuthorizationResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgRevokeAuthorizationResponse) MarshalToSizedBuffer ¶
func (m *MsgRevokeAuthorizationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgRevokeAuthorizationResponse) ProtoMessage ¶
func (*MsgRevokeAuthorizationResponse) ProtoMessage()
func (*MsgRevokeAuthorizationResponse) Reset ¶
func (m *MsgRevokeAuthorizationResponse) Reset()
func (*MsgRevokeAuthorizationResponse) Size ¶
func (m *MsgRevokeAuthorizationResponse) Size() (n int)
func (*MsgRevokeAuthorizationResponse) String ¶
func (m *MsgRevokeAuthorizationResponse) String() string
func (*MsgRevokeAuthorizationResponse) Unmarshal ¶
func (m *MsgRevokeAuthorizationResponse) Unmarshal(dAtA []byte) error
func (*MsgRevokeAuthorizationResponse) XXX_DiscardUnknown ¶
func (m *MsgRevokeAuthorizationResponse) XXX_DiscardUnknown()
func (*MsgRevokeAuthorizationResponse) XXX_Marshal ¶
func (m *MsgRevokeAuthorizationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgRevokeAuthorizationResponse) XXX_Merge ¶
func (m *MsgRevokeAuthorizationResponse) XXX_Merge(src proto.Message)
func (*MsgRevokeAuthorizationResponse) XXX_Size ¶
func (m *MsgRevokeAuthorizationResponse) XXX_Size() int
func (*MsgRevokeAuthorizationResponse) XXX_Unmarshal ¶
func (m *MsgRevokeAuthorizationResponse) XXX_Unmarshal(b []byte) error
type MsgServer ¶
type MsgServer interface { // GrantAuthorization grants the provided authorization to the grantee on the granter's // account with the provided expiration time. GrantAuthorization(context.Context, *MsgGrantAuthorizationRequest) (*MsgGrantAuthorizationResponse, error) // ExecAuthorized attempts to execute the provided messages using // authorizations granted to the grantee. Each message should have only // one signer corresponding to the granter of the authorization. ExecAuthorized(context.Context, *MsgExecAuthorizedRequest) (*MsgExecAuthorizedResponse, error) // RevokeAuthorization revokes any authorization corresponding to the provided method name on the // granter's account that has been granted to the grantee. RevokeAuthorization(context.Context, *MsgRevokeAuthorizationRequest) (*MsgRevokeAuthorizationResponse, error) }
MsgServer is the server API for Msg service.
type QueryAuthorizationRequest ¶
type QueryAuthorizationRequest struct { Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"` MethodName string `protobuf:"bytes,3,opt,name=method_name,json=methodName,proto3" json:"method_name,omitempty"` }
QueryAuthorizationRequest is the request type for the Query/Authorization RPC method.
func (*QueryAuthorizationRequest) Descriptor ¶
func (*QueryAuthorizationRequest) Descriptor() ([]byte, []int)
func (*QueryAuthorizationRequest) GetGrantee ¶
func (m *QueryAuthorizationRequest) GetGrantee() string
func (*QueryAuthorizationRequest) GetGranter ¶
func (m *QueryAuthorizationRequest) GetGranter() string
func (*QueryAuthorizationRequest) GetMethodName ¶
func (m *QueryAuthorizationRequest) GetMethodName() string
func (*QueryAuthorizationRequest) Marshal ¶
func (m *QueryAuthorizationRequest) Marshal() (dAtA []byte, err error)
func (*QueryAuthorizationRequest) MarshalTo ¶
func (m *QueryAuthorizationRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryAuthorizationRequest) MarshalToSizedBuffer ¶
func (m *QueryAuthorizationRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryAuthorizationRequest) ProtoMessage ¶
func (*QueryAuthorizationRequest) ProtoMessage()
func (*QueryAuthorizationRequest) Reset ¶
func (m *QueryAuthorizationRequest) Reset()
func (*QueryAuthorizationRequest) Size ¶
func (m *QueryAuthorizationRequest) Size() (n int)
func (*QueryAuthorizationRequest) String ¶
func (m *QueryAuthorizationRequest) String() string
func (*QueryAuthorizationRequest) Unmarshal ¶
func (m *QueryAuthorizationRequest) Unmarshal(dAtA []byte) error
func (*QueryAuthorizationRequest) XXX_DiscardUnknown ¶
func (m *QueryAuthorizationRequest) XXX_DiscardUnknown()
func (*QueryAuthorizationRequest) XXX_Marshal ¶
func (m *QueryAuthorizationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryAuthorizationRequest) XXX_Merge ¶
func (m *QueryAuthorizationRequest) XXX_Merge(src proto.Message)
func (*QueryAuthorizationRequest) XXX_Size ¶
func (m *QueryAuthorizationRequest) XXX_Size() int
func (*QueryAuthorizationRequest) XXX_Unmarshal ¶
func (m *QueryAuthorizationRequest) XXX_Unmarshal(b []byte) error
type QueryAuthorizationResponse ¶
type QueryAuthorizationResponse struct { // authorization is a authorization granted for grantee by granter. Authorization *AuthorizationGrant `protobuf:"bytes,1,opt,name=authorization,proto3" json:"authorization,omitempty"` }
QueryAuthorizationResponse is the response type for the Query/Authorization RPC method.
func (*QueryAuthorizationResponse) Descriptor ¶
func (*QueryAuthorizationResponse) Descriptor() ([]byte, []int)
func (*QueryAuthorizationResponse) GetAuthorization ¶
func (m *QueryAuthorizationResponse) GetAuthorization() *AuthorizationGrant
func (*QueryAuthorizationResponse) Marshal ¶
func (m *QueryAuthorizationResponse) Marshal() (dAtA []byte, err error)
func (*QueryAuthorizationResponse) MarshalTo ¶
func (m *QueryAuthorizationResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryAuthorizationResponse) MarshalToSizedBuffer ¶
func (m *QueryAuthorizationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryAuthorizationResponse) ProtoMessage ¶
func (*QueryAuthorizationResponse) ProtoMessage()
func (*QueryAuthorizationResponse) Reset ¶
func (m *QueryAuthorizationResponse) Reset()
func (*QueryAuthorizationResponse) Size ¶
func (m *QueryAuthorizationResponse) Size() (n int)
func (*QueryAuthorizationResponse) String ¶
func (m *QueryAuthorizationResponse) String() string
func (*QueryAuthorizationResponse) Unmarshal ¶
func (m *QueryAuthorizationResponse) Unmarshal(dAtA []byte) error
func (*QueryAuthorizationResponse) XXX_DiscardUnknown ¶
func (m *QueryAuthorizationResponse) XXX_DiscardUnknown()
func (*QueryAuthorizationResponse) XXX_Marshal ¶
func (m *QueryAuthorizationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryAuthorizationResponse) XXX_Merge ¶
func (m *QueryAuthorizationResponse) XXX_Merge(src proto.Message)
func (*QueryAuthorizationResponse) XXX_Size ¶
func (m *QueryAuthorizationResponse) XXX_Size() int
func (*QueryAuthorizationResponse) XXX_Unmarshal ¶
func (m *QueryAuthorizationResponse) XXX_Unmarshal(b []byte) error
type QueryAuthorizationsRequest ¶
type QueryAuthorizationsRequest struct { Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"` // pagination defines an pagination for the request. Pagination *query.PageRequest `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` }
QueryAuthorizationsRequest is the request type for the Query/Authorizations RPC method.
func (*QueryAuthorizationsRequest) Descriptor ¶
func (*QueryAuthorizationsRequest) Descriptor() ([]byte, []int)
func (*QueryAuthorizationsRequest) GetGrantee ¶
func (m *QueryAuthorizationsRequest) GetGrantee() string
func (*QueryAuthorizationsRequest) GetGranter ¶
func (m *QueryAuthorizationsRequest) GetGranter() string
func (*QueryAuthorizationsRequest) GetPagination ¶
func (m *QueryAuthorizationsRequest) GetPagination() *query.PageRequest
func (*QueryAuthorizationsRequest) Marshal ¶
func (m *QueryAuthorizationsRequest) Marshal() (dAtA []byte, err error)
func (*QueryAuthorizationsRequest) MarshalTo ¶
func (m *QueryAuthorizationsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryAuthorizationsRequest) MarshalToSizedBuffer ¶
func (m *QueryAuthorizationsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryAuthorizationsRequest) ProtoMessage ¶
func (*QueryAuthorizationsRequest) ProtoMessage()
func (*QueryAuthorizationsRequest) Reset ¶
func (m *QueryAuthorizationsRequest) Reset()
func (*QueryAuthorizationsRequest) Size ¶
func (m *QueryAuthorizationsRequest) Size() (n int)
func (*QueryAuthorizationsRequest) String ¶
func (m *QueryAuthorizationsRequest) String() string
func (*QueryAuthorizationsRequest) Unmarshal ¶
func (m *QueryAuthorizationsRequest) Unmarshal(dAtA []byte) error
func (*QueryAuthorizationsRequest) XXX_DiscardUnknown ¶
func (m *QueryAuthorizationsRequest) XXX_DiscardUnknown()
func (*QueryAuthorizationsRequest) XXX_Marshal ¶
func (m *QueryAuthorizationsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryAuthorizationsRequest) XXX_Merge ¶
func (m *QueryAuthorizationsRequest) XXX_Merge(src proto.Message)
func (*QueryAuthorizationsRequest) XXX_Size ¶
func (m *QueryAuthorizationsRequest) XXX_Size() int
func (*QueryAuthorizationsRequest) XXX_Unmarshal ¶
func (m *QueryAuthorizationsRequest) XXX_Unmarshal(b []byte) error
type QueryAuthorizationsResponse ¶
type QueryAuthorizationsResponse struct { // authorizations is a list of grants granted for grantee by granter. Authorizations []*AuthorizationGrant `protobuf:"bytes,1,rep,name=authorizations,proto3" json:"authorizations,omitempty"` // pagination defines an pagination for the response. Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` }
QueryAuthorizationsResponse is the response type for the Query/Authorizations RPC method.
func (*QueryAuthorizationsResponse) Descriptor ¶
func (*QueryAuthorizationsResponse) Descriptor() ([]byte, []int)
func (*QueryAuthorizationsResponse) GetAuthorizations ¶
func (m *QueryAuthorizationsResponse) GetAuthorizations() []*AuthorizationGrant
func (*QueryAuthorizationsResponse) GetPagination ¶
func (m *QueryAuthorizationsResponse) GetPagination() *query.PageResponse
func (*QueryAuthorizationsResponse) Marshal ¶
func (m *QueryAuthorizationsResponse) Marshal() (dAtA []byte, err error)
func (*QueryAuthorizationsResponse) MarshalTo ¶
func (m *QueryAuthorizationsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryAuthorizationsResponse) MarshalToSizedBuffer ¶
func (m *QueryAuthorizationsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryAuthorizationsResponse) ProtoMessage ¶
func (*QueryAuthorizationsResponse) ProtoMessage()
func (*QueryAuthorizationsResponse) Reset ¶
func (m *QueryAuthorizationsResponse) Reset()
func (*QueryAuthorizationsResponse) Size ¶
func (m *QueryAuthorizationsResponse) Size() (n int)
func (*QueryAuthorizationsResponse) String ¶
func (m *QueryAuthorizationsResponse) String() string
func (*QueryAuthorizationsResponse) Unmarshal ¶
func (m *QueryAuthorizationsResponse) Unmarshal(dAtA []byte) error
func (*QueryAuthorizationsResponse) XXX_DiscardUnknown ¶
func (m *QueryAuthorizationsResponse) XXX_DiscardUnknown()
func (*QueryAuthorizationsResponse) XXX_Marshal ¶
func (m *QueryAuthorizationsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryAuthorizationsResponse) XXX_Merge ¶
func (m *QueryAuthorizationsResponse) XXX_Merge(src proto.Message)
func (*QueryAuthorizationsResponse) XXX_Size ¶
func (m *QueryAuthorizationsResponse) XXX_Size() int
func (*QueryAuthorizationsResponse) XXX_Unmarshal ¶
func (m *QueryAuthorizationsResponse) XXX_Unmarshal(b []byte) error
type QueryClient ¶
type QueryClient interface { // Returns any `Authorization` (or `nil`), with the expiration time, granted to the grantee by the granter for the // provided msg type. Authorization(ctx context.Context, in *QueryAuthorizationRequest, opts ...grpc.CallOption) (*QueryAuthorizationResponse, error) // Returns list of `Authorization`, granted to the grantee by the granter. Authorizations(ctx context.Context, in *QueryAuthorizationsRequest, opts ...grpc.CallOption) (*QueryAuthorizationsResponse, 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 QueryServer ¶
type QueryServer interface { // Returns any `Authorization` (or `nil`), with the expiration time, granted to the grantee by the granter for the // provided msg type. Authorization(context.Context, *QueryAuthorizationRequest) (*QueryAuthorizationResponse, error) // Returns list of `Authorization`, granted to the grantee by the granter. Authorizations(context.Context, *QueryAuthorizationsRequest) (*QueryAuthorizationsResponse, 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) ExecAuthorized ¶
func (*UnimplementedMsgServer) ExecAuthorized(ctx context.Context, req *MsgExecAuthorizedRequest) (*MsgExecAuthorizedResponse, error)
func (*UnimplementedMsgServer) GrantAuthorization ¶
func (*UnimplementedMsgServer) GrantAuthorization(ctx context.Context, req *MsgGrantAuthorizationRequest) (*MsgGrantAuthorizationResponse, error)
func (*UnimplementedMsgServer) RevokeAuthorization ¶
func (*UnimplementedMsgServer) RevokeAuthorization(ctx context.Context, req *MsgRevokeAuthorizationRequest) (*MsgRevokeAuthorizationResponse, error)
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) Authorization ¶
func (*UnimplementedQueryServer) Authorization(ctx context.Context, req *QueryAuthorizationRequest) (*QueryAuthorizationResponse, error)
func (*UnimplementedQueryServer) Authorizations ¶
func (*UnimplementedQueryServer) Authorizations(ctx context.Context, req *QueryAuthorizationsRequest) (*QueryAuthorizationsResponse, error)