@@ -33,13 +33,6 @@ func GetGeneratedCommands() *core.Commands {
33
33
ipfsPinGet (),
34
34
ipfsPinList (),
35
35
ipfsPinDelete (),
36
- ipfsNameCreate (),
37
- ipfsNameGet (),
38
- ipfsNameDelete (),
39
- ipfsNameList (),
40
- ipfsNameUpdate (),
41
- ipfsNameExportKey (),
42
- ipfsNameImportKey (),
43
36
)
44
37
}
45
38
func ipfsRoot () * core.Command {
@@ -514,272 +507,3 @@ This content can therefore be removed and no longer provided on the IPFS network
514
507
},
515
508
}
516
509
}
517
-
518
- func ipfsNameCreate () * core.Command {
519
- return & core.Command {
520
- Short : `Create a new name` ,
521
- Long : `You can use the ` + "`" + `ipfs key` + "`" + ` command to list and generate more names and their respective keys.` ,
522
- Namespace : "ipfs" ,
523
- Resource : "name" ,
524
- Verb : "create" ,
525
- // Deprecated: false,
526
- ArgsType : reflect .TypeOf (ipfs.CreateNameRequest {}),
527
- ArgSpecs : core.ArgSpecs {
528
- core .ProjectIDArgSpec (),
529
- {
530
- Name : "name" ,
531
- Required : false ,
532
- Deprecated : false ,
533
- Positional : false ,
534
- },
535
- {
536
- Name : "value" ,
537
- Required : false ,
538
- Deprecated : false ,
539
- Positional : false ,
540
- },
541
- core .RegionArgSpec (scw .RegionFrPar , scw .RegionNlAms , scw .RegionPlWaw ),
542
- },
543
- Run : func (ctx context.Context , args interface {}) (i interface {}, e error ) {
544
- request := args .(* ipfs.CreateNameRequest )
545
-
546
- client := core .ExtractClient (ctx )
547
- api := ipfs .NewAPI (client )
548
- return api .CreateName (request )
549
-
550
- },
551
- }
552
- }
553
-
554
- func ipfsNameGet () * core.Command {
555
- return & core.Command {
556
- Short : `Get information about a name` ,
557
- Long : `Retrieve information about a specific name.` ,
558
- Namespace : "ipfs" ,
559
- Resource : "name" ,
560
- Verb : "get" ,
561
- // Deprecated: false,
562
- ArgsType : reflect .TypeOf (ipfs.GetNameRequest {}),
563
- ArgSpecs : core.ArgSpecs {
564
- {
565
- Name : "name-id" ,
566
- Required : true ,
567
- Deprecated : false ,
568
- Positional : false ,
569
- },
570
- core .RegionArgSpec (scw .RegionFrPar , scw .RegionNlAms , scw .RegionPlWaw ),
571
- },
572
- Run : func (ctx context.Context , args interface {}) (i interface {}, e error ) {
573
- request := args .(* ipfs.GetNameRequest )
574
-
575
- client := core .ExtractClient (ctx )
576
- api := ipfs .NewAPI (client )
577
- return api .GetName (request )
578
-
579
- },
580
- }
581
- }
582
-
583
- func ipfsNameDelete () * core.Command {
584
- return & core.Command {
585
- Short : `Delete an existing name` ,
586
- Long : `Delete a name by its ID.` ,
587
- Namespace : "ipfs" ,
588
- Resource : "name" ,
589
- Verb : "delete" ,
590
- // Deprecated: false,
591
- ArgsType : reflect .TypeOf (ipfs.DeleteNameRequest {}),
592
- ArgSpecs : core.ArgSpecs {
593
- {
594
- Name : "name-id" ,
595
- Required : true ,
596
- Deprecated : false ,
597
- Positional : false ,
598
- },
599
- core .RegionArgSpec (scw .RegionFrPar , scw .RegionNlAms , scw .RegionPlWaw ),
600
- },
601
- Run : func (ctx context.Context , args interface {}) (i interface {}, e error ) {
602
- request := args .(* ipfs.DeleteNameRequest )
603
-
604
- client := core .ExtractClient (ctx )
605
- api := ipfs .NewAPI (client )
606
- e = api .DeleteName (request )
607
- if e != nil {
608
- return nil , e
609
- }
610
- return & core.SuccessResult {
611
- Resource : "name" ,
612
- Verb : "delete" ,
613
- }, nil
614
- },
615
- }
616
- }
617
-
618
- func ipfsNameList () * core.Command {
619
- return & core.Command {
620
- Short : `List all names by a Project ID` ,
621
- Long : `Retrieve information about all names from a Project ID.` ,
622
- Namespace : "ipfs" ,
623
- Resource : "name" ,
624
- Verb : "list" ,
625
- // Deprecated: false,
626
- ArgsType : reflect .TypeOf (ipfs.ListNamesRequest {}),
627
- ArgSpecs : core.ArgSpecs {
628
- {
629
- Name : "order-by" ,
630
- Required : false ,
631
- Deprecated : false ,
632
- Positional : false ,
633
- EnumValues : []string {"created_at_asc" , "created_at_desc" },
634
- },
635
- {
636
- Name : "project-id" ,
637
- Required : false ,
638
- Deprecated : false ,
639
- Positional : false ,
640
- },
641
- {
642
- Name : "organization-id" ,
643
- Required : false ,
644
- Deprecated : false ,
645
- Positional : false ,
646
- },
647
- core .RegionArgSpec (scw .RegionFrPar , scw .RegionNlAms , scw .RegionPlWaw , scw .Region (core .AllLocalities )),
648
- },
649
- Run : func (ctx context.Context , args interface {}) (i interface {}, e error ) {
650
- request := args .(* ipfs.ListNamesRequest )
651
-
652
- client := core .ExtractClient (ctx )
653
- api := ipfs .NewAPI (client )
654
- opts := []scw.RequestOption {scw .WithAllPages ()}
655
- if request .Region == scw .Region (core .AllLocalities ) {
656
- opts = append (opts , scw .WithRegions (api .Regions ()... ))
657
- request .Region = ""
658
- }
659
- resp , err := api .ListNames (request , opts ... )
660
- if err != nil {
661
- return nil , err
662
- }
663
- return resp .Names , nil
664
-
665
- },
666
- }
667
- }
668
-
669
- func ipfsNameUpdate () * core.Command {
670
- return & core.Command {
671
- Short : `Update name information` ,
672
- Long : `Update name information (CID, tag, name...).` ,
673
- Namespace : "ipfs" ,
674
- Resource : "name" ,
675
- Verb : "update" ,
676
- // Deprecated: false,
677
- ArgsType : reflect .TypeOf (ipfs.UpdateNameRequest {}),
678
- ArgSpecs : core.ArgSpecs {
679
- {
680
- Name : "name-id" ,
681
- Required : true ,
682
- Deprecated : false ,
683
- Positional : false ,
684
- },
685
- {
686
- Name : "name" ,
687
- Required : false ,
688
- Deprecated : false ,
689
- Positional : false ,
690
- },
691
- {
692
- Name : "tags.{index}" ,
693
- Required : false ,
694
- Deprecated : false ,
695
- Positional : false ,
696
- },
697
- {
698
- Name : "value" ,
699
- Required : false ,
700
- Deprecated : false ,
701
- Positional : false ,
702
- },
703
- core .RegionArgSpec (scw .RegionFrPar , scw .RegionNlAms , scw .RegionPlWaw ),
704
- },
705
- Run : func (ctx context.Context , args interface {}) (i interface {}, e error ) {
706
- request := args .(* ipfs.UpdateNameRequest )
707
-
708
- client := core .ExtractClient (ctx )
709
- api := ipfs .NewAPI (client )
710
- return api .UpdateName (request )
711
-
712
- },
713
- }
714
- }
715
-
716
- func ipfsNameExportKey () * core.Command {
717
- return & core.Command {
718
- Short : `Export your private key` ,
719
- Long : `Export a private key by its ID.` ,
720
- Namespace : "ipfs" ,
721
- Resource : "name" ,
722
- Verb : "export-key" ,
723
- // Deprecated: false,
724
- ArgsType : reflect .TypeOf (ipfs.ExportKeyNameRequest {}),
725
- ArgSpecs : core.ArgSpecs {
726
- {
727
- Name : "name-id" ,
728
- Required : true ,
729
- Deprecated : false ,
730
- Positional : false ,
731
- },
732
- core .RegionArgSpec (scw .RegionFrPar , scw .RegionNlAms , scw .RegionPlWaw ),
733
- },
734
- Run : func (ctx context.Context , args interface {}) (i interface {}, e error ) {
735
- request := args .(* ipfs.ExportKeyNameRequest )
736
-
737
- client := core .ExtractClient (ctx )
738
- api := ipfs .NewAPI (client )
739
- return api .ExportKeyName (request )
740
-
741
- },
742
- }
743
- }
744
-
745
- func ipfsNameImportKey () * core.Command {
746
- return & core.Command {
747
- Short : `Import your private key` ,
748
- Long : `Import a private key.` ,
749
- Namespace : "ipfs" ,
750
- Resource : "name" ,
751
- Verb : "import-key" ,
752
- // Deprecated: false,
753
- ArgsType : reflect .TypeOf (ipfs.ImportKeyNameRequest {}),
754
- ArgSpecs : core.ArgSpecs {
755
- core .ProjectIDArgSpec (),
756
- {
757
- Name : "name" ,
758
- Required : false ,
759
- Deprecated : false ,
760
- Positional : false ,
761
- },
762
- {
763
- Name : "private-key" ,
764
- Required : false ,
765
- Deprecated : false ,
766
- Positional : false ,
767
- },
768
- {
769
- Name : "value" ,
770
- Required : false ,
771
- Deprecated : false ,
772
- Positional : false ,
773
- },
774
- core .RegionArgSpec (scw .RegionFrPar , scw .RegionNlAms , scw .RegionPlWaw ),
775
- },
776
- Run : func (ctx context.Context , args interface {}) (i interface {}, e error ) {
777
- request := args .(* ipfs.ImportKeyNameRequest )
778
-
779
- client := core .ExtractClient (ctx )
780
- api := ipfs .NewAPI (client )
781
- return api .ImportKeyName (request )
782
-
783
- },
784
- }
785
- }
0 commit comments