summaryrefslogtreecommitdiff
path: root/forgeConfig.proto
blob: 7d6fa02e1f8c6bc84c15094df48bea3ab8476a54 (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
// 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                      goPath               = 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                      goSrc                = 13; // is ~/go/src unless a go.work file is found
        string                      namespace            = 14; // `autogenpb:unique` `autogenpb:sort`
}

enum ForgeMode {
        MASTER              = 0; // "release mode"
        DEVEL               = 1; // "patch mode"
        USER                = 2; // "work mode"
}

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
        string                      goSrc                = 9;  // is ~/go/src unless a go.work file is found
        bool                        pathLock             = 10; // the path is locked
}
// 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;  //
}