summaryrefslogtreecommitdiff
path: root/forgeConfig.proto
blob: f533cc26809e3a9c1a06196abb2c8bf9b3c8e129 (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
// 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 Cache {                                                // `autogenpb:marshal`
        string                      uuid                 = 1;  // `autogenpb:uuid:21ef38cd-7564-49e4-99df-7e7e4c957e32`
        string                      version              = 2;  // `autogenpb:version:v0.0.1`
        string                      name                 = 3;  // will use ~/.cache/forge/name.pb & ~/.config/forge/name.text
        repeated string             dirs                 = 4;  // what dirs are to be scanned in for this cache.pb file
        string                      Filename             = 5;  // what to use for the user branch (default ENV{USER})
}

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 {
        UNKNOWN             = 0; //
        NEWUSER             = 1; //
        MASTER              = 2; // "release mode"
        DEVEL               = 3; // "patch mode"
        USER                = 4; // "work mode"
        NORMAL              = 5; // "normal mode" // use this when you are developing code
        CLEAN               = 6; // indicates "clean" was run
        CUSTOM              = 7; // reads config settings from a user defined directory
        GOLANG              = 8; // restricts repos to ~/go/src or a go.work directory
}

message ForgeConfigs {                                         // `autogenpb:marshal` `autogenpb:nomutex` `autogenpb:gui`
        string                      uuid                 = 1;  // `autogenpb:uuid:1941cd4f-1cfd-4bf6-aa75-c2c391907e81`
        string                      version              = 2;  // `autogenpb:version:v0.0.48`
        repeated ForgeConfig        ForgeConfigs         = 3;
        string                      Filename             = 4;  // what to use for the user branch (default ENV{USER})
        repeated Cache              caches               = 5;  // cache config files
}