oficina / equipo Public

Clone
git clone https://amadan.net/oficina/equipo

Plain git — no account needed to clone.

Download

Download this file

1// Package kernel holds shared application values without owning storage.
2package kernel
3
4// Actor is supplied by the verified session, never by a submitted payload.
5type Actor struct{ Address string }
6
7type Mutation struct {
8 RequestID string
9 Revision int64
10}
11
12type ProjectKind string
13
14const (
15 ProjectApp ProjectKind = "app"
16 ProjectWebsite ProjectKind = "website"
17 ProjectRepository ProjectKind = "repository"
18)
19
20type Project struct {
21 GrantVersion int64 `gorm:"not null;default:1"`
22 ID int64
23 AccountID int64
24 Name string
25 Repository string `gorm:"not null;uniqueIndex:project_binding"`
26 AppName string `gorm:"not null;uniqueIndex:project_binding"`
27 DefaultBranch string
28 Kind ProjectKind
29 Revision int64
30}
31
32type Role string
33
34const (
35 RoleOwner Role = "owner"
36 RoleMember Role = "member"
37)
38
39type Member struct {
40 IdentityKey string `gorm:"not null;default:'';uniqueIndex:members_identity_key" json:"-"`
41 Address string `gorm:"primaryKey"`
42 Role Role
43 Revision int64
44 Active bool
45 // SessionEpoch is the earliest permitted session creation time in Unix seconds.
46 SessionEpoch int64
47}
48
49type Team struct {
50 ID string `gorm:"primaryKey"`
51 Name string
52 RosterEpoch int64
53}
54