forked from tangled.org/core
this repo has no description

lexicon: introduce sh.tangled.git.refUpdate

Signed-off-by: oppiliappan <me@oppi.li>

oppi.li 87307098 2d4b2612

verified
Changed files
+90
api
tangled
cmd
lexicons
+33
api/tangled/gitrefUpdate.go
···
+
// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
+
+
package tangled
+
+
// schema: sh.tangled.git.refUpdate
+
+
//import (
+
// "github.com/bluesky-social/indigo/lex/util"
+
//)
+
+
const (
+
GitRefUpdateNSID = "sh.tangled.git.refUpdate"
+
)
+
+
//func init() {
+
// util.RegisterType("sh.tangled.git.refUpdate", &GitRefUpdate{})
+
//} //
+
// RECORDTYPE: GitRefUpdate
+
type GitRefUpdate struct {
+
LexiconTypeID string `json:"$type,const=sh.tangled.git.refUpdate" cborgen:"$type,const=sh.tangled.git.refUpdate"`
+
// committerDid: did of the user that pushed this ref
+
CommitterDid string `json:"committerDid" cborgen:"committerDid"`
+
// newSha: new SHA of this ref
+
NewSha string `json:"newSha" cborgen:"newSha"`
+
// oldSha: old SHA of this ref
+
OldSha string `json:"oldSha" cborgen:"oldSha"`
+
// ref: Ref being updated
+
Ref string `json:"ref" cborgen:"ref"`
+
// repoDid: did of the owner of the repo
+
RepoDid string `json:"repoDid" cborgen:"repoDid"`
+
// repoName: name of the repo
+
RepoName string `json:"repoName" cborgen:"repoName"`
+
}
+1
cmd/gen.go
···
"api/tangled/cbor_gen.go",
"tangled",
tangled.FeedStar{},
+
tangled.GitRefUpdate{},
tangled.GraphFollow{},
tangled.KnotMember{},
tangled.PublicKey{},
+56
lexicons/git/refUpdate.json
···
+
{
+
"lexicon": 1,
+
"id": "sh.tangled.git.refUpdate",
+
"defs": {
+
"main": {
+
"type": "record",
+
"description": "An update to a git repository, emitted by knots.",
+
"key": "tid",
+
"record": {
+
"type": "object",
+
"required": [
+
"ref",
+
"committerDid",
+
"repoDid",
+
"repoName",
+
"oldSha",
+
"newSha"
+
],
+
"properties": {
+
"ref": {
+
"type": "string",
+
"description": "Ref being updated",
+
"maxGraphemes": 256,
+
"maxLength": 2560
+
},
+
"committerDid": {
+
"type": "string",
+
"description": "did of the user that pushed this ref",
+
"format": "did"
+
},
+
"repoDid": {
+
"type": "string",
+
"description": "did of the owner of the repo",
+
"format": "did"
+
},
+
"repoName": {
+
"type": "string",
+
"description": "name of the repo"
+
},
+
"oldSha": {
+
"type": "string",
+
"description": "old SHA of this ref",
+
"minLength": 40,
+
"maxLength": 40
+
},
+
"newSha": {
+
"type": "string",
+
"description": "new SHA of this ref",
+
"minLength": 40,
+
"maxLength": 40
+
}
+
}
+
}
+
}
+
}
+
}