summaryrefslogtreecommitdiff
path: root/forgeConfig.proto
blob: 6328d7d7e1aedb0ec77e7cac41d602e4d6263829 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
// Copyright 2025 WIT.COM Inc Licensed GPL 3.0

syntax = "proto3";

package forgepb;

import "google/protobuf/timestamp.proto"; // Import the well-known type for Timestamp

// `autogenpb:uuid:7267f5d5-954b-44b7-9f67-2eb808791355` // todo: add file support

// define 3 branches. that is all that is supported
// the term 'master' is used in the code because 'main' is a reserved word in golang already
// allow 'read only' and 'private' flags
// package names sometimes must be different than the binary name
// for example 'zookeeper' is packaged as 'zookeeper-go'
//      due to the prior apache foundation project. This happens and is ok!

message ForgeConfig {                                          // `autogenpb:nomutex`
        string                      namespace            = 1;  // `autogenpb:unique` `autogenpb:sort` // Examples: 'go.wit.com/apps/go-clone' or "~/mythings" or "/home/src/foo"

        bool                        writable             = 2;  // if you have write access to the repo
        bool                        readOnly             = 3;  // the opposite, but needed for now because I don't know what I'm doing
        bool                        private              = 4;  // if the repo can be published
        bool                        directory            = 5;  // everything in this directory should use these writable & private values
        bool                        favorite             = 6;  // you like this. always git clone/go clone this repo
        bool                        interesting          = 7;  // this is something interesting you found and want to remember it

        string                      masterBranchName     = 8;  // git 'main' or 'master' branch name
        string                      develBranchName      = 9;  // whatever the git 'devel' branch name is
        string                      userBranchName       = 10; // whatever your username branch is

        string                      debName              = 11; // the actual name used with 'apt install' (or distro apt equivalent.
                                                               // todo: appeal to everyone to alias 'apt' on fedora, gentoo, arch, etc to alias 'apt install'
                                                               // so we can make easier instructions for new linux users. KISS

        google.protobuf.Timestamp   verstamp             = 12; // the git commit timestamp of the version
        string                      goPath               = 13; // deprecate
}

enum ForgeMode {
        NEWUSER             = 0; //
        MASTER              = 1; // "release mode"
        DEVEL               = 2; // "patch mode"
        USER                = 3; // "work mode"
        NORMAL              = 4; // "normal mode" // use this when you are developing code
        CLEAN               = 5; // indicates "clean" was run
}

message ForgeConfigs {                                         // `autogenpb:marshal` `autogenpb:nomutex`
        string                      uuid                 = 1;  // `autogenpb:uuid:1941cd4f-1cfd-4bf6-aa75-c2c391907e81`
        string                      version              = 2;  // `autogenpb:version:v0.0.47`
        repeated ForgeConfig        ForgeConfigs         = 3;
        string                      username             = 4;  // what to use for the user branch (default ENV{USER})
        string                      xterm                = 5;  // what xterm the user wants as the default
        repeated string             xtermArgv            = 6;  // the argv line for xterm
        string                      defaultGui           = 7;  // default GUI plugin to use
        ForgeMode                   mode                 = 8;  // what "mode" forge is in
        bool                        goWork               = 9;  // true if there is a go.work file
        bool                        pathLock             = 10; // the path is locked
        string                      HomeDir              = 11; // the forge config dir home
        string                      ReposPB              = 12; // where the repos.pb is
        string                      ReposDir             = 13; // where your repos are (orginally set to the GO default ~/go/src)
        string                      PatchPB              = 14; // fullpath to patches file
        string                      ForgeURL             = 15; // forge URL
        string                      Filename             = 16; // `autogenpb:save` -- this enables autogenerated pb.Load() and pb.Save()
        int32                       rillX                = 17; // used by rill
        int32                       rillY                = 18; // used by rill
}

// this generic message is used by autogen to identify and
// then dump the uuid and version from any arbitrary .pb file
message Identify {                                             // `autogenpb:marshal`
        string                      uuid                 = 1;  //
        string                      version              = 2;  //
}