mirror of
https://github.com/Instadapp/trustwallet-assets.git
synced 2024-07-29 22:37:31 +00:00
d547fb1473
* Move CI scripts logic from assets-go-libs * Add Makefile, .golangci.yml and lint jobs to workflow * Fix
30 lines
447 B
Go
30 lines
447 B
Go
package file
|
|
|
|
import (
|
|
"github.com/trustwallet/go-primitives/coin"
|
|
)
|
|
|
|
type AssetFile struct {
|
|
path *Path
|
|
}
|
|
|
|
func NewAssetFile(path string) *AssetFile {
|
|
return &AssetFile{path: NewPath(path)}
|
|
}
|
|
|
|
func (i *AssetFile) Path() string {
|
|
return i.path.String()
|
|
}
|
|
|
|
func (i *AssetFile) Type() string {
|
|
return i.path.fileType
|
|
}
|
|
|
|
func (i *AssetFile) Chain() coin.Coin {
|
|
return i.path.chain
|
|
}
|
|
|
|
func (i *AssetFile) Asset() string {
|
|
return i.path.asset
|
|
}
|