-
Notifications
You must be signed in to change notification settings - Fork 13
/
module.go
64 lines (49 loc) · 1.78 KB
/
module.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
package offchain
import (
"encoding/json"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/codec"
cdctypes "github.com/cosmos/cosmos-sdk/codec/types"
"github.com/cosmos/cosmos-sdk/types/module"
"github.com/gorilla/mux"
"github.com/grpc-ecosystem/grpc-gateway/runtime"
"github.com/spf13/cobra"
"github.com/gitopia/gitopia/v4/x/offchain/client/cli"
"github.com/gitopia/gitopia/v4/x/offchain/types"
)
var (
_ module.AppModuleBasic = AppModuleBasic{}
)
// AppModuleBasic defines the basic application module used by the configuration module.
type AppModuleBasic struct {
cdc codec.Codec
}
// RegisterLegacyAminoCodec registers the amino codec.
func (b AppModuleBasic) RegisterLegacyAminoCodec(amino *codec.LegacyAmino) {
types.RegisterLegacyAminoCodec(amino)
}
// RegisterGRPCGatewayRoutes registers the query handler client.
func (AppModuleBasic) RegisterGRPCGatewayRoutes(client.Context, *runtime.ServeMux) {
}
// Name returns the configuration module's name.
func (AppModuleBasic) Name() string { return "offchain" }
// DefaultGenesis returns default genesis state as raw bytes for the configuration module.
func (AppModuleBasic) DefaultGenesis(codec.JSONCodec) json.RawMessage {
return nil
}
// ValidateGenesis performs genesis state validation for the configuration module.
func (AppModuleBasic) ValidateGenesis(codec.JSONCodec, client.TxEncodingConfig, json.RawMessage) error {
return nil
}
func (AppModuleBasic) RegisterRESTRoutes(client.Context, *mux.Router) {
}
func (AppModuleBasic) GetQueryCmd() *cobra.Command {
return nil
}
func (AppModuleBasic) GetTxCmd() *cobra.Command {
return cli.GetTxCmd()
}
// RegisterInterfaces implements InterfaceModule
func (b AppModuleBasic) RegisterInterfaces(registry cdctypes.InterfaceRegistry) {
types.RegisterInterfaces(registry)
}