github.com/pojntfx/hydrapp/hydrapp@v0.0.0-20240516002902-d08759d6ca9f/pkg/renderers/apk/manifest.go (about) 1 package apk 2 3 import ( 4 _ "embed" 5 "time" 6 7 "github.com/pojntfx/hydrapp/hydrapp/pkg/renderers" 8 ) 9 10 //go:embed manifest.xml 11 var manifestTemplate string 12 13 type manifestData struct { 14 AppID string 15 AppName string 16 AppReleases []renderers.Release 17 BranchTimestampUNIX int64 18 } 19 20 func NewManifestRenderer( 21 appID string, 22 appName string, 23 appReleases []renderers.Release, 24 branchTimestamp time.Time, 25 ) renderers.Renderer { 26 return renderers.NewRenderer("AndroidManifest.xml", manifestTemplate, manifestData{appID, appName, appReleases, branchTimestamp.Unix()}) 27 }