Files
go-emlid/reach/client/protocol/modem.go

50 lines
940 B
Go
Raw Normal View History

package protocol
type SetModemOptions struct {
Apn *string
Type *string
Username *string
Password *string
2025-09-29 13:47:55 +02:00
Pin *string
}
type SetModemOptionsFunc func(opts *SetModemOptions)
func NewSetModemOptions(funcs ...SetModemOptionsFunc) *SetModemOptions {
opts := &SetModemOptions{}
for _, fn := range funcs {
fn(opts)
}
return opts
}
func WithApn(value string) SetModemOptionsFunc {
return func(opts *SetModemOptions) {
opts.Apn = &value
}
}
func WithType(value string) SetModemOptionsFunc {
return func(opts *SetModemOptions) {
opts.Type = &value
}
}
func WithUsername(value string) SetModemOptionsFunc {
return func(opts *SetModemOptions) {
opts.Username = &value
}
}
2025-09-29 13:47:55 +02:00
func WithPassword(value string) SetModemOptionsFunc {
return func(opts *SetModemOptions) {
opts.Password = &value
}
}
2025-09-29 13:47:55 +02:00
func WithPin(value string) SetModemOptionsFunc {
return func(opts *SetModemOptions) {
opts.Pin = &value
}
}