pbflag

package
v0.0.0-...-335641f Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIKeyRights

func APIKeyRights(defaultRights ...packetbroker.Right) *flag.FlagSet

APIKeyRights returns flags for API key rights.

func APIKeyState

func APIKeyState(name string) *flag.FlagSet

APIKeyState returns flags for an API key state.

func ApplyToTarget

func ApplyToTarget(flags *flag.FlagSet, actor string, target **packetbroker.Target) error

ApplyToTarget applies the values from the flags to the given target.

func ContactInfo

func ContactInfo(actor string) *flag.FlagSet

ContactInfo returns flags for contact information.

func DevAddrBlocks

func DevAddrBlocks(addRemove bool) *flag.FlagSet

DevAddrBlocks returns flags for DevAddr blocks.

func Endpoint

func Endpoint(actor string) *flag.FlagSet

Endpoint returns flags for an Endpoint.

func EndpointFlagsChanged

func EndpointFlagsChanged(flags *flag.FlagSet, actor string) bool

EndpointFlagsChanged returns whether any of the endpoint flags are changed.

func GatewayVisibility

func GatewayVisibility() *flag.FlagSet

GatewayVisibility returns flags for gateway visibility.

func GetAPIKeyRights

func GetAPIKeyRights(flags *flag.FlagSet) []packetbroker.Right

GetAPIKeyRights returns the API key rights from the flags.

func GetAPIKeyState

func GetAPIKeyState(flags *flag.FlagSet, name string) packetbroker.APIKeyState

GetAPIKeyState returns the API key state from the flags.

func GetContactInfo

func GetContactInfo(flags *flag.FlagSet, actor string) *packetbroker.ContactInfo

GetContactInfo returns the contact information from flags.

func GetDevAddrBlocks

func GetDevAddrBlocks(flags *flag.FlagSet) (all, add, remove []*packetbroker.DevAddrBlock)

GetDevAddrBlocks returns the DevAddr blocks from the flags.

func GetEndpoint

func GetEndpoint(flags *flag.FlagSet, actor string) (packetbroker.Endpoint, bool)

GetEndpoint returns the Endpoint from the flags.

func GetGatewayVisibility

func GetGatewayVisibility(flags *flag.FlagSet) *packetbroker.GatewayVisibility

GetGatewayVisibility returns the gateway visibility from the flags.

func GetJoinEUIPrefixes

func GetJoinEUIPrefixes(flags *flag.FlagSet) []*packetbroker.JoinEUIPrefix

GetJoinEUIPrefixes returns the JoinEUI prefixes from the flags.

func GetMonthYear

func GetMonthYear(flags *flag.FlagSet, name string) (month, year int, ok bool)

GetMonthYear returns the month year from flags.

func GetNetID

func GetNetID(flags *flag.FlagSet, actor string) (packetbroker.NetID, bool)

GetNetID returns the NetID from the flags.

func GetRoutingPolicy

GetRoutingPolicy returns the routing policy from the flags.

func GetTargetProtocol

func GetTargetProtocol(flags *flag.FlagSet, actor string) *packetbroker.Protocol

GetTargetProtocol returns the protocol from the flags.

func GetTenantID

func GetTenantID(flags *flag.FlagSet, actor string) (packetbroker.TenantID, bool)

GetTenantID returns the TenantID from the flags. The actor is used as prefix.

func GetTenantIDWrappers

func GetTenantIDWrappers(flags *flag.FlagSet, actor string) (netID *wrapperspb.UInt32Value, id *wrapperspb.StringValue)

GetTenantIDWrappers returns the TenantID as protobuf wrappers. The returned values are nil when they are not set.

func HasEndpoint

func HasEndpoint(flags *flag.FlagSet, actor string) (hasNetID, hasTenantID, hasClusterID bool)

HasEndpoint returns which endpoint flags are set.

func JoinEUIPrefixes

func JoinEUIPrefixes() *flag.FlagSet

JoinEUIPrefixes returns flags for JoinEUI prefixes.

func MessageType

func MessageType() *flag.FlagSet

MessageType returns flags for the message type.

func MonthYear

func MonthYear(name string) *flag.FlagSet

MonthYear returns flags for a month in a year.

func NetID

func NetID(actor string) *flag.FlagSet

NetID returns flags for a NetID.

func NewForwarderMessage

func NewForwarderMessage(flags *flag.FlagSet) proto.Message

NewForwarderMessage returns a new message based on the specified type.

func NewHomeNetworkMessage

func NewHomeNetworkMessage(flags *flag.FlagSet) proto.Message

NewHomeNetworkMessage returns a new message based on the specified type.

func Protocol

func Protocol(actor string) *flag.FlagSet

Protocol returns flags for a protocol.

func RoutingPolicy

func RoutingPolicy() *flag.FlagSet

RoutingPolicy returns flags for a routing policy.

func Target

func Target(actor string) *flag.FlagSet

Target returns flags for a target.

func TargetFlagsChanged

func TargetFlagsChanged(flags *flag.FlagSet, actor string) bool

TargetFlagsChanged returns whether any of the target values has been changed.

func TargetProtocolChanged

func TargetProtocolChanged(flags *flag.FlagSet, actor string) bool

TargetProtocolChanged returns whether the flag has been changed.

func TenantID

func TenantID(actor string) *flag.FlagSet

TenantID returns flags for a TenantID.

func TenantIDChanged

func TenantIDChanged(flags *flag.FlagSet, actor string) bool

TenantIDChanged returns whether the tenant ID flag has been changed explicitly.

Types

This section is empty.

Jump to

Keyboard shortcuts

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