Documentation ¶
Overview ¶
Package authz is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func MsgServiceDesc() *grpc.ServiceDesc
- 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 AcceptResponse
- type AccountKeeper
- type Authorization
- type BankKeeper
- type EventGrant
- func (*EventGrant) Descriptor() ([]byte, []int)
- func (m *EventGrant) GetGrantee() string
- func (m *EventGrant) GetGranter() string
- func (m *EventGrant) GetMsgTypeUrl() string
- func (m *EventGrant) Marshal() (dAtA []byte, err error)
- func (m *EventGrant) MarshalTo(dAtA []byte) (int, error)
- func (m *EventGrant) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*EventGrant) ProtoMessage()
- func (m *EventGrant) Reset()
- func (m *EventGrant) Size() (n int)
- func (m *EventGrant) String() string
- func (m *EventGrant) Unmarshal(dAtA []byte) error
- func (m *EventGrant) XXX_DiscardUnknown()
- func (m *EventGrant) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *EventGrant) XXX_Merge(src proto.Message)
- func (m *EventGrant) XXX_Size() int
- func (m *EventGrant) XXX_Unmarshal(b []byte) error
- type EventRevoke
- func (*EventRevoke) Descriptor() ([]byte, []int)
- func (m *EventRevoke) GetGrantee() string
- func (m *EventRevoke) GetGranter() string
- func (m *EventRevoke) GetMsgTypeUrl() string
- func (m *EventRevoke) Marshal() (dAtA []byte, err error)
- func (m *EventRevoke) MarshalTo(dAtA []byte) (int, error)
- func (m *EventRevoke) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*EventRevoke) ProtoMessage()
- func (m *EventRevoke) Reset()
- func (m *EventRevoke) Size() (n int)
- func (m *EventRevoke) String() string
- func (m *EventRevoke) Unmarshal(dAtA []byte) error
- func (m *EventRevoke) XXX_DiscardUnknown()
- func (m *EventRevoke) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *EventRevoke) XXX_Merge(src proto.Message)
- func (m *EventRevoke) XXX_Size() int
- func (m *EventRevoke) XXX_Unmarshal(b []byte) error
- type GenericAuthorization
- func (a GenericAuthorization) Accept(ctx sdk.Context, msg sdk.Msg) (AcceptResponse, error)
- func (*GenericAuthorization) Descriptor() ([]byte, []int)
- 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 (a GenericAuthorization) MsgTypeURL() 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 (a GenericAuthorization) ValidateBasic() 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 cdctypes.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 Grant
- func (*Grant) Descriptor() ([]byte, []int)
- func (g Grant) GetAuthorization() Authorization
- func (m *Grant) Marshal() (dAtA []byte, err error)
- func (m *Grant) MarshalTo(dAtA []byte) (int, error)
- func (m *Grant) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Grant) ProtoMessage()
- func (m *Grant) Reset()
- func (m *Grant) Size() (n int)
- func (m *Grant) String() string
- func (m *Grant) Unmarshal(dAtA []byte) error
- func (g Grant) UnpackInterfaces(unpacker cdctypes.AnyUnpacker) error
- func (g Grant) ValidateBasic() error
- func (m *Grant) XXX_DiscardUnknown()
- func (m *Grant) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Grant) XXX_Merge(src proto.Message)
- func (m *Grant) XXX_Size() int
- func (m *Grant) 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 cdctypes.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 MsgExec
- func (*MsgExec) Descriptor() ([]byte, []int)
- func (msg MsgExec) GetMessages() ([]sdk.Msg, error)
- func (msg MsgExec) GetSignBytes() []byte
- func (msg MsgExec) GetSigners() []sdk.AccAddress
- func (m *MsgExec) Marshal() (dAtA []byte, err error)
- func (m *MsgExec) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgExec) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgExec) ProtoMessage()
- func (m *MsgExec) Reset()
- func (msg MsgExec) Route() string
- func (m *MsgExec) Size() (n int)
- func (m *MsgExec) String() string
- func (msg MsgExec) Type() string
- func (m *MsgExec) Unmarshal(dAtA []byte) error
- func (msg MsgExec) UnpackInterfaces(unpacker cdctypes.AnyUnpacker) error
- func (msg MsgExec) ValidateBasic() error
- func (m *MsgExec) XXX_DiscardUnknown()
- func (m *MsgExec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgExec) XXX_Merge(src proto.Message)
- func (m *MsgExec) XXX_Size() int
- func (m *MsgExec) XXX_Unmarshal(b []byte) error
- type MsgExecResponse
- func (*MsgExecResponse) Descriptor() ([]byte, []int)
- func (m *MsgExecResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgExecResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgExecResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgExecResponse) ProtoMessage()
- func (m *MsgExecResponse) Reset()
- func (m *MsgExecResponse) Size() (n int)
- func (m *MsgExecResponse) String() string
- func (m *MsgExecResponse) Unmarshal(dAtA []byte) error
- func (m *MsgExecResponse) XXX_DiscardUnknown()
- func (m *MsgExecResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgExecResponse) XXX_Merge(src proto.Message)
- func (m *MsgExecResponse) XXX_Size() int
- func (m *MsgExecResponse) XXX_Unmarshal(b []byte) error
- type MsgGrant
- func (*MsgGrant) Descriptor() ([]byte, []int)
- func (msg *MsgGrant) GetAuthorization() Authorization
- func (msg MsgGrant) GetSignBytes() []byte
- func (msg MsgGrant) GetSigners() []sdk.AccAddress
- func (m *MsgGrant) Marshal() (dAtA []byte, err error)
- func (m *MsgGrant) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgGrant) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgGrant) ProtoMessage()
- func (m *MsgGrant) Reset()
- func (msg MsgGrant) Route() string
- func (msg *MsgGrant) SetAuthorization(a Authorization) error
- func (m *MsgGrant) Size() (n int)
- func (m *MsgGrant) String() string
- func (msg MsgGrant) Type() string
- func (m *MsgGrant) Unmarshal(dAtA []byte) error
- func (msg MsgGrant) UnpackInterfaces(unpacker cdctypes.AnyUnpacker) error
- func (msg MsgGrant) ValidateBasic() error
- func (m *MsgGrant) XXX_DiscardUnknown()
- func (m *MsgGrant) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgGrant) XXX_Merge(src proto.Message)
- func (m *MsgGrant) XXX_Size() int
- func (m *MsgGrant) XXX_Unmarshal(b []byte) error
- type MsgGrantResponse
- func (*MsgGrantResponse) Descriptor() ([]byte, []int)
- func (m *MsgGrantResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgGrantResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgGrantResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgGrantResponse) ProtoMessage()
- func (m *MsgGrantResponse) Reset()
- func (m *MsgGrantResponse) Size() (n int)
- func (m *MsgGrantResponse) String() string
- func (m *MsgGrantResponse) Unmarshal(dAtA []byte) error
- func (m *MsgGrantResponse) XXX_DiscardUnknown()
- func (m *MsgGrantResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgGrantResponse) XXX_Merge(src proto.Message)
- func (m *MsgGrantResponse) XXX_Size() int
- func (m *MsgGrantResponse) XXX_Unmarshal(b []byte) error
- type MsgRevoke
- func (*MsgRevoke) Descriptor() ([]byte, []int)
- func (msg MsgRevoke) GetSignBytes() []byte
- func (msg MsgRevoke) GetSigners() []sdk.AccAddress
- func (m *MsgRevoke) Marshal() (dAtA []byte, err error)
- func (m *MsgRevoke) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgRevoke) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgRevoke) ProtoMessage()
- func (m *MsgRevoke) Reset()
- func (msg MsgRevoke) Route() string
- func (m *MsgRevoke) Size() (n int)
- func (m *MsgRevoke) String() string
- func (msg MsgRevoke) Type() string
- func (m *MsgRevoke) Unmarshal(dAtA []byte) error
- func (msg MsgRevoke) ValidateBasic() error
- func (m *MsgRevoke) XXX_DiscardUnknown()
- func (m *MsgRevoke) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgRevoke) XXX_Merge(src proto.Message)
- func (m *MsgRevoke) XXX_Size() int
- func (m *MsgRevoke) XXX_Unmarshal(b []byte) error
- type MsgRevokeResponse
- func (*MsgRevokeResponse) Descriptor() ([]byte, []int)
- func (m *MsgRevokeResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgRevokeResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgRevokeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgRevokeResponse) ProtoMessage()
- func (m *MsgRevokeResponse) Reset()
- func (m *MsgRevokeResponse) Size() (n int)
- func (m *MsgRevokeResponse) String() string
- func (m *MsgRevokeResponse) Unmarshal(dAtA []byte) error
- func (m *MsgRevokeResponse) XXX_DiscardUnknown()
- func (m *MsgRevokeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgRevokeResponse) XXX_Merge(src proto.Message)
- func (m *MsgRevokeResponse) XXX_Size() int
- func (m *MsgRevokeResponse) XXX_Unmarshal(b []byte) error
- type MsgServer
- type QueryClient
- type QueryGranterGrantsRequest
- func (*QueryGranterGrantsRequest) Descriptor() ([]byte, []int)
- func (m *QueryGranterGrantsRequest) GetGranter() string
- func (m *QueryGranterGrantsRequest) GetPagination() *query.PageRequest
- func (m *QueryGranterGrantsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryGranterGrantsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryGranterGrantsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryGranterGrantsRequest) ProtoMessage()
- func (m *QueryGranterGrantsRequest) Reset()
- func (m *QueryGranterGrantsRequest) Size() (n int)
- func (m *QueryGranterGrantsRequest) String() string
- func (m *QueryGranterGrantsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryGranterGrantsRequest) XXX_DiscardUnknown()
- func (m *QueryGranterGrantsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryGranterGrantsRequest) XXX_Merge(src proto.Message)
- func (m *QueryGranterGrantsRequest) XXX_Size() int
- func (m *QueryGranterGrantsRequest) XXX_Unmarshal(b []byte) error
- type QueryGranterGrantsResponse
- func (*QueryGranterGrantsResponse) Descriptor() ([]byte, []int)
- func (m *QueryGranterGrantsResponse) GetGrants() []*Grant
- func (m *QueryGranterGrantsResponse) GetPagination() *query.PageResponse
- func (m *QueryGranterGrantsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryGranterGrantsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryGranterGrantsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryGranterGrantsResponse) ProtoMessage()
- func (m *QueryGranterGrantsResponse) Reset()
- func (m *QueryGranterGrantsResponse) Size() (n int)
- func (m *QueryGranterGrantsResponse) String() string
- func (m *QueryGranterGrantsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryGranterGrantsResponse) XXX_DiscardUnknown()
- func (m *QueryGranterGrantsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryGranterGrantsResponse) XXX_Merge(src proto.Message)
- func (m *QueryGranterGrantsResponse) XXX_Size() int
- func (m *QueryGranterGrantsResponse) XXX_Unmarshal(b []byte) error
- type QueryGrantsRequest
- func (*QueryGrantsRequest) Descriptor() ([]byte, []int)
- func (m *QueryGrantsRequest) GetGrantee() string
- func (m *QueryGrantsRequest) GetGranter() string
- func (m *QueryGrantsRequest) GetMsgTypeUrl() string
- func (m *QueryGrantsRequest) GetPagination() *query.PageRequest
- func (m *QueryGrantsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryGrantsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryGrantsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryGrantsRequest) ProtoMessage()
- func (m *QueryGrantsRequest) Reset()
- func (m *QueryGrantsRequest) Size() (n int)
- func (m *QueryGrantsRequest) String() string
- func (m *QueryGrantsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryGrantsRequest) XXX_DiscardUnknown()
- func (m *QueryGrantsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryGrantsRequest) XXX_Merge(src proto.Message)
- func (m *QueryGrantsRequest) XXX_Size() int
- func (m *QueryGrantsRequest) XXX_Unmarshal(b []byte) error
- type QueryGrantsResponse
- func (*QueryGrantsResponse) Descriptor() ([]byte, []int)
- func (m *QueryGrantsResponse) GetGrants() []*Grant
- func (m *QueryGrantsResponse) GetPagination() *query.PageResponse
- func (m *QueryGrantsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryGrantsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryGrantsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryGrantsResponse) ProtoMessage()
- func (m *QueryGrantsResponse) Reset()
- func (m *QueryGrantsResponse) Size() (n int)
- func (m *QueryGrantsResponse) String() string
- func (m *QueryGrantsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryGrantsResponse) XXX_DiscardUnknown()
- func (m *QueryGrantsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryGrantsResponse) XXX_Merge(src proto.Message)
- func (m *QueryGrantsResponse) XXX_Size() int
- func (m *QueryGrantsResponse) XXX_Unmarshal(b []byte) error
- type QueryServer
- type UnimplementedMsgServer
- type UnimplementedQueryServer
Constants ¶
const ( // ModuleName is the module name constant used in many places ModuleName = "authz" // 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 ( ErrInvalidLengthEvent = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowEvent = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupEvent = 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
Functions ¶
func MsgServiceDesc ¶
func MsgServiceDesc() *grpc.ServiceDesc
MsgServiceDesc return ServiceDesc for Msg server
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 AcceptResponse ¶
type AcceptResponse struct { // If Accept=true, the controller can accept and authorization and handle the update. Accept bool // If Delete=true, the controller must delete the authorization object and release // storage resources. Delete bool // Controller, who is calling Authorization.Accept must check if `Updated != nil`. If yes, // it must use the updated version and handle the update on the storage level. Updated Authorization }
AcceptResponse instruments the controller of an authz message if the request is accepted and if it should be updated or deleted.
type AccountKeeper ¶
type AccountKeeper interface {
GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI
}
AccountKeeper defines the expected account keeper (noalias)
type Authorization ¶
type Authorization interface { proto.Message // MsgTypeURL returns the fully-qualified Msg service method URL (as described in ADR 031), // which will process and accept or reject a request. MsgTypeURL() string // Accept determines whether this grant permits the provided sdk.Msg to be performed, // and if so provides an upgraded authorization instance. Accept(ctx sdk.Context, msg sdk.Msg) (AcceptResponse, error) // ValidateBasic does a simple validation check that // doesn't require access to any other information. ValidateBasic() error }
Authorization represents the interface of various Authorization types implemented by other modules.
type BankKeeper ¶
type BankKeeper interface { SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins IsSendEnabledCoins(ctx sdk.Context, coins ...sdk.Coin) error }
BankKeeper defines the expected interface needed to retrieve account balances.
type EventGrant ¶
type EventGrant struct { // Msg type URL for which an autorization is granted MsgTypeUrl string `protobuf:"bytes,2,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"` // Granter account address Granter string `protobuf:"bytes,3,opt,name=granter,proto3" json:"granter,omitempty"` // Grantee account address Grantee string `protobuf:"bytes,4,opt,name=grantee,proto3" json:"grantee,omitempty"` }
EventGrant is emitted on Msg/Grant
func (*EventGrant) Descriptor ¶
func (*EventGrant) Descriptor() ([]byte, []int)
func (*EventGrant) GetGrantee ¶
func (m *EventGrant) GetGrantee() string
func (*EventGrant) GetGranter ¶
func (m *EventGrant) GetGranter() string
func (*EventGrant) GetMsgTypeUrl ¶
func (m *EventGrant) GetMsgTypeUrl() string
func (*EventGrant) Marshal ¶
func (m *EventGrant) Marshal() (dAtA []byte, err error)
func (*EventGrant) MarshalToSizedBuffer ¶
func (m *EventGrant) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*EventGrant) ProtoMessage ¶
func (*EventGrant) ProtoMessage()
func (*EventGrant) Reset ¶
func (m *EventGrant) Reset()
func (*EventGrant) Size ¶
func (m *EventGrant) Size() (n int)
func (*EventGrant) String ¶
func (m *EventGrant) String() string
func (*EventGrant) Unmarshal ¶
func (m *EventGrant) Unmarshal(dAtA []byte) error
func (*EventGrant) XXX_DiscardUnknown ¶
func (m *EventGrant) XXX_DiscardUnknown()
func (*EventGrant) XXX_Marshal ¶
func (m *EventGrant) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*EventGrant) XXX_Merge ¶
func (m *EventGrant) XXX_Merge(src proto.Message)
func (*EventGrant) XXX_Size ¶
func (m *EventGrant) XXX_Size() int
func (*EventGrant) XXX_Unmarshal ¶
func (m *EventGrant) XXX_Unmarshal(b []byte) error
type EventRevoke ¶
type EventRevoke struct { // Msg type URL for which an autorization is revoked MsgTypeUrl string `protobuf:"bytes,2,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"` // Granter account address Granter string `protobuf:"bytes,3,opt,name=granter,proto3" json:"granter,omitempty"` // Grantee account address Grantee string `protobuf:"bytes,4,opt,name=grantee,proto3" json:"grantee,omitempty"` }
EventRevoke is emitted on Msg/Revoke
func (*EventRevoke) Descriptor ¶
func (*EventRevoke) Descriptor() ([]byte, []int)
func (*EventRevoke) GetGrantee ¶
func (m *EventRevoke) GetGrantee() string
func (*EventRevoke) GetGranter ¶
func (m *EventRevoke) GetGranter() string
func (*EventRevoke) GetMsgTypeUrl ¶
func (m *EventRevoke) GetMsgTypeUrl() string
func (*EventRevoke) Marshal ¶
func (m *EventRevoke) Marshal() (dAtA []byte, err error)
func (*EventRevoke) MarshalToSizedBuffer ¶
func (m *EventRevoke) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*EventRevoke) ProtoMessage ¶
func (*EventRevoke) ProtoMessage()
func (*EventRevoke) Reset ¶
func (m *EventRevoke) Reset()
func (*EventRevoke) Size ¶
func (m *EventRevoke) Size() (n int)
func (*EventRevoke) String ¶
func (m *EventRevoke) String() string
func (*EventRevoke) Unmarshal ¶
func (m *EventRevoke) Unmarshal(dAtA []byte) error
func (*EventRevoke) XXX_DiscardUnknown ¶
func (m *EventRevoke) XXX_DiscardUnknown()
func (*EventRevoke) XXX_Marshal ¶
func (m *EventRevoke) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*EventRevoke) XXX_Merge ¶
func (m *EventRevoke) XXX_Merge(src proto.Message)
func (*EventRevoke) XXX_Size ¶
func (m *EventRevoke) XXX_Size() int
func (*EventRevoke) XXX_Unmarshal ¶
func (m *EventRevoke) XXX_Unmarshal(b []byte) error
type GenericAuthorization ¶
type GenericAuthorization struct { // Msg, identified by it's type URL, to grant unrestricted permissions to execute Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` }
GenericAuthorization gives the grantee unrestricted permissions to execute the provided method on behalf of the granter's account.
func NewGenericAuthorization ¶
func NewGenericAuthorization(msgTypeURL string) *GenericAuthorization
NewGenericAuthorization creates a new GenericAuthorization object.
func (GenericAuthorization) Accept ¶
func (a GenericAuthorization) Accept(ctx sdk.Context, msg sdk.Msg) (AcceptResponse, error)
Accept implements Authorization.Accept.
func (*GenericAuthorization) Descriptor ¶
func (*GenericAuthorization) Descriptor() ([]byte, []int)
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) MsgTypeURL ¶
func (a GenericAuthorization) MsgTypeURL() string
MsgTypeURL implements Authorization.MsgTypeURL.
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) ValidateBasic ¶
func (a GenericAuthorization) ValidateBasic() error
ValidateBasic implements Authorization.ValidateBasic.
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 cdctypes.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 Grant ¶
type Grant 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"` }
Grant gives permissions to execute the provide method with expiration time.
func NewGrant ¶
func NewGrant(a Authorization, expiration time.Time) (Grant, error)
NewGrant returns new Grant
func (*Grant) Descriptor ¶
func (Grant) GetAuthorization ¶
func (g Grant) GetAuthorization() Authorization
GetAuthorization returns the cached value from the Grant.Authorization if present.
func (*Grant) ProtoMessage ¶
func (*Grant) ProtoMessage()
func (Grant) UnpackInterfaces ¶
func (g Grant) UnpackInterfaces(unpacker cdctypes.AnyUnpacker) error
UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces
func (Grant) ValidateBasic ¶
func (*Grant) XXX_DiscardUnknown ¶
func (m *Grant) XXX_DiscardUnknown()
func (*Grant) XXX_Marshal ¶
func (*Grant) XXX_Unmarshal ¶
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 cdctypes.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 { // Grant grants the provided authorization to the grantee on the granter's // account with the provided expiration time. If there is already a grant // for the given (granter, grantee, Authorization) triple, then the grant // will be overwritten. Grant(ctx context.Context, in *MsgGrant, opts ...grpc.CallOption) (*MsgGrantResponse, error) // Exec 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. Exec(ctx context.Context, in *MsgExec, opts ...grpc.CallOption) (*MsgExecResponse, error) // Revoke revokes any authorization corresponding to the provided method name on the // granter's account that has been granted to the grantee. Revoke(ctx context.Context, in *MsgRevoke, opts ...grpc.CallOption) (*MsgRevokeResponse, 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 MsgExec ¶
type MsgExec struct { Grantee string `protobuf:"bytes,1,opt,name=grantee,proto3" json:"grantee,omitempty"` // Authorization Msg requests to execute. Each msg must implement Authorization interface // The x/authz will try to find a grant matching (msg.signers[0], grantee, MsgTypeURL(msg)) // triple and validate it. Msgs []*types.Any `protobuf:"bytes,2,rep,name=msgs,proto3" json:"msgs,omitempty"` }
MsgExec 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 NewMsgExec ¶
func NewMsgExec(grantee sdk.AccAddress, msgs []sdk.Msg) MsgExec
NewMsgExec creates a new MsgExecAuthorized
func (*MsgExec) Descriptor ¶
func (MsgExec) GetMessages ¶
GetMessages returns the cache values from the MsgExecAuthorized.Msgs if present.
func (MsgExec) GetSignBytes ¶
GetSignBytes implements the LegacyMsg.GetSignBytes method.
func (MsgExec) GetSigners ¶
func (msg MsgExec) GetSigners() []sdk.AccAddress
GetSigners implements Msg
func (*MsgExec) MarshalToSizedBuffer ¶
func (*MsgExec) ProtoMessage ¶
func (*MsgExec) ProtoMessage()
func (MsgExec) UnpackInterfaces ¶
func (msg MsgExec) UnpackInterfaces(unpacker cdctypes.AnyUnpacker) error
UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces
func (MsgExec) ValidateBasic ¶
ValidateBasic implements Msg
func (*MsgExec) XXX_DiscardUnknown ¶
func (m *MsgExec) XXX_DiscardUnknown()
func (*MsgExec) XXX_Marshal ¶
func (*MsgExec) XXX_Unmarshal ¶
type MsgExecResponse ¶
type MsgExecResponse struct {
Results [][]byte `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`
}
MsgExecResponse defines the Msg/MsgExecResponse response type.
func (*MsgExecResponse) Descriptor ¶
func (*MsgExecResponse) Descriptor() ([]byte, []int)
func (*MsgExecResponse) Marshal ¶
func (m *MsgExecResponse) Marshal() (dAtA []byte, err error)
func (*MsgExecResponse) MarshalToSizedBuffer ¶
func (m *MsgExecResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgExecResponse) ProtoMessage ¶
func (*MsgExecResponse) ProtoMessage()
func (*MsgExecResponse) Reset ¶
func (m *MsgExecResponse) Reset()
func (*MsgExecResponse) Size ¶
func (m *MsgExecResponse) Size() (n int)
func (*MsgExecResponse) String ¶
func (m *MsgExecResponse) String() string
func (*MsgExecResponse) Unmarshal ¶
func (m *MsgExecResponse) Unmarshal(dAtA []byte) error
func (*MsgExecResponse) XXX_DiscardUnknown ¶
func (m *MsgExecResponse) XXX_DiscardUnknown()
func (*MsgExecResponse) XXX_Marshal ¶
func (m *MsgExecResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgExecResponse) XXX_Merge ¶
func (m *MsgExecResponse) XXX_Merge(src proto.Message)
func (*MsgExecResponse) XXX_Size ¶
func (m *MsgExecResponse) XXX_Size() int
func (*MsgExecResponse) XXX_Unmarshal ¶
func (m *MsgExecResponse) XXX_Unmarshal(b []byte) error
type MsgGrant ¶
type MsgGrant 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"` Grant Grant `protobuf:"bytes,3,opt,name=grant,proto3" json:"grant"` }
MsgGrant is a request type for Grant method. It declares authorization to the grantee on behalf of the granter with the provided expiration time.
func NewMsgGrant ¶
func NewMsgGrant(granter sdk.AccAddress, grantee sdk.AccAddress, a Authorization, expiration time.Time) (*MsgGrant, error)
NewMsgGrant creates a new MsgGrant
func (*MsgGrant) Descriptor ¶
func (*MsgGrant) GetAuthorization ¶
func (msg *MsgGrant) GetAuthorization() Authorization
GetAuthorization returns the cache value from the MsgGrant.Authorization if present.
func (MsgGrant) GetSignBytes ¶
GetSignBytes implements the LegacyMsg.GetSignBytes method.
func (MsgGrant) GetSigners ¶
func (msg MsgGrant) GetSigners() []sdk.AccAddress
GetSigners implements Msg
func (*MsgGrant) MarshalToSizedBuffer ¶
func (*MsgGrant) ProtoMessage ¶
func (*MsgGrant) ProtoMessage()
func (*MsgGrant) SetAuthorization ¶
func (msg *MsgGrant) SetAuthorization(a Authorization) error
SetAuthorization converts Authorization to any and adds it to MsgGrant.Authorization.
func (MsgGrant) UnpackInterfaces ¶
func (msg MsgGrant) UnpackInterfaces(unpacker cdctypes.AnyUnpacker) error
UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces
func (MsgGrant) ValidateBasic ¶
ValidateBasic implements Msg
func (*MsgGrant) XXX_DiscardUnknown ¶
func (m *MsgGrant) XXX_DiscardUnknown()
func (*MsgGrant) XXX_Marshal ¶
func (*MsgGrant) XXX_Unmarshal ¶
type MsgGrantResponse ¶
type MsgGrantResponse struct { }
MsgGrantResponse defines the Msg/MsgGrant response type.
func (*MsgGrantResponse) Descriptor ¶
func (*MsgGrantResponse) Descriptor() ([]byte, []int)
func (*MsgGrantResponse) Marshal ¶
func (m *MsgGrantResponse) Marshal() (dAtA []byte, err error)
func (*MsgGrantResponse) MarshalToSizedBuffer ¶
func (m *MsgGrantResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgGrantResponse) ProtoMessage ¶
func (*MsgGrantResponse) ProtoMessage()
func (*MsgGrantResponse) Reset ¶
func (m *MsgGrantResponse) Reset()
func (*MsgGrantResponse) Size ¶
func (m *MsgGrantResponse) Size() (n int)
func (*MsgGrantResponse) String ¶
func (m *MsgGrantResponse) String() string
func (*MsgGrantResponse) Unmarshal ¶
func (m *MsgGrantResponse) Unmarshal(dAtA []byte) error
func (*MsgGrantResponse) XXX_DiscardUnknown ¶
func (m *MsgGrantResponse) XXX_DiscardUnknown()
func (*MsgGrantResponse) XXX_Marshal ¶
func (m *MsgGrantResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgGrantResponse) XXX_Merge ¶
func (m *MsgGrantResponse) XXX_Merge(src proto.Message)
func (*MsgGrantResponse) XXX_Size ¶
func (m *MsgGrantResponse) XXX_Size() int
func (*MsgGrantResponse) XXX_Unmarshal ¶
func (m *MsgGrantResponse) XXX_Unmarshal(b []byte) error
type MsgRevoke ¶
type MsgRevoke 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"` MsgTypeUrl string `protobuf:"bytes,3,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"` }
MsgRevoke revokes any authorization with the provided sdk.Msg type on the granter's account with that has been granted to the grantee.
func NewMsgRevoke ¶
func NewMsgRevoke(granter sdk.AccAddress, grantee sdk.AccAddress, msgTypeURL string) MsgRevoke
NewMsgRevoke creates a new MsgRevoke
func (*MsgRevoke) Descriptor ¶
func (MsgRevoke) GetSignBytes ¶
GetSignBytes implements the LegacyMsg.GetSignBytes method.
func (MsgRevoke) GetSigners ¶
func (msg MsgRevoke) GetSigners() []sdk.AccAddress
GetSigners implements Msg
func (*MsgRevoke) MarshalToSizedBuffer ¶
func (*MsgRevoke) ProtoMessage ¶
func (*MsgRevoke) ProtoMessage()
func (MsgRevoke) ValidateBasic ¶
ValidateBasic implements MsgRequest.ValidateBasic
func (*MsgRevoke) XXX_DiscardUnknown ¶
func (m *MsgRevoke) XXX_DiscardUnknown()
func (*MsgRevoke) XXX_Marshal ¶
func (*MsgRevoke) XXX_Unmarshal ¶
type MsgRevokeResponse ¶
type MsgRevokeResponse struct { }
MsgRevokeResponse defines the Msg/MsgRevokeResponse response type.
func (*MsgRevokeResponse) Descriptor ¶
func (*MsgRevokeResponse) Descriptor() ([]byte, []int)
func (*MsgRevokeResponse) Marshal ¶
func (m *MsgRevokeResponse) Marshal() (dAtA []byte, err error)
func (*MsgRevokeResponse) MarshalTo ¶
func (m *MsgRevokeResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgRevokeResponse) MarshalToSizedBuffer ¶
func (m *MsgRevokeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgRevokeResponse) ProtoMessage ¶
func (*MsgRevokeResponse) ProtoMessage()
func (*MsgRevokeResponse) Reset ¶
func (m *MsgRevokeResponse) Reset()
func (*MsgRevokeResponse) Size ¶
func (m *MsgRevokeResponse) Size() (n int)
func (*MsgRevokeResponse) String ¶
func (m *MsgRevokeResponse) String() string
func (*MsgRevokeResponse) Unmarshal ¶
func (m *MsgRevokeResponse) Unmarshal(dAtA []byte) error
func (*MsgRevokeResponse) XXX_DiscardUnknown ¶
func (m *MsgRevokeResponse) XXX_DiscardUnknown()
func (*MsgRevokeResponse) XXX_Marshal ¶
func (m *MsgRevokeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgRevokeResponse) XXX_Merge ¶
func (m *MsgRevokeResponse) XXX_Merge(src proto.Message)
func (*MsgRevokeResponse) XXX_Size ¶
func (m *MsgRevokeResponse) XXX_Size() int
func (*MsgRevokeResponse) XXX_Unmarshal ¶
func (m *MsgRevokeResponse) XXX_Unmarshal(b []byte) error
type MsgServer ¶
type MsgServer interface { // Grant grants the provided authorization to the grantee on the granter's // account with the provided expiration time. If there is already a grant // for the given (granter, grantee, Authorization) triple, then the grant // will be overwritten. Grant(context.Context, *MsgGrant) (*MsgGrantResponse, error) // Exec 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. Exec(context.Context, *MsgExec) (*MsgExecResponse, error) // Revoke revokes any authorization corresponding to the provided method name on the // granter's account that has been granted to the grantee. Revoke(context.Context, *MsgRevoke) (*MsgRevokeResponse, error) }
MsgServer is the server API for Msg service.
type QueryClient ¶
type QueryClient interface { // Returns list of `Authorization`, granted to the grantee by the granter. Grants(ctx context.Context, in *QueryGrantsRequest, opts ...grpc.CallOption) (*QueryGrantsResponse, error) // GranterGrants returns list of `Authorization`, granted by granter. GranterGrants(ctx context.Context, in *QueryGranterGrantsRequest, opts ...grpc.CallOption) (*QueryGranterGrantsResponse, 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 QueryGranterGrantsRequest ¶ added in v0.45.2
type QueryGranterGrantsRequest struct { Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` // pagination defines an pagination for the request. Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` }
QueryGranterGrantsRequest is the request type for the Query/GranterGrants RPC method.
func (*QueryGranterGrantsRequest) Descriptor ¶ added in v0.45.2
func (*QueryGranterGrantsRequest) Descriptor() ([]byte, []int)
func (*QueryGranterGrantsRequest) GetGranter ¶ added in v0.45.2
func (m *QueryGranterGrantsRequest) GetGranter() string
func (*QueryGranterGrantsRequest) GetPagination ¶ added in v0.45.2
func (m *QueryGranterGrantsRequest) GetPagination() *query.PageRequest
func (*QueryGranterGrantsRequest) Marshal ¶ added in v0.45.2
func (m *QueryGranterGrantsRequest) Marshal() (dAtA []byte, err error)
func (*QueryGranterGrantsRequest) MarshalTo ¶ added in v0.45.2
func (m *QueryGranterGrantsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryGranterGrantsRequest) MarshalToSizedBuffer ¶ added in v0.45.2
func (m *QueryGranterGrantsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryGranterGrantsRequest) ProtoMessage ¶ added in v0.45.2
func (*QueryGranterGrantsRequest) ProtoMessage()
func (*QueryGranterGrantsRequest) Reset ¶ added in v0.45.2
func (m *QueryGranterGrantsRequest) Reset()
func (*QueryGranterGrantsRequest) Size ¶ added in v0.45.2
func (m *QueryGranterGrantsRequest) Size() (n int)
func (*QueryGranterGrantsRequest) String ¶ added in v0.45.2
func (m *QueryGranterGrantsRequest) String() string
func (*QueryGranterGrantsRequest) Unmarshal ¶ added in v0.45.2
func (m *QueryGranterGrantsRequest) Unmarshal(dAtA []byte) error
func (*QueryGranterGrantsRequest) XXX_DiscardUnknown ¶ added in v0.45.2
func (m *QueryGranterGrantsRequest) XXX_DiscardUnknown()
func (*QueryGranterGrantsRequest) XXX_Marshal ¶ added in v0.45.2
func (m *QueryGranterGrantsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryGranterGrantsRequest) XXX_Merge ¶ added in v0.45.2
func (m *QueryGranterGrantsRequest) XXX_Merge(src proto.Message)
func (*QueryGranterGrantsRequest) XXX_Size ¶ added in v0.45.2
func (m *QueryGranterGrantsRequest) XXX_Size() int
func (*QueryGranterGrantsRequest) XXX_Unmarshal ¶ added in v0.45.2
func (m *QueryGranterGrantsRequest) XXX_Unmarshal(b []byte) error
type QueryGranterGrantsResponse ¶ added in v0.45.2
type QueryGranterGrantsResponse struct { // authorizations is a list of grants granted for grantee by granter. Grants []*Grant `protobuf:"bytes,1,rep,name=grants,proto3" json:"grants,omitempty"` // pagination defines an pagination for the response. Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` }
QueryGranterGrantsResponse is the response type for the Query/GranterGrants RPC method.
func (*QueryGranterGrantsResponse) Descriptor ¶ added in v0.45.2
func (*QueryGranterGrantsResponse) Descriptor() ([]byte, []int)
func (*QueryGranterGrantsResponse) GetGrants ¶ added in v0.45.2
func (m *QueryGranterGrantsResponse) GetGrants() []*Grant
func (*QueryGranterGrantsResponse) GetPagination ¶ added in v0.45.2
func (m *QueryGranterGrantsResponse) GetPagination() *query.PageResponse
func (*QueryGranterGrantsResponse) Marshal ¶ added in v0.45.2
func (m *QueryGranterGrantsResponse) Marshal() (dAtA []byte, err error)
func (*QueryGranterGrantsResponse) MarshalTo ¶ added in v0.45.2
func (m *QueryGranterGrantsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryGranterGrantsResponse) MarshalToSizedBuffer ¶ added in v0.45.2
func (m *QueryGranterGrantsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryGranterGrantsResponse) ProtoMessage ¶ added in v0.45.2
func (*QueryGranterGrantsResponse) ProtoMessage()
func (*QueryGranterGrantsResponse) Reset ¶ added in v0.45.2
func (m *QueryGranterGrantsResponse) Reset()
func (*QueryGranterGrantsResponse) Size ¶ added in v0.45.2
func (m *QueryGranterGrantsResponse) Size() (n int)
func (*QueryGranterGrantsResponse) String ¶ added in v0.45.2
func (m *QueryGranterGrantsResponse) String() string
func (*QueryGranterGrantsResponse) Unmarshal ¶ added in v0.45.2
func (m *QueryGranterGrantsResponse) Unmarshal(dAtA []byte) error
func (*QueryGranterGrantsResponse) XXX_DiscardUnknown ¶ added in v0.45.2
func (m *QueryGranterGrantsResponse) XXX_DiscardUnknown()
func (*QueryGranterGrantsResponse) XXX_Marshal ¶ added in v0.45.2
func (m *QueryGranterGrantsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryGranterGrantsResponse) XXX_Merge ¶ added in v0.45.2
func (m *QueryGranterGrantsResponse) XXX_Merge(src proto.Message)
func (*QueryGranterGrantsResponse) XXX_Size ¶ added in v0.45.2
func (m *QueryGranterGrantsResponse) XXX_Size() int
func (*QueryGranterGrantsResponse) XXX_Unmarshal ¶ added in v0.45.2
func (m *QueryGranterGrantsResponse) XXX_Unmarshal(b []byte) error
type QueryGrantsRequest ¶
type QueryGrantsRequest 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"` // Optional, msg_type_url, when set, will query only grants matching given msg type. MsgTypeUrl string `protobuf:"bytes,3,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"` // pagination defines an pagination for the request. Pagination *query.PageRequest `protobuf:"bytes,4,opt,name=pagination,proto3" json:"pagination,omitempty"` }
QueryGrantsRequest is the request type for the Query/Grants RPC method.
func (*QueryGrantsRequest) Descriptor ¶
func (*QueryGrantsRequest) Descriptor() ([]byte, []int)
func (*QueryGrantsRequest) GetGrantee ¶
func (m *QueryGrantsRequest) GetGrantee() string
func (*QueryGrantsRequest) GetGranter ¶
func (m *QueryGrantsRequest) GetGranter() string
func (*QueryGrantsRequest) GetMsgTypeUrl ¶
func (m *QueryGrantsRequest) GetMsgTypeUrl() string
func (*QueryGrantsRequest) GetPagination ¶
func (m *QueryGrantsRequest) GetPagination() *query.PageRequest
func (*QueryGrantsRequest) Marshal ¶
func (m *QueryGrantsRequest) Marshal() (dAtA []byte, err error)
func (*QueryGrantsRequest) MarshalTo ¶
func (m *QueryGrantsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryGrantsRequest) MarshalToSizedBuffer ¶
func (m *QueryGrantsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryGrantsRequest) ProtoMessage ¶
func (*QueryGrantsRequest) ProtoMessage()
func (*QueryGrantsRequest) Reset ¶
func (m *QueryGrantsRequest) Reset()
func (*QueryGrantsRequest) Size ¶
func (m *QueryGrantsRequest) Size() (n int)
func (*QueryGrantsRequest) String ¶
func (m *QueryGrantsRequest) String() string
func (*QueryGrantsRequest) Unmarshal ¶
func (m *QueryGrantsRequest) Unmarshal(dAtA []byte) error
func (*QueryGrantsRequest) XXX_DiscardUnknown ¶
func (m *QueryGrantsRequest) XXX_DiscardUnknown()
func (*QueryGrantsRequest) XXX_Marshal ¶
func (m *QueryGrantsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryGrantsRequest) XXX_Merge ¶
func (m *QueryGrantsRequest) XXX_Merge(src proto.Message)
func (*QueryGrantsRequest) XXX_Size ¶
func (m *QueryGrantsRequest) XXX_Size() int
func (*QueryGrantsRequest) XXX_Unmarshal ¶
func (m *QueryGrantsRequest) XXX_Unmarshal(b []byte) error
type QueryGrantsResponse ¶
type QueryGrantsResponse struct { // authorizations is a list of grants granted for grantee by granter. Grants []*Grant `protobuf:"bytes,1,rep,name=grants,proto3" json:"grants,omitempty"` // pagination defines an pagination for the response. Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` }
QueryGrantsResponse is the response type for the Query/Authorizations RPC method.
func (*QueryGrantsResponse) Descriptor ¶
func (*QueryGrantsResponse) Descriptor() ([]byte, []int)
func (*QueryGrantsResponse) GetGrants ¶
func (m *QueryGrantsResponse) GetGrants() []*Grant
func (*QueryGrantsResponse) GetPagination ¶
func (m *QueryGrantsResponse) GetPagination() *query.PageResponse
func (*QueryGrantsResponse) Marshal ¶
func (m *QueryGrantsResponse) Marshal() (dAtA []byte, err error)
func (*QueryGrantsResponse) MarshalTo ¶
func (m *QueryGrantsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryGrantsResponse) MarshalToSizedBuffer ¶
func (m *QueryGrantsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryGrantsResponse) ProtoMessage ¶
func (*QueryGrantsResponse) ProtoMessage()
func (*QueryGrantsResponse) Reset ¶
func (m *QueryGrantsResponse) Reset()
func (*QueryGrantsResponse) Size ¶
func (m *QueryGrantsResponse) Size() (n int)
func (*QueryGrantsResponse) String ¶
func (m *QueryGrantsResponse) String() string
func (*QueryGrantsResponse) Unmarshal ¶
func (m *QueryGrantsResponse) Unmarshal(dAtA []byte) error
func (*QueryGrantsResponse) XXX_DiscardUnknown ¶
func (m *QueryGrantsResponse) XXX_DiscardUnknown()
func (*QueryGrantsResponse) XXX_Marshal ¶
func (m *QueryGrantsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryGrantsResponse) XXX_Merge ¶
func (m *QueryGrantsResponse) XXX_Merge(src proto.Message)
func (*QueryGrantsResponse) XXX_Size ¶
func (m *QueryGrantsResponse) XXX_Size() int
func (*QueryGrantsResponse) XXX_Unmarshal ¶
func (m *QueryGrantsResponse) XXX_Unmarshal(b []byte) error
type QueryServer ¶
type QueryServer interface { // Returns list of `Authorization`, granted to the grantee by the granter. Grants(context.Context, *QueryGrantsRequest) (*QueryGrantsResponse, error) // GranterGrants returns list of `Authorization`, granted by granter. GranterGrants(context.Context, *QueryGranterGrantsRequest) (*QueryGranterGrantsResponse, 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) Exec ¶
func (*UnimplementedMsgServer) Exec(ctx context.Context, req *MsgExec) (*MsgExecResponse, error)
func (*UnimplementedMsgServer) Grant ¶
func (*UnimplementedMsgServer) Grant(ctx context.Context, req *MsgGrant) (*MsgGrantResponse, error)
func (*UnimplementedMsgServer) Revoke ¶
func (*UnimplementedMsgServer) Revoke(ctx context.Context, req *MsgRevoke) (*MsgRevokeResponse, error)
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) GranterGrants ¶ added in v0.45.2
func (*UnimplementedQueryServer) GranterGrants(ctx context.Context, req *QueryGranterGrantsRequest) (*QueryGranterGrantsResponse, error)
func (*UnimplementedQueryServer) Grants ¶
func (*UnimplementedQueryServer) Grants(ctx context.Context, req *QueryGrantsRequest) (*QueryGrantsResponse, error)