package config type Midtrans struct { Serverkey string `mapstructure:"server_key"` Clientkey string `mapstructure:"client_key"` Env int `mapstructure:"env"` } type MidtransConfig interface { MidtransServerKey() string MidtransClientKey() string MidtranEnvType() int } func (c *Midtrans) MidtransServerKey() string { return c.Serverkey } func (c *Midtrans) MidtransClientKey() string { return c.Clientkey } func (c *Midtrans) MidtranEnvType() int { return c.Env }