telvri

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2026 License: MIT Imports: 20 Imported by: 0

README

telvri-go

Official Go SDK for the Telvri Security API — real-time SIM-swap and mobile identity risk checks for login recovery, payouts, and wallet protection.

Install

go get github.com/Granville-Christopher/telvri-go@v1.0.0

Requires Go 1.22+.

Quick start — SIM-swap check

package main

import (
	"context"
	"fmt"
	"os"

	telvri "github.com/Granville-Christopher/telvri-go"
)

func main() {
	cfg := telvri.NewConfiguration()
	cfg.AddDefaultHeader("X-API-Key", os.Getenv("TELVRI_API_KEY"))

	client := telvri.NewAPIClient(cfg)
	dto := telvri.NewCheckSimSwapDto("+2348031234569")

	result, response, err := client.SIMSwapIntelligenceAPI.
		SimSwapControllerCheckSimSwap(context.Background()).
		CheckSimSwapDto(*dto).
		Execute()
	if err != nil {
		panic(err)
	}
	defer response.Body.Close()

	fmt.Printf("swapped=%v provider=%s operator=%s\n",
		result.GetSwapped(),
		result.GetProvider(),
		result.GetOperator(),
	)
}

Set your key first:

export TELVRI_API_KEY=rt_live_your_api_key

API reference

All URIs are relative to https://telvrisecurity.vercel.app.

Class Method HTTP request Description
SIMSwapIntelligenceAPI SimSwapControllerCheckSimSwap POST /v1/security/sim-check Run a real-time SIM-swap risk check
DeveloperAuthAPI AuthControllerLogin POST /auth/login Authenticate a developer account
DeveloperAuthAPI AuthControllerSignup POST /auth/signup Create a developer account
Models
  • CheckSimSwapDto
  • SimSwapResponseDto
  • LoginDto
  • SignupDto

Full per-method and per-model docs are in the docs/ folder.

Development

This SDK is generated from the Telvri Security OpenAPI contract using OpenAPI Generator. To regenerate from the API project:

npm run sdk:fetch-spec
npm run sdk:generate:go
  • API version: 1.0
  • Package version: 1.0.0
  • Module: github.com/Granville-Christopher/telvri-go

License

MIT — see LICENSE.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	JsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?json)`)
	XmlCheck  = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?xml)`)
)
View Source
var (
	// ContextAccessToken takes a string oauth2 access token as authentication for the request.
	ContextAccessToken = contextKey("accesstoken")

	// ContextAPIKeys takes a string apikey as authentication for the request
	ContextAPIKeys = contextKey("apiKeys")

	// ContextServerIndex uses a server configuration from the index.
	ContextServerIndex = contextKey("serverIndex")

	// ContextOperationServerIndices uses a server configuration from the index mapping.
	ContextOperationServerIndices = contextKey("serverOperationIndices")

	// ContextServerVariables overrides a server configuration variables.
	ContextServerVariables = contextKey("serverVariables")

	// ContextOperationServerVariables overrides a server configuration variables using operation specific values.
	ContextOperationServerVariables = contextKey("serverOperationVariables")
)

Functions

func CacheExpires

func CacheExpires(r *http.Response) time.Time

CacheExpires helper function to determine remaining time before repeating a request.

func IsNil

func IsNil(i interface{}) bool

IsNil checks if an input is nil

func PtrBool

func PtrBool(v bool) *bool

PtrBool is a helper routine that returns a pointer to given boolean value.

func PtrFloat32

func PtrFloat32(v float32) *float32

PtrFloat32 is a helper routine that returns a pointer to given float value.

func PtrFloat64

func PtrFloat64(v float64) *float64

PtrFloat64 is a helper routine that returns a pointer to given float value.

func PtrInt

func PtrInt(v int) *int

PtrInt is a helper routine that returns a pointer to given integer value.

func PtrInt32

func PtrInt32(v int32) *int32

PtrInt32 is a helper routine that returns a pointer to given integer value.

func PtrInt64

func PtrInt64(v int64) *int64

PtrInt64 is a helper routine that returns a pointer to given integer value.

func PtrString

func PtrString(v string) *string

PtrString is a helper routine that returns a pointer to given string value.

func PtrTime

func PtrTime(v time.Time) *time.Time

PtrTime is helper routine that returns a pointer to given Time value.

Types

type APIClient

type APIClient struct {
	DeveloperAuthAPI *DeveloperAuthAPIService

	SIMSwapIntelligenceAPI *SIMSwapIntelligenceAPIService
	// contains filtered or unexported fields
}

APIClient manages communication with the Telvri Security API Gateway API v1.0 In most cases there should be only one, shared, APIClient.

func NewAPIClient

func NewAPIClient(cfg *Configuration) *APIClient

NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.

func (*APIClient) GetConfig

func (c *APIClient) GetConfig() *Configuration

Allow modification of underlying config for alternate implementations and testing Caution: modifying the configuration while live can cause data races and potentially unwanted behavior

type APIKey

type APIKey struct {
	Key    string
	Prefix string
}

APIKey provides API key based authentication to a request passed via context using ContextAPIKey

type APIResponse

type APIResponse struct {
	*http.Response `json:"-"`
	Message        string `json:"message,omitempty"`
	// Operation is the name of the OpenAPI operation.
	Operation string `json:"operation,omitempty"`
	// RequestURL is the request URL. This value is always available, even if the
	// embedded *http.Response is nil.
	RequestURL string `json:"url,omitempty"`
	// Method is the HTTP method used for the request.  This value is always
	// available, even if the embedded *http.Response is nil.
	Method string `json:"method,omitempty"`
	// Payload holds the contents of the response body (which may be nil or empty).
	// This is provided here as the raw response.Body() reader will have already
	// been drained.
	Payload []byte `json:"-"`
}

APIResponse stores the API response returned by the server.

func NewAPIResponse

func NewAPIResponse(r *http.Response) *APIResponse

NewAPIResponse returns a new APIResponse object.

func NewAPIResponseWithError

func NewAPIResponseWithError(errorMessage string) *APIResponse

NewAPIResponseWithError returns a new APIResponse object with the provided error message.

type ApiAuthControllerLoginRequest

type ApiAuthControllerLoginRequest struct {
	ApiService *DeveloperAuthAPIService
	// contains filtered or unexported fields
}

func (ApiAuthControllerLoginRequest) Email

Developer account email address.

func (ApiAuthControllerLoginRequest) Execute

func (ApiAuthControllerLoginRequest) Password

Account password.

type ApiAuthControllerLogoutRequest

type ApiAuthControllerLogoutRequest struct {
	ApiService *DeveloperAuthAPIService
	// contains filtered or unexported fields
}

func (ApiAuthControllerLogoutRequest) Execute

type ApiAuthControllerSignupRequest

type ApiAuthControllerSignupRequest struct {
	ApiService *DeveloperAuthAPIService
	// contains filtered or unexported fields
}

func (ApiAuthControllerSignupRequest) Company

Company or team name.

func (ApiAuthControllerSignupRequest) ConfirmPassword

func (r ApiAuthControllerSignupRequest) ConfirmPassword(confirmPassword string) ApiAuthControllerSignupRequest

Password confirmation.

func (ApiAuthControllerSignupRequest) Email

Work email used for dashboard access and API key delivery.

func (ApiAuthControllerSignupRequest) Execute

func (ApiAuthControllerSignupRequest) FullName

Full name for the developer account.

func (ApiAuthControllerSignupRequest) Password

Account password.

type ApiSimSwapControllerCheckSimSwapRequest

type ApiSimSwapControllerCheckSimSwapRequest struct {
	ApiService *SIMSwapIntelligenceAPIService
	// contains filtered or unexported fields
}

func (ApiSimSwapControllerCheckSimSwapRequest) CheckSimSwapDto

func (ApiSimSwapControllerCheckSimSwapRequest) Execute

func (ApiSimSwapControllerCheckSimSwapRequest) XAPIKey

Developer API key. Alternative: Authorization: Bearer <KEY>.

type BasicAuth

type BasicAuth struct {
	UserName string `json:"userName,omitempty"`
	Password string `json:"password,omitempty"`
}

BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth

type CheckSimSwapDto

type CheckSimSwapDto struct {
	// Subscriber phone number in strict E.164 format. Supports global numbering plans (e.g. +1 US, +49 DE, +234 NG Airtel/MTN).
	PhoneNumber string `json:"phoneNumber" validate:"regexp=^\\\\+[1-9]\\\\d{1,14}$"`
	// Maximum acceptable age, in hours, for SIM-swap intelligence.
	MaxAgeHours *float32 `json:"maxAgeHours,omitempty"`
}

CheckSimSwapDto struct for CheckSimSwapDto

func NewCheckSimSwapDto

func NewCheckSimSwapDto(phoneNumber string) *CheckSimSwapDto

NewCheckSimSwapDto instantiates a new CheckSimSwapDto object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed

func NewCheckSimSwapDtoWithDefaults

func NewCheckSimSwapDtoWithDefaults() *CheckSimSwapDto

NewCheckSimSwapDtoWithDefaults instantiates a new CheckSimSwapDto object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*CheckSimSwapDto) GetMaxAgeHours

func (o *CheckSimSwapDto) GetMaxAgeHours() float32

GetMaxAgeHours returns the MaxAgeHours field value if set, zero value otherwise.

func (*CheckSimSwapDto) GetMaxAgeHoursOk

func (o *CheckSimSwapDto) GetMaxAgeHoursOk() (*float32, bool)

GetMaxAgeHoursOk returns a tuple with the MaxAgeHours field value if set, nil otherwise and a boolean to check if the value has been set.

func (*CheckSimSwapDto) GetPhoneNumber

func (o *CheckSimSwapDto) GetPhoneNumber() string

GetPhoneNumber returns the PhoneNumber field value

func (*CheckSimSwapDto) GetPhoneNumberOk

func (o *CheckSimSwapDto) GetPhoneNumberOk() (*string, bool)

GetPhoneNumberOk returns a tuple with the PhoneNumber field value and a boolean to check if the value has been set.

func (*CheckSimSwapDto) HasMaxAgeHours

func (o *CheckSimSwapDto) HasMaxAgeHours() bool

HasMaxAgeHours returns a boolean if a field has been set.

func (CheckSimSwapDto) MarshalJSON

func (o CheckSimSwapDto) MarshalJSON() ([]byte, error)

func (*CheckSimSwapDto) SetMaxAgeHours

func (o *CheckSimSwapDto) SetMaxAgeHours(v float32)

SetMaxAgeHours gets a reference to the given float32 and assigns it to the MaxAgeHours field.

func (*CheckSimSwapDto) SetPhoneNumber

func (o *CheckSimSwapDto) SetPhoneNumber(v string)

SetPhoneNumber sets field value

func (CheckSimSwapDto) ToMap

func (o CheckSimSwapDto) ToMap() (map[string]interface{}, error)

func (*CheckSimSwapDto) UnmarshalJSON

func (o *CheckSimSwapDto) UnmarshalJSON(data []byte) (err error)

type Configuration

type Configuration struct {
	Host             string            `json:"host,omitempty"`
	Scheme           string            `json:"scheme,omitempty"`
	DefaultHeader    map[string]string `json:"defaultHeader,omitempty"`
	UserAgent        string            `json:"userAgent,omitempty"`
	Debug            bool              `json:"debug,omitempty"`
	Servers          ServerConfigurations
	OperationServers map[string]ServerConfigurations
	HTTPClient       *http.Client
}

Configuration stores the configuration of the API client

func NewConfiguration

func NewConfiguration() *Configuration

NewConfiguration returns a new Configuration object

func (*Configuration) AddDefaultHeader

func (c *Configuration) AddDefaultHeader(key string, value string)

AddDefaultHeader adds a new HTTP header to the default header in the request

func (*Configuration) ServerURL

func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error)

ServerURL returns URL based on server settings

func (*Configuration) ServerURLWithContext

func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error)

ServerURLWithContext returns a new server URL given an endpoint

type DeveloperAuthAPIService

type DeveloperAuthAPIService service

DeveloperAuthAPIService DeveloperAuthAPI service

func (*DeveloperAuthAPIService) AuthControllerLogin

AuthControllerLogin Authenticate a developer account

Accepts login credentials and redirects to the dashboard on success.

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiAuthControllerLoginRequest

func (*DeveloperAuthAPIService) AuthControllerLoginExecute

func (a *DeveloperAuthAPIService) AuthControllerLoginExecute(r ApiAuthControllerLoginRequest) (*http.Response, error)

Execute executes the request

func (*DeveloperAuthAPIService) AuthControllerLogout

AuthControllerLogout Sign out of the developer dashboard

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiAuthControllerLogoutRequest

func (*DeveloperAuthAPIService) AuthControllerLogoutExecute

func (a *DeveloperAuthAPIService) AuthControllerLogoutExecute(r ApiAuthControllerLogoutRequest) (*http.Response, error)

Execute executes the request

func (*DeveloperAuthAPIService) AuthControllerSignup

AuthControllerSignup Create a developer account

Registers a developer account and redirects to the dashboard on success.

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiAuthControllerSignupRequest

func (*DeveloperAuthAPIService) AuthControllerSignupExecute

func (a *DeveloperAuthAPIService) AuthControllerSignupExecute(r ApiAuthControllerSignupRequest) (*http.Response, error)

Execute executes the request

type GenericOpenAPIError

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

GenericOpenAPIError Provides access to the body, error and model on returned errors.

func (GenericOpenAPIError) Body

func (e GenericOpenAPIError) Body() []byte

Body returns the raw bytes of the response

func (GenericOpenAPIError) Error

func (e GenericOpenAPIError) Error() string

Error returns non-empty string if there was an error.

func (GenericOpenAPIError) Model

func (e GenericOpenAPIError) Model() interface{}

Model returns the unpacked model of the error

type LoginDto

type LoginDto struct {
	// Developer account email address.
	Email string `json:"email"`
	// Account password.
	Password string `json:"password"`
}

LoginDto struct for LoginDto

func NewLoginDto

func NewLoginDto(email string, password string) *LoginDto

NewLoginDto instantiates a new LoginDto object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed

func NewLoginDtoWithDefaults

func NewLoginDtoWithDefaults() *LoginDto

NewLoginDtoWithDefaults instantiates a new LoginDto object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*LoginDto) GetEmail

func (o *LoginDto) GetEmail() string

GetEmail returns the Email field value

func (*LoginDto) GetEmailOk

func (o *LoginDto) GetEmailOk() (*string, bool)

GetEmailOk returns a tuple with the Email field value and a boolean to check if the value has been set.

func (*LoginDto) GetPassword

func (o *LoginDto) GetPassword() string

GetPassword returns the Password field value

func (*LoginDto) GetPasswordOk

func (o *LoginDto) GetPasswordOk() (*string, bool)

GetPasswordOk returns a tuple with the Password field value and a boolean to check if the value has been set.

func (LoginDto) MarshalJSON

func (o LoginDto) MarshalJSON() ([]byte, error)

func (*LoginDto) SetEmail

func (o *LoginDto) SetEmail(v string)

SetEmail sets field value

func (*LoginDto) SetPassword

func (o *LoginDto) SetPassword(v string)

SetPassword sets field value

func (LoginDto) ToMap

func (o LoginDto) ToMap() (map[string]interface{}, error)

func (*LoginDto) UnmarshalJSON

func (o *LoginDto) UnmarshalJSON(data []byte) (err error)

type MappedNullable

type MappedNullable interface {
	ToMap() (map[string]interface{}, error)
}

type NullableBool

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

func NewNullableBool

func NewNullableBool(val *bool) *NullableBool

func (NullableBool) Get

func (v NullableBool) Get() *bool

func (NullableBool) IsSet

func (v NullableBool) IsSet() bool

func (NullableBool) MarshalJSON

func (v NullableBool) MarshalJSON() ([]byte, error)

func (*NullableBool) Set

func (v *NullableBool) Set(val *bool)

func (*NullableBool) UnmarshalJSON

func (v *NullableBool) UnmarshalJSON(src []byte) error

func (*NullableBool) Unset

func (v *NullableBool) Unset()

type NullableCheckSimSwapDto

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

func NewNullableCheckSimSwapDto

func NewNullableCheckSimSwapDto(val *CheckSimSwapDto) *NullableCheckSimSwapDto

func (NullableCheckSimSwapDto) Get

func (NullableCheckSimSwapDto) IsSet

func (v NullableCheckSimSwapDto) IsSet() bool

func (NullableCheckSimSwapDto) MarshalJSON

func (v NullableCheckSimSwapDto) MarshalJSON() ([]byte, error)

func (*NullableCheckSimSwapDto) Set

func (*NullableCheckSimSwapDto) UnmarshalJSON

func (v *NullableCheckSimSwapDto) UnmarshalJSON(src []byte) error

func (*NullableCheckSimSwapDto) Unset

func (v *NullableCheckSimSwapDto) Unset()

type NullableFloat32

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

func NewNullableFloat32

func NewNullableFloat32(val *float32) *NullableFloat32

func (NullableFloat32) Get

func (v NullableFloat32) Get() *float32

func (NullableFloat32) IsSet

func (v NullableFloat32) IsSet() bool

func (NullableFloat32) MarshalJSON

func (v NullableFloat32) MarshalJSON() ([]byte, error)

func (*NullableFloat32) Set

func (v *NullableFloat32) Set(val *float32)

func (*NullableFloat32) UnmarshalJSON

func (v *NullableFloat32) UnmarshalJSON(src []byte) error

func (*NullableFloat32) Unset

func (v *NullableFloat32) Unset()

type NullableFloat64

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

func NewNullableFloat64

func NewNullableFloat64(val *float64) *NullableFloat64

func (NullableFloat64) Get

func (v NullableFloat64) Get() *float64

func (NullableFloat64) IsSet

func (v NullableFloat64) IsSet() bool

func (NullableFloat64) MarshalJSON

func (v NullableFloat64) MarshalJSON() ([]byte, error)

func (*NullableFloat64) Set

func (v *NullableFloat64) Set(val *float64)

func (*NullableFloat64) UnmarshalJSON

func (v *NullableFloat64) UnmarshalJSON(src []byte) error

func (*NullableFloat64) Unset

func (v *NullableFloat64) Unset()

type NullableInt

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

func NewNullableInt

func NewNullableInt(val *int) *NullableInt

func (NullableInt) Get

func (v NullableInt) Get() *int

func (NullableInt) IsSet

func (v NullableInt) IsSet() bool

func (NullableInt) MarshalJSON

func (v NullableInt) MarshalJSON() ([]byte, error)

func (*NullableInt) Set

func (v *NullableInt) Set(val *int)

func (*NullableInt) UnmarshalJSON

func (v *NullableInt) UnmarshalJSON(src []byte) error

func (*NullableInt) Unset

func (v *NullableInt) Unset()

type NullableInt32

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

func NewNullableInt32

func NewNullableInt32(val *int32) *NullableInt32

func (NullableInt32) Get

func (v NullableInt32) Get() *int32

func (NullableInt32) IsSet

func (v NullableInt32) IsSet() bool

func (NullableInt32) MarshalJSON

func (v NullableInt32) MarshalJSON() ([]byte, error)

func (*NullableInt32) Set

func (v *NullableInt32) Set(val *int32)

func (*NullableInt32) UnmarshalJSON

func (v *NullableInt32) UnmarshalJSON(src []byte) error

func (*NullableInt32) Unset

func (v *NullableInt32) Unset()

type NullableInt64

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

func NewNullableInt64

func NewNullableInt64(val *int64) *NullableInt64

func (NullableInt64) Get

func (v NullableInt64) Get() *int64

func (NullableInt64) IsSet

func (v NullableInt64) IsSet() bool

func (NullableInt64) MarshalJSON

func (v NullableInt64) MarshalJSON() ([]byte, error)

func (*NullableInt64) Set

func (v *NullableInt64) Set(val *int64)

func (*NullableInt64) UnmarshalJSON

func (v *NullableInt64) UnmarshalJSON(src []byte) error

func (*NullableInt64) Unset

func (v *NullableInt64) Unset()

type NullableLoginDto

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

func NewNullableLoginDto

func NewNullableLoginDto(val *LoginDto) *NullableLoginDto

func (NullableLoginDto) Get

func (v NullableLoginDto) Get() *LoginDto

func (NullableLoginDto) IsSet

func (v NullableLoginDto) IsSet() bool

func (NullableLoginDto) MarshalJSON

func (v NullableLoginDto) MarshalJSON() ([]byte, error)

func (*NullableLoginDto) Set

func (v *NullableLoginDto) Set(val *LoginDto)

func (*NullableLoginDto) UnmarshalJSON

func (v *NullableLoginDto) UnmarshalJSON(src []byte) error

func (*NullableLoginDto) Unset

func (v *NullableLoginDto) Unset()

type NullableSignupDto

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

func NewNullableSignupDto

func NewNullableSignupDto(val *SignupDto) *NullableSignupDto

func (NullableSignupDto) Get

func (v NullableSignupDto) Get() *SignupDto

func (NullableSignupDto) IsSet

func (v NullableSignupDto) IsSet() bool

func (NullableSignupDto) MarshalJSON

func (v NullableSignupDto) MarshalJSON() ([]byte, error)

func (*NullableSignupDto) Set

func (v *NullableSignupDto) Set(val *SignupDto)

func (*NullableSignupDto) UnmarshalJSON

func (v *NullableSignupDto) UnmarshalJSON(src []byte) error

func (*NullableSignupDto) Unset

func (v *NullableSignupDto) Unset()

type NullableSimSwapResponseDto

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

func NewNullableSimSwapResponseDto

func NewNullableSimSwapResponseDto(val *SimSwapResponseDto) *NullableSimSwapResponseDto

func (NullableSimSwapResponseDto) Get

func (NullableSimSwapResponseDto) IsSet

func (v NullableSimSwapResponseDto) IsSet() bool

func (NullableSimSwapResponseDto) MarshalJSON

func (v NullableSimSwapResponseDto) MarshalJSON() ([]byte, error)

func (*NullableSimSwapResponseDto) Set

func (*NullableSimSwapResponseDto) UnmarshalJSON

func (v *NullableSimSwapResponseDto) UnmarshalJSON(src []byte) error

func (*NullableSimSwapResponseDto) Unset

func (v *NullableSimSwapResponseDto) Unset()

type NullableString

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

func NewNullableString

func NewNullableString(val *string) *NullableString

func (NullableString) Get

func (v NullableString) Get() *string

func (NullableString) IsSet

func (v NullableString) IsSet() bool

func (NullableString) MarshalJSON

func (v NullableString) MarshalJSON() ([]byte, error)

func (*NullableString) Set

func (v *NullableString) Set(val *string)

func (*NullableString) UnmarshalJSON

func (v *NullableString) UnmarshalJSON(src []byte) error

func (*NullableString) Unset

func (v *NullableString) Unset()

type NullableTime

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

func NewNullableTime

func NewNullableTime(val *time.Time) *NullableTime

func (NullableTime) Get

func (v NullableTime) Get() *time.Time

func (NullableTime) IsSet

func (v NullableTime) IsSet() bool

func (NullableTime) MarshalJSON

func (v NullableTime) MarshalJSON() ([]byte, error)

func (*NullableTime) Set

func (v *NullableTime) Set(val *time.Time)

func (*NullableTime) UnmarshalJSON

func (v *NullableTime) UnmarshalJSON(src []byte) error

func (*NullableTime) Unset

func (v *NullableTime) Unset()

type SIMSwapIntelligenceAPIService

type SIMSwapIntelligenceAPIService service

SIMSwapIntelligenceAPIService SIMSwapIntelligenceAPI service

func (*SIMSwapIntelligenceAPIService) SimSwapControllerCheckSimSwap

SimSwapControllerCheckSimSwap Run a real-time SIM-swap risk check

Checks a subscriber phone number against mocked global telecom registry intelligence and returns whether recent SIM-swap activity is present. Carrier resolution uses national mobile prefixes worldwide (Nigeria MTN/Airtel/Glo/9mobile, Germany Telekom/Vodafone/O2, US AT&T/T-Mobile/Verizon, UK, India, UAE, and more). Mock rule: numbers ending in 9 report a swap within the last 2 hours.

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiSimSwapControllerCheckSimSwapRequest

func (*SIMSwapIntelligenceAPIService) SimSwapControllerCheckSimSwapExecute

Execute executes the request

@return SimSwapResponseDto

type ServerConfiguration

type ServerConfiguration struct {
	URL         string
	Description string
	Variables   map[string]ServerVariable
}

ServerConfiguration stores the information about a server

type ServerConfigurations

type ServerConfigurations []ServerConfiguration

ServerConfigurations stores multiple ServerConfiguration items

func (ServerConfigurations) URL

func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error)

URL formats template on a index using given variables

type ServerVariable

type ServerVariable struct {
	Description  string
	DefaultValue string
	EnumValues   []string
}

ServerVariable stores the information about a server variable

type SignupDto

type SignupDto struct {
	// Full name for the developer account.
	FullName string `json:"fullName"`
	// Work email used for dashboard access and API key delivery.
	Email string `json:"email"`
	// Company or team name.
	Company *string `json:"company,omitempty"`
	// Account password.
	Password string `json:"password"`
	// Password confirmation.
	ConfirmPassword string `json:"confirmPassword"`
}

SignupDto struct for SignupDto

func NewSignupDto

func NewSignupDto(fullName string, email string, password string, confirmPassword string) *SignupDto

NewSignupDto instantiates a new SignupDto object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed

func NewSignupDtoWithDefaults

func NewSignupDtoWithDefaults() *SignupDto

NewSignupDtoWithDefaults instantiates a new SignupDto object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*SignupDto) GetCompany

func (o *SignupDto) GetCompany() string

GetCompany returns the Company field value if set, zero value otherwise.

func (*SignupDto) GetCompanyOk

func (o *SignupDto) GetCompanyOk() (*string, bool)

GetCompanyOk returns a tuple with the Company field value if set, nil otherwise and a boolean to check if the value has been set.

func (*SignupDto) GetConfirmPassword

func (o *SignupDto) GetConfirmPassword() string

GetConfirmPassword returns the ConfirmPassword field value

func (*SignupDto) GetConfirmPasswordOk

func (o *SignupDto) GetConfirmPasswordOk() (*string, bool)

GetConfirmPasswordOk returns a tuple with the ConfirmPassword field value and a boolean to check if the value has been set.

func (*SignupDto) GetEmail

func (o *SignupDto) GetEmail() string

GetEmail returns the Email field value

func (*SignupDto) GetEmailOk

func (o *SignupDto) GetEmailOk() (*string, bool)

GetEmailOk returns a tuple with the Email field value and a boolean to check if the value has been set.

func (*SignupDto) GetFullName

func (o *SignupDto) GetFullName() string

GetFullName returns the FullName field value

func (*SignupDto) GetFullNameOk

func (o *SignupDto) GetFullNameOk() (*string, bool)

GetFullNameOk returns a tuple with the FullName field value and a boolean to check if the value has been set.

func (*SignupDto) GetPassword

func (o *SignupDto) GetPassword() string

GetPassword returns the Password field value

func (*SignupDto) GetPasswordOk

func (o *SignupDto) GetPasswordOk() (*string, bool)

GetPasswordOk returns a tuple with the Password field value and a boolean to check if the value has been set.

func (*SignupDto) HasCompany

func (o *SignupDto) HasCompany() bool

HasCompany returns a boolean if a field has been set.

func (SignupDto) MarshalJSON

func (o SignupDto) MarshalJSON() ([]byte, error)

func (*SignupDto) SetCompany

func (o *SignupDto) SetCompany(v string)

SetCompany gets a reference to the given string and assigns it to the Company field.

func (*SignupDto) SetConfirmPassword

func (o *SignupDto) SetConfirmPassword(v string)

SetConfirmPassword sets field value

func (*SignupDto) SetEmail

func (o *SignupDto) SetEmail(v string)

SetEmail sets field value

func (*SignupDto) SetFullName

func (o *SignupDto) SetFullName(v string)

SetFullName sets field value

func (*SignupDto) SetPassword

func (o *SignupDto) SetPassword(v string)

SetPassword sets field value

func (SignupDto) ToMap

func (o SignupDto) ToMap() (map[string]interface{}, error)

func (*SignupDto) UnmarshalJSON

func (o *SignupDto) UnmarshalJSON(data []byte) (err error)

type SimSwapResponseDto

type SimSwapResponseDto struct {
	// Subscriber phone number in E.164 format.
	PhoneNumber string `json:"phoneNumber"`
	// Whether the network registry indicates a recent SIM swap.
	Swapped bool `json:"swapped"`
	// ISO-8601 timestamp of the most recent SIM-swap signal.
	LastSwappedAt *time.Time `json:"lastSwappedAt,omitempty"`
	// Resolved mobile network operator or telecom provider (global prefix catalog).
	Provider string `json:"provider"`
	// Resolved mobile network operator. Alias retained for telco domain consumers.
	Operator string `json:"operator"`
}

SimSwapResponseDto struct for SimSwapResponseDto

func NewSimSwapResponseDto

func NewSimSwapResponseDto(phoneNumber string, swapped bool, provider string, operator string) *SimSwapResponseDto

NewSimSwapResponseDto instantiates a new SimSwapResponseDto object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed

func NewSimSwapResponseDtoWithDefaults

func NewSimSwapResponseDtoWithDefaults() *SimSwapResponseDto

NewSimSwapResponseDtoWithDefaults instantiates a new SimSwapResponseDto object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*SimSwapResponseDto) GetLastSwappedAt

func (o *SimSwapResponseDto) GetLastSwappedAt() time.Time

GetLastSwappedAt returns the LastSwappedAt field value if set, zero value otherwise.

func (*SimSwapResponseDto) GetLastSwappedAtOk

func (o *SimSwapResponseDto) GetLastSwappedAtOk() (*time.Time, bool)

GetLastSwappedAtOk returns a tuple with the LastSwappedAt field value if set, nil otherwise and a boolean to check if the value has been set.

func (*SimSwapResponseDto) GetOperator

func (o *SimSwapResponseDto) GetOperator() string

GetOperator returns the Operator field value

func (*SimSwapResponseDto) GetOperatorOk

func (o *SimSwapResponseDto) GetOperatorOk() (*string, bool)

GetOperatorOk returns a tuple with the Operator field value and a boolean to check if the value has been set.

func (*SimSwapResponseDto) GetPhoneNumber

func (o *SimSwapResponseDto) GetPhoneNumber() string

GetPhoneNumber returns the PhoneNumber field value

func (*SimSwapResponseDto) GetPhoneNumberOk

func (o *SimSwapResponseDto) GetPhoneNumberOk() (*string, bool)

GetPhoneNumberOk returns a tuple with the PhoneNumber field value and a boolean to check if the value has been set.

func (*SimSwapResponseDto) GetProvider

func (o *SimSwapResponseDto) GetProvider() string

GetProvider returns the Provider field value

func (*SimSwapResponseDto) GetProviderOk

func (o *SimSwapResponseDto) GetProviderOk() (*string, bool)

GetProviderOk returns a tuple with the Provider field value and a boolean to check if the value has been set.

func (*SimSwapResponseDto) GetSwapped

func (o *SimSwapResponseDto) GetSwapped() bool

GetSwapped returns the Swapped field value

func (*SimSwapResponseDto) GetSwappedOk

func (o *SimSwapResponseDto) GetSwappedOk() (*bool, bool)

GetSwappedOk returns a tuple with the Swapped field value and a boolean to check if the value has been set.

func (*SimSwapResponseDto) HasLastSwappedAt

func (o *SimSwapResponseDto) HasLastSwappedAt() bool

HasLastSwappedAt returns a boolean if a field has been set.

func (SimSwapResponseDto) MarshalJSON

func (o SimSwapResponseDto) MarshalJSON() ([]byte, error)

func (*SimSwapResponseDto) SetLastSwappedAt

func (o *SimSwapResponseDto) SetLastSwappedAt(v time.Time)

SetLastSwappedAt gets a reference to the given time.Time and assigns it to the LastSwappedAt field.

func (*SimSwapResponseDto) SetOperator

func (o *SimSwapResponseDto) SetOperator(v string)

SetOperator sets field value

func (*SimSwapResponseDto) SetPhoneNumber

func (o *SimSwapResponseDto) SetPhoneNumber(v string)

SetPhoneNumber sets field value

func (*SimSwapResponseDto) SetProvider

func (o *SimSwapResponseDto) SetProvider(v string)

SetProvider sets field value

func (*SimSwapResponseDto) SetSwapped

func (o *SimSwapResponseDto) SetSwapped(v bool)

SetSwapped sets field value

func (SimSwapResponseDto) ToMap

func (o SimSwapResponseDto) ToMap() (map[string]interface{}, error)

func (*SimSwapResponseDto) UnmarshalJSON

func (o *SimSwapResponseDto) UnmarshalJSON(data []byte) (err error)

Jump to

Keyboard shortcuts

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