Documentation ¶
Index ¶
- func ForceRefreshToken(ctx log.Interface)
- func GetAccount(ctx log.Interface) *account.Account
- func GetAppEUI(ctx log.Interface) types.AppEUI
- func GetAppID(ctx log.Interface) string
- func GetConfigFile() string
- func GetContext(ctx log.Interface, extraPairs ...string) context.Context
- func GetDataDir() string
- func GetDiscovery(ctx log.Interface) (*grpc.ClientConn, discovery.DiscoveryClient)
- func GetGatewayMetadata(id string, freq uint64) *gateway.RxMetadata
- func GetHandlerManager(ctx log.Interface, appID string) (*grpc.ClientConn, *handler.ManagerClient)
- func GetID() string
- func GetMQTT(ctx log.Interface) mqtt.Client
- func GetProtocolMetadata(dataRate string) *protocol.RxMetadata
- func GetRouter(ctx log.Interface) *router.Client
- func GetRouterManager(ctx log.Interface) (*grpc.ClientConn, router.RouterManagerClient)
- func GetTokenCache() cache.Cache
- func GetTokenManager(accessToken string) tokens.Manager
- func GetTokenSource(ctx log.Interface) oauth2.TokenSource
- func Login(ctx log.Interface, code string) (*oauth2.Token, error)
- func Logout() error
- func ParseLocation(locationStr string) (*account.Location, error)
- func PrintConfig(ctx log.Interface, debug bool)
- func SetApp(ctx log.Interface, appID string, appEUI types.AppEUI)
- func SetAppEUI(ctx log.Interface, appEUI types.AppEUI)
- func TokenForScope(ctx log.Interface, scope string) string
- type Message
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ForceRefreshToken ¶
ForceRefreshToken forces a refresh of the access token
func GetAccount ¶
GetAccount gets a new Account server client for ttnctl
func GetConfigFile ¶
func GetConfigFile() string
GetConfigFile returns the location of the configuration file. It checks the following (in this order): the --config flag $XDG_CONFIG_HOME/ttnctl/config.yml (if $XDG_CONFIG_HOME is set) $HOME/.ttnctl.yml
func GetContext ¶
GetContext returns a new context
func GetDataDir ¶
func GetDataDir() string
GetDataDir returns the location of the data directory used for sotring data. It checks the following (in this order): the --data flag $XDG_DATA_HOME/ttnctl (if $XDG_DATA_HOME is set) $XDG_CACHE_HOME/ttnctl (if $XDG_CACHE_HOME is set) $HOME/.ttnctl
func GetDiscovery ¶
func GetDiscovery(ctx log.Interface) (*grpc.ClientConn, discovery.DiscoveryClient)
GetDiscovery gets the Discovery client for ttnctl
func GetGatewayMetadata ¶
func GetGatewayMetadata(id string, freq uint64) *gateway.RxMetadata
GetGatewayMetadata returns gateway metadata for the given gateway ID and frequency
func GetHandlerManager ¶
func GetHandlerManager(ctx log.Interface, appID string) (*grpc.ClientConn, *handler.ManagerClient)
GetHandlerManager gets a new HandlerManager for ttnctl
func GetProtocolMetadata ¶
func GetProtocolMetadata(dataRate string) *protocol.RxMetadata
GetProtocolMetadata returns protocol metadata for the given datarate
func GetRouterManager ¶
func GetRouterManager(ctx log.Interface) (*grpc.ClientConn, router.RouterManagerClient)
GetRouterManager starts a management connection with the router
func GetTokenCache ¶
GetCache get's the cache that will store our tokens
func GetTokenManager ¶
func GetTokenSource ¶
func GetTokenSource(ctx log.Interface) oauth2.TokenSource
GetTokenSource builds a new oauth2.TokenSource that uses the ttnctl config to store the token