mapdf

package module
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 14, 2023 License: MIT Imports: 17 Imported by: 0

README

2pdf

PDF Generator

go get -u all     #update existing package
go mod tidy     #generate go mod
git tag                                  #check current version
git tag v0.0.3                           #set tag version
git push origin --tags                   #push tag version to repo
go list -m github.com/dataped/mapdf@v0.0.3   #publish to pkg dev, replace ORG/URL with your repo URL

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateFolder

func CreateFolder(pathDir string)

func GetMimeType added in v0.0.7

func GetMimeType(file *multipart.FileHeader) (mime string, err error)

func MergeFiles

func MergeFiles(uploadDir string, imageFiles []string) (outputPDF string, err error)

func PostFileWithHeader added in v0.1.1

func PostFileWithHeader[T any](targetURL, tokenKey, tokenValue, filePath, formdataName string) (result T, err error)

func ReadContent added in v0.0.8

func ReadContent(filepath string) (content string, err error)

func SaveUploadedFile

func SaveUploadedFile(file *multipart.FileHeader, uploadDir, filename string) error

func ValidateImageKtp added in v0.0.2

func ValidateImageKtp(filename string) (err error)

Types

type Filelists

type Filelists struct {
	Aplikasi      string `json:"aplikasi,omitempty" bson:"aplikasi"`
	User          string `json:"user,omitempty" bson:"user"`
	JenisDocument string `json:"jenisdokumen,omitempty" bson:"jenisdokumen"`
	Halaman       uint8  `json:"halaman,omitempty" bson:"halaman"`
	Filename      string `json:"filename,omitempty" bson:"filename"`
	Mime          string `json:"mime,omitempty" bson:"mime"`
	Urutan        uint8  `json:"urutan,omitempty" bson:"urutan"`
	Content       string `json:"content,omitempty" bson:"content"`
}

type Ktp added in v0.0.2

type Ktp struct {
	Province      string `json:"province"`
	District      string `json:"district"`
	Nik           string `json:"nik"`
	Name          string `json:"name"`
	PlaceDob      string `json:"place_dob"`
	Gender        string `json:"gender"`
	Address1      string `json:"address_1"`
	Address2      string `json:"address_2"`
	Address3      string `json:"address_3"`
	Address4      string `json:"address_4"`
	Religion      string `json:"religion"`
	MarriedStatus string `json:"married_status"`
	Occupation    string `json:"occupation"`
	Nationality   string `json:"nationality"`
	ValidUntil    string `json:"valid_until"`
}

func FormatDataKTP added in v0.0.2

func FormatDataKTP(text string) (formatKtp Ktp, err error)

type LoginHeader

type LoginHeader struct {
	Login  string `reqHeader:"login"`
	Origin string `reqHeader:"origin"`
}

type ResponseKomarFile added in v0.1.1

type ResponseKomarFile struct {
	Code    uint8  `json:"code"`
	Success bool   `json:"success"`
	Status  string `json:"status"`
	Data    string `json:"data"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL