Versions in this module Expand all Collapse all v0 v0.1.0 Jun 21, 2026 Changes in this version + var ErrDuplicateLimit = &Error + var ErrEmptyMessage = errors.New("netgsm: empty message") + var ErrIYSFilter = &Error + var ErrInvalidCredentials = &Error + var ErrInvalidHeader = &Error + var ErrInvalidParams = &Error + var ErrMessageTooLong = &Error + var ErrNoRecipients = errors.New("netgsm: no recipients") + var ErrSystem = &Error + type Client struct + func New(cfg Config, opts ...Option) *Client + func (c *Client) Send(ctx context.Context, sms SMS) (Result, error) + func (c *Client) SendOTP(ctx context.Context, otp OTP) (Result, error) + type Config struct + Header string + Password string + UserCode string + type Error struct + Code string + Message string + Retryable bool + func (e *Error) Error() string + func (e *Error) Is(target error) bool + type OTP struct + Header string + Text string + To string + type Option func(*Client) + func WithBaseURL(u string) Option + func WithEncoding(enc string) Option + func WithHTTPClient(h *http.Client) Option + func WithTimeout(d time.Duration) Option + type Result struct + Code string + JobID string + type SMS struct + Header string + StartAt time.Time + StopAt time.Time + Text string + To []string