thirdparty

package
v1.0.44 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const WatzapURL = "https://api.watzap.id"

Variables

This section is empty.

Functions

This section is empty.

Types

type Bpjs

type Bpjs struct {
	BpjsKesRateEmployer           float64 // 4% BPJS Kesehatan dibayar oleh pemberi kerja
	BpjsKesRateEmployee           float64 // 1% BPJS Kesehatan dibayar oleh pekerja
	BpjsTkJhtRateEmployer         float64 // 3.7% Jaminan Hari Tua  dibayar oleh pemberi kerja
	BpjsTkJhtRateEmployee         float64 // 2% Jaminan Hari Tua dibayar oleh pekerja
	MaxSalaryKes                  float64 // Batas atas gaji untuk BPJS Kesehatan
	MinSalaryKes                  float64 // Batas bawah gaji untuk BPJS Kesehatan
	MaxSalaryTk                   float64 // Batas atas gaji untuk BPJS Ketenagakerjaan
	BpjsTkJkkVeryLowRiskEmployee  float64 // BPJS JKK resiko sangat rendah
	BpjsTkJkkLowRiskEmployee      float64 // BPJS JKK resiko rendah
	BpjsTkJkkMiddleRiskEmployee   float64 // BPJS JKK resiko menengah
	BpjsTkJkkHighRiskEmployee     float64 // BPJS JKK resiko tinggi
	BpjsTkJkkVeryHighRiskEmployee float64 // BPJS JKK resiko sangat tinggi
	BpjsTkJkmEmployee             float64 // BPJS JKM
	BpjsTkJpRateEmployer          float64 // 2% Jaminan Pensiun  dibayar oleh pemberi kerja
	BpjsTkJpRateEmployee          float64 // 1% Jaminan Pensiun dibayar oleh pekerja
	BpjsKesEnabled                bool
	BpjsTkJhtEnabled              bool
	BpjsTkJkmEnabled              bool
	BpjsTkJpEnabled               bool
	BpjsTkJkkEnabled              bool
}

func InitBPJS

func InitBPJS() *Bpjs

func (Bpjs) CalculateBPJSKes

func (m Bpjs) CalculateBPJSKes(salary float64) (float64, float64, float64)

func (Bpjs) CalculateBPJSTkJht

func (m Bpjs) CalculateBPJSTkJht(salary float64) (float64, float64, float64)

Fungsi untuk menghitung iuran BPJS JHT Ketenagakerjaan

func (Bpjs) CalculateBPJSTkJkk

func (m Bpjs) CalculateBPJSTkJkk(salary float64, risk string) (float64, float64)

func (Bpjs) CalculateBPJSTkJkm

func (m Bpjs) CalculateBPJSTkJkm(salary float64) float64

func (Bpjs) CalculateBPJSTkJp

func (m Bpjs) CalculateBPJSTkJp(salary float64) (float64, float64, float64)

Fungsi untuk menghitung iuran BPJS JP Ketenagakerjaan

type Firestore

type Firestore struct {
	// contains filtered or unexported fields
}

func NewFirebaseApp

func NewFirebaseApp(ctx context.Context, firebaseCredentialFile, bucket string) (*Firestore, error)

func (*Firestore) DeleteFileFromFirebaseStorage

func (f *Firestore) DeleteFileFromFirebaseStorage(objString string) error

func (*Firestore) UploadFileToFirebaseStorage

func (f *Firestore) UploadFileToFirebaseStorage(file []byte, folder string, fileName string) (string, string, error)

type SMTPSender

type SMTPSender struct {
	Tls bool
	// contains filtered or unexported fields
}

SMTPSender SMTPSender

func NewSMTPSender

func NewSMTPSender(smtpServer string, smtpPort int, smtpUsername, smtpPassword string, from mail.Address) *SMTPSender

NewSMTPSender NewSMTPSender

func (*SMTPSender) SendEmail

func (s *SMTPSender) SendEmail(subject string, data interface{}, attachment []string) error

SendEmail SendEmail

func (*SMTPSender) SendEmailWithTemplate

func (s *SMTPSender) SendEmailWithTemplate(subject, message string, attachment []string) error

SendEmail SendEmail

func (*SMTPSender) SetAddress

func (s *SMTPSender) SetAddress(name string, email string) *SMTPSender

func (*SMTPSender) SetTemplate

func (s *SMTPSender) SetTemplate(layout string, template string) *SMTPSender

func (*SMTPSender) SetTls

func (s *SMTPSender) SetTls(tls bool)

type SendFileURLRequest

type SendFileURLRequest struct {
	PhoneNo string `json:"phone_no"`
	URL     string `json:"url"`
}

type SendImageURLRequest

type SendImageURLRequest struct {
	PhoneNo         string `json:"phone_no"`
	URL             string `json:"url"`
	Message         string `json:"message"`
	SeparateCaption int    `json:"separate_caption"`
}

type SendMessageRequest

type SendMessageRequest struct {
	PhoneNo string `json:"phone_no"`
	Message string `json:"message"`
}

type WatzapClient

type WatzapClient struct {
	ApiKey     string
	NumberKey  string
	MockNumber string
	RedisKey   string
	IsMock     bool
}

func NewWatzapClient

func NewWatzapClient(apiKey, numberKey, mockNumber string, isMock bool, redisKey string) *WatzapClient

func (*WatzapClient) SendFileURL

func (c *WatzapClient) SendFileURL(phoneNo, url string) error

func (*WatzapClient) SendImageURL

func (c *WatzapClient) SendImageURL(phoneNo, url, message string, separateCaption int) error

func (*WatzapClient) SendMessage

func (c *WatzapClient) SendMessage(phoneNo, message string) error

Directories

Path Synopsis
payment
oy

Jump to

Keyboard shortcuts

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