// Configure configures the plugin.
Configure configures the plugin.
// Configure configures the plugin .
func (p *Provider) Configure(
	_ context.Context,
	req *dockerregistryproxyv1.ConfigureRequest,
) (*empty.Empty, error) {
	if val, ok := req.Attributes[flagUsername]; ok {
		username, err := plugin.UnmarshalConfigurationValue(
			dockerregistryproxyv1.ConfigType_CONFIG_TYPE_STRING,
			val.GetValue(),
		)
		if err != nil {
			return nil, err
		}
		p.username = username.(string)
		log.Printf("configured username as '%s'", p.username)
	}
	return &empty.Empty{}, nil
}
func ( p * Provider ) Configure ( _ context . Context , req * dockerregistryproxyv1 . ConfigureRequest , ) ( * empty . Empty , error ) { if val , ok := req . Attributes [ flagUsername ] ; ok { username , err := plugin . UnmarshalConfigurationValue ( dockerregistryproxyv1 . ConfigType_CONFIG_TYPE_STRING , val . GetValue ( ) , ) if err != nil { return nil , err } p . username = username . ( string ) log . Printf ( " " , p . username ) } return & empty . Empty { } , nil }
Configure configures the plugin.
Configure configures the plugin .