Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Name of the service Name = "go.micro.auth" // Address of the service Address = ":8010" // ServiceFlags are provided to commands which run micro services ServiceFlags = []cli.Flag{ &cli.StringFlag{ Name: "address", Usage: "Set the auth http address e.g 0.0.0.0:8010", EnvVars: []string{"MICRO_SERVER_ADDRESS"}, }, &cli.StringFlag{ Name: "auth_provider", EnvVars: []string{"MICRO_AUTH_PROVIDER"}, Usage: "Auth provider enables account generation", }, &cli.StringFlag{ Name: "auth_public_key", EnvVars: []string{"MICRO_AUTH_PUBLIC_KEY"}, Usage: "Public key for JWT auth (base64 encoded PEM)", }, &cli.StringFlag{ Name: "auth_private_key", EnvVars: []string{"MICRO_AUTH_PRIVATE_KEY"}, Usage: "Private key for JWT auth (base64 encoded PEM)", }, } // RuleFlags are provided to commands which create or delete rules RuleFlags = []cli.Flag{ &cli.StringFlag{ Name: "role", Usage: "The role to amend, e.g. 'user' or '*' to represent all", Required: true, }, &cli.StringFlag{ Name: "resource", Usage: "The resource to amend in the format namespace:type:name:endpoint, e.g. micro:service:go.micro.auth:*", Required: true, }, &cli.StringFlag{ Name: "access", Usage: "The access level, must be granted or denied", Value: "granted", }, &cli.IntFlag{ Name: "priority", Usage: "The priority level, default is 0, the greater the number the higher the priority", Value: 0, }, } // AccountFlags are provided to the create account command AccountFlags = []cli.Flag{ &cli.StringFlag{ Name: "id", Usage: "The account id", Required: true, }, &cli.StringFlag{ Name: "secret", Usage: "The account secret (password)", Required: true, }, &cli.StringSliceFlag{ Name: "roles", Usage: "Comma seperated list of roles to give the account", }, } // PlatformFlag connects via proxy PlatformFlag = &cli.BoolFlag{ Name: "platform", Usage: "Connect to the platform", Value: false, } )
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.