Documentation ¶
Index ¶
- Constants
- func GetIP() (net.IP, error)
- type SoracomClient
- func (c *SoracomClient) Connect(login, identity string, portMapping *models.PortMapping) error
- func (c *SoracomClient) CreatePortMappingForSIM(sim models.SIM, port, duration int) (*models.PortMapping, error)
- func (c *SoracomClient) FindAvailablePortMappingsForSIM(sim models.SIM, port int) ([]models.PortMapping, error)
- func (c *SoracomClient) FindOnlineSIMs() ([]models.SIM, error)
- func (c *SoracomClient) FindOnlineSIMsByName(name string) ([]models.SIM, error)
- func (c *SoracomClient) FindPortMappingsForSIM(sim models.SIM) ([]models.PortMapping, error)
- func (c *SoracomClient) FindSIMsByName(name string) ([]models.SIM, error)
- func (c *SoracomClient) GetSIM(simID string) (*models.SIM, error)
- func (c *SoracomClient) ListPortMappings() ([]models.PortMapping, error)
Constants ¶
const SIGWINCH = syscall.SIGWINCH
Variables ¶
This section is empty.
Functions ¶
Types ¶
type SoracomClient ¶
type SoracomClient struct { APIKey string // API key Token string // API token Client *http.Client Endpoint string }
A SoracomClient represents an API client for SORACOM API. See https://developers.soracom.io/en/docs/tools/api-reference/ or https://dev.soracom.io/jp/docs/api_guide/
func NewSoracomClient ¶
func NewSoracomClient(coverageType, profileName string) (*SoracomClient, error)
NewSoracomClient returns new SoracomClient for caller
func (*SoracomClient) Connect ¶
func (c *SoracomClient) Connect(login, identity string, portMapping *models.PortMapping) error
Connect connects to specified port mapping with login name and identity. If identity is specified, use it for public key authentication. If not, use password authentication instead.
func (*SoracomClient) CreatePortMappingForSIM ¶ added in v0.4.0
func (c *SoracomClient) CreatePortMappingForSIM(sim models.SIM, port, duration int) (*models.PortMapping, error)
CreatePortMappingForSIM creates port mappings for specified subscriber, port, and duration
func (*SoracomClient) FindAvailablePortMappingsForSIM ¶ added in v0.4.0
func (c *SoracomClient) FindAvailablePortMappingsForSIM(sim models.SIM, port int) ([]models.PortMapping, error)
FindAvailablePortMappingsForSIM finds available port mappings for specified SIM and port
func (*SoracomClient) FindOnlineSIMs ¶ added in v0.4.0
func (c *SoracomClient) FindOnlineSIMs() ([]models.SIM, error)
FindOnlineSIMs finds online subscribers
func (*SoracomClient) FindOnlineSIMsByName ¶ added in v0.4.0
func (c *SoracomClient) FindOnlineSIMsByName(name string) ([]models.SIM, error)
FindOnlineSIMsByName finds online SIMs which has the specified name
func (*SoracomClient) FindPortMappingsForSIM ¶ added in v0.4.0
func (c *SoracomClient) FindPortMappingsForSIM(sim models.SIM) ([]models.PortMapping, error)
FindPortMappingsForSIM finds port mappings for specified SIM
func (*SoracomClient) FindSIMsByName ¶ added in v0.4.0
func (c *SoracomClient) FindSIMsByName(name string) ([]models.SIM, error)
FindSIMsByName finds SIMs which has the specified name
func (*SoracomClient) GetSIM ¶ added in v0.4.0
func (c *SoracomClient) GetSIM(simID string) (*models.SIM, error)
GetSIM gets SIM information for specified SIM ID
func (*SoracomClient) ListPortMappings ¶ added in v0.4.0
func (c *SoracomClient) ListPortMappings() ([]models.PortMapping, error)
ListPortMappings finds all port mappings