Documentation ¶
Overview ¶
Package repo is a generated twirp stub package. This code was generated with github.com/twitchtv/twirp/protoc-gen-twirp v7.1.0.
It is generated from these files:
repo.proto
Index ¶
- Constants
- Variables
- func WriteError(resp http.ResponseWriter, err error)
- type CreateRepo
- func (*CreateRepo) Descriptor() ([]byte, []int)deprecated
- func (x *CreateRepo) GetEndpoint() string
- func (x *CreateRepo) GetName() string
- func (x *CreateRepo) GetToken() string
- func (x *CreateRepo) GetType() RepoType
- func (*CreateRepo) ProtoMessage()
- func (x *CreateRepo) ProtoReflect() protoreflect.Message
- func (x *CreateRepo) Reset()
- func (x *CreateRepo) String() string
- type DestroyRepo
- type FileRead
- type FindRepo
- type HTTPClient
- type ReadFile
- func (*ReadFile) Descriptor() ([]byte, []int)deprecated
- func (x *ReadFile) GetBranch() string
- func (x *ReadFile) GetFilePath() string
- func (x *ReadFile) GetRepoId() string
- func (*ReadFile) ProtoMessage()
- func (x *ReadFile) ProtoReflect() protoreflect.Message
- func (x *ReadFile) Reset()
- func (x *ReadFile) String() string
- type ReadRepo
- type ReadRepos
- type Repo
- type RepoCreated
- type RepoDestroyed
- type RepoFound
- type RepoRead
- func (*RepoRead) Descriptor() ([]byte, []int)deprecated
- func (x *RepoRead) GetEndpoint() string
- func (x *RepoRead) GetName() string
- func (x *RepoRead) GetReady() bool
- func (x *RepoRead) GetToken() string
- func (x *RepoRead) GetType() RepoType
- func (x *RepoRead) GetUuid() string
- func (*RepoRead) ProtoMessage()
- func (x *RepoRead) ProtoReflect() protoreflect.Message
- func (x *RepoRead) Reset()
- func (x *RepoRead) String() string
- type RepoType
- type RepoUpdated
- type ReposRead
- type TwirpServer
- type UpdateRepo
- func (*UpdateRepo) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateRepo) GetEndpoint() string
- func (x *UpdateRepo) GetName() string
- func (x *UpdateRepo) GetToken() string
- func (x *UpdateRepo) GetType() RepoType
- func (x *UpdateRepo) GetUuid() string
- func (*UpdateRepo) ProtoMessage()
- func (x *UpdateRepo) ProtoReflect() protoreflect.Message
- func (x *UpdateRepo) Reset()
- func (x *UpdateRepo) String() string
Constants ¶
const RepoPathPrefix = "/twirp/redsail.bosn.Repo/"
RepoPathPrefix is a convenience constant that could used to identify URL paths. Should be used with caution, it only matches routes generated by Twirp Go clients, that add a "/twirp" prefix by default, and use CamelCase service and method names. More info: https://twitchtv.github.io/twirp/docs/routing.html
Variables ¶
var ( RepoType_name = map[int32]string{ 0: "HELM_REPO", 1: "GIT_REPO", } RepoType_value = map[string]int32{ "HELM_REPO": 0, "GIT_REPO": 1, } )
Enum value maps for RepoType.
var File_repo_proto protoreflect.FileDescriptor
Functions ¶
func WriteError ¶
func WriteError(resp http.ResponseWriter, err error)
WriteError writes an HTTP response with a valid Twirp error format (code, msg, meta). Useful outside of the Twirp server (e.g. http middleware), but does not trigger hooks. If err is not a twirp.Error, it will get wrapped with twirp.InternalErrorWith(err)
Types ¶
type CreateRepo ¶
type CreateRepo struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // name of the repo Endpoint string `protobuf:"bytes,2,opt,name=endpoint,proto3" json:"endpoint,omitempty"` // repo endpoint Type RepoType `protobuf:"varint,3,opt,name=type,proto3,enum=redsail.bosn.RepoType" json:"type,omitempty"` // type of repo Token string `protobuf:"bytes,4,opt,name=token,proto3" json:"token,omitempty"` // an auth token (if required for this repo) // contains filtered or unexported fields }
func (*CreateRepo) Descriptor
deprecated
func (*CreateRepo) Descriptor() ([]byte, []int)
Deprecated: Use CreateRepo.ProtoReflect.Descriptor instead.
func (*CreateRepo) GetEndpoint ¶
func (x *CreateRepo) GetEndpoint() string
func (*CreateRepo) GetName ¶
func (x *CreateRepo) GetName() string
func (*CreateRepo) GetToken ¶ added in v0.5.0
func (x *CreateRepo) GetToken() string
func (*CreateRepo) GetType ¶ added in v0.4.0
func (x *CreateRepo) GetType() RepoType
func (*CreateRepo) ProtoMessage ¶
func (*CreateRepo) ProtoMessage()
func (*CreateRepo) ProtoReflect ¶
func (x *CreateRepo) ProtoReflect() protoreflect.Message
func (*CreateRepo) Reset ¶
func (x *CreateRepo) Reset()
func (*CreateRepo) String ¶
func (x *CreateRepo) String() string
type DestroyRepo ¶
type DestroyRepo struct { Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` // unique id of the repo // contains filtered or unexported fields }
func (*DestroyRepo) Descriptor
deprecated
func (*DestroyRepo) Descriptor() ([]byte, []int)
Deprecated: Use DestroyRepo.ProtoReflect.Descriptor instead.
func (*DestroyRepo) GetUuid ¶
func (x *DestroyRepo) GetUuid() string
func (*DestroyRepo) ProtoMessage ¶
func (*DestroyRepo) ProtoMessage()
func (*DestroyRepo) ProtoReflect ¶
func (x *DestroyRepo) ProtoReflect() protoreflect.Message
func (*DestroyRepo) Reset ¶
func (x *DestroyRepo) Reset()
func (*DestroyRepo) String ¶
func (x *DestroyRepo) String() string
type FileRead ¶ added in v0.4.0
type FileRead struct { File []byte `protobuf:"bytes,1,opt,name=file,proto3" json:"file,omitempty"` // the contents of the file read // contains filtered or unexported fields }
func (*FileRead) Descriptor
deprecated
added in
v0.4.0
func (*FileRead) ProtoMessage ¶ added in v0.4.0
func (*FileRead) ProtoMessage()
func (*FileRead) ProtoReflect ¶ added in v0.4.0
func (x *FileRead) ProtoReflect() protoreflect.Message
type FindRepo ¶ added in v0.4.0
type FindRepo struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // the name of the repo to search for // contains filtered or unexported fields }
func (*FindRepo) Descriptor
deprecated
added in
v0.4.0
func (*FindRepo) ProtoMessage ¶ added in v0.4.0
func (*FindRepo) ProtoMessage()
func (*FindRepo) ProtoReflect ¶ added in v0.4.0
func (x *FindRepo) ProtoReflect() protoreflect.Message
type HTTPClient ¶
HTTPClient is the interface used by generated clients to send HTTP requests. It is fulfilled by *(net/http).Client, which is sufficient for most users. Users can provide their own implementation for special retry policies.
HTTPClient implementations should not follow redirects. Redirects are automatically disabled if *(net/http).Client is passed to client constructors. See the withoutRedirects function in this file for more details.
type ReadFile ¶ added in v0.4.0
type ReadFile struct { RepoId string `protobuf:"bytes,1,opt,name=repo_id,json=repoId,proto3" json:"repo_id,omitempty"` // unique id of the repo Branch string `protobuf:"bytes,2,opt,name=branch,proto3" json:"branch,omitempty"` // the branch to read the file from FilePath string `protobuf:"bytes,3,opt,name=file_path,json=filePath,proto3" json:"file_path,omitempty"` // relative path to the file // contains filtered or unexported fields }
func (*ReadFile) Descriptor
deprecated
added in
v0.4.0
func (*ReadFile) GetFilePath ¶ added in v0.4.0
func (*ReadFile) ProtoMessage ¶ added in v0.4.0
func (*ReadFile) ProtoMessage()
func (*ReadFile) ProtoReflect ¶ added in v0.4.0
func (x *ReadFile) ProtoReflect() protoreflect.Message
type ReadRepo ¶
type ReadRepo struct { Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` // unique id of the repo // contains filtered or unexported fields }
func (*ReadRepo) Descriptor
deprecated
func (*ReadRepo) ProtoMessage ¶
func (*ReadRepo) ProtoMessage()
func (*ReadRepo) ProtoReflect ¶
func (x *ReadRepo) ProtoReflect() protoreflect.Message
type ReadRepos ¶
type ReadRepos struct {
// contains filtered or unexported fields
}
func (*ReadRepos) Descriptor
deprecated
func (*ReadRepos) ProtoMessage ¶
func (*ReadRepos) ProtoMessage()
func (*ReadRepos) ProtoReflect ¶
func (x *ReadRepos) ProtoReflect() protoreflect.Message
type Repo ¶
type Repo interface { // adds a repo to the list of configurations Create(context.Context, *CreateRepo) (*RepoCreated, error) // edits an already existing repo Update(context.Context, *UpdateRepo) (*RepoUpdated, error) // removes a repo from the list of configurations Destroy(context.Context, *DestroyRepo) (*RepoDestroyed, error) // reads out a repo Read(context.Context, *ReadRepo) (*RepoRead, error) // finds the repo uuid by name Find(context.Context, *FindRepo) (*RepoFound, error) // gets all repos currently configured and their status All(context.Context, *ReadRepos) (*ReposRead, error) // gets the contents of a file from this git repository File(context.Context, *ReadFile) (*FileRead, error) }
func NewRepoJSONClient ¶
func NewRepoJSONClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) Repo
NewRepoJSONClient creates a JSON client that implements the Repo interface. It communicates using JSON and can be configured with a custom HTTPClient.
func NewRepoProtobufClient ¶
func NewRepoProtobufClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) Repo
NewRepoProtobufClient creates a Protobuf client that implements the Repo interface. It communicates using Protobuf and can be configured with a custom HTTPClient.
type RepoCreated ¶
type RepoCreated struct {
// contains filtered or unexported fields
}
func (*RepoCreated) Descriptor
deprecated
func (*RepoCreated) Descriptor() ([]byte, []int)
Deprecated: Use RepoCreated.ProtoReflect.Descriptor instead.
func (*RepoCreated) ProtoMessage ¶
func (*RepoCreated) ProtoMessage()
func (*RepoCreated) ProtoReflect ¶
func (x *RepoCreated) ProtoReflect() protoreflect.Message
func (*RepoCreated) Reset ¶
func (x *RepoCreated) Reset()
func (*RepoCreated) String ¶
func (x *RepoCreated) String() string
type RepoDestroyed ¶
type RepoDestroyed struct {
// contains filtered or unexported fields
}
func (*RepoDestroyed) Descriptor
deprecated
func (*RepoDestroyed) Descriptor() ([]byte, []int)
Deprecated: Use RepoDestroyed.ProtoReflect.Descriptor instead.
func (*RepoDestroyed) ProtoMessage ¶
func (*RepoDestroyed) ProtoMessage()
func (*RepoDestroyed) ProtoReflect ¶
func (x *RepoDestroyed) ProtoReflect() protoreflect.Message
func (*RepoDestroyed) Reset ¶
func (x *RepoDestroyed) Reset()
func (*RepoDestroyed) String ¶
func (x *RepoDestroyed) String() string
type RepoFound ¶ added in v0.4.0
type RepoFound struct { Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` //unique id of the repo found // contains filtered or unexported fields }
func (*RepoFound) Descriptor
deprecated
added in
v0.4.0
func (*RepoFound) ProtoMessage ¶ added in v0.4.0
func (*RepoFound) ProtoMessage()
func (*RepoFound) ProtoReflect ¶ added in v0.4.0
func (x *RepoFound) ProtoReflect() protoreflect.Message
type RepoRead ¶
type RepoRead struct { Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` // unique id of the repo Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // name of the repo Endpoint string `protobuf:"bytes,3,opt,name=endpoint,proto3" json:"endpoint,omitempty"` // repo endpoint Type RepoType `protobuf:"varint,4,opt,name=type,proto3,enum=redsail.bosn.RepoType" json:"type,omitempty"` // type of repo Token string `protobuf:"bytes,5,opt,name=token,proto3" json:"token,omitempty"` // an auth token (if required for this repo) Ready bool `protobuf:"varint,6,opt,name=ready,proto3" json:"ready,omitempty"` // repo ready status, based on whether index.yaml can be fetched // contains filtered or unexported fields }
func (*RepoRead) Descriptor
deprecated
func (*RepoRead) GetEndpoint ¶
func (*RepoRead) ProtoMessage ¶
func (*RepoRead) ProtoMessage()
func (*RepoRead) ProtoReflect ¶
func (x *RepoRead) ProtoReflect() protoreflect.Message
type RepoType ¶ added in v0.4.0
type RepoType int32
func (RepoType) Descriptor ¶ added in v0.4.0
func (RepoType) Descriptor() protoreflect.EnumDescriptor
func (RepoType) EnumDescriptor
deprecated
added in
v0.4.0
func (RepoType) Number ¶ added in v0.4.0
func (x RepoType) Number() protoreflect.EnumNumber
func (RepoType) Type ¶ added in v0.4.0
func (RepoType) Type() protoreflect.EnumType
type RepoUpdated ¶
type RepoUpdated struct {
// contains filtered or unexported fields
}
func (*RepoUpdated) Descriptor
deprecated
func (*RepoUpdated) Descriptor() ([]byte, []int)
Deprecated: Use RepoUpdated.ProtoReflect.Descriptor instead.
func (*RepoUpdated) ProtoMessage ¶
func (*RepoUpdated) ProtoMessage()
func (*RepoUpdated) ProtoReflect ¶
func (x *RepoUpdated) ProtoReflect() protoreflect.Message
func (*RepoUpdated) Reset ¶
func (x *RepoUpdated) Reset()
func (*RepoUpdated) String ¶
func (x *RepoUpdated) String() string
type ReposRead ¶
type ReposRead struct { Repos []*RepoRead `protobuf:"bytes,1,rep,name=repos,proto3" json:"repos,omitempty"` // repos read // contains filtered or unexported fields }
func (*ReposRead) Descriptor
deprecated
func (*ReposRead) ProtoMessage ¶
func (*ReposRead) ProtoMessage()
func (*ReposRead) ProtoReflect ¶
func (x *ReposRead) ProtoReflect() protoreflect.Message
type TwirpServer ¶
type TwirpServer interface { http.Handler // ServiceDescriptor returns gzipped bytes describing the .proto file that // this service was generated from. Once unzipped, the bytes can be // unmarshalled as a // github.com/golang/protobuf/protoc-gen-go/descriptor.FileDescriptorProto. // // The returned integer is the index of this particular service within that // FileDescriptorProto's 'Service' slice of ServiceDescriptorProtos. This is a // low-level field, expected to be used for reflection. ServiceDescriptor() ([]byte, int) // ProtocGenTwirpVersion is the semantic version string of the version of // twirp used to generate this file. ProtocGenTwirpVersion() string // PathPrefix returns the HTTP URL path prefix for all methods handled by this // service. This can be used with an HTTP mux to route Twirp requests. // The path prefix is in the form: "/<prefix>/<package>.<Service>/" // that is, everything in a Twirp route except for the <Method> at the end. PathPrefix() string }
TwirpServer is the interface generated server structs will support: they're HTTP handlers with additional methods for accessing metadata about the service. Those accessors are a low-level API for building reflection tools. Most people can think of TwirpServers as just http.Handlers.
func NewRepoServer ¶
func NewRepoServer(svc Repo, opts ...interface{}) TwirpServer
NewRepoServer builds a TwirpServer that can be used as an http.Handler to handle HTTP requests that are routed to the right method in the provided svc implementation. The opts are twirp.ServerOption modifiers, for example twirp.WithServerHooks(hooks).
type UpdateRepo ¶
type UpdateRepo struct { Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` // unique id of the repo Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // name of the repo Endpoint string `protobuf:"bytes,3,opt,name=endpoint,proto3" json:"endpoint,omitempty"` // repo endpoint Type RepoType `protobuf:"varint,4,opt,name=type,proto3,enum=redsail.bosn.RepoType" json:"type,omitempty"` // type of repo Token string `protobuf:"bytes,5,opt,name=token,proto3" json:"token,omitempty"` // an auth token (if required for this repo) // contains filtered or unexported fields }
func (*UpdateRepo) Descriptor
deprecated
func (*UpdateRepo) Descriptor() ([]byte, []int)
Deprecated: Use UpdateRepo.ProtoReflect.Descriptor instead.
func (*UpdateRepo) GetEndpoint ¶
func (x *UpdateRepo) GetEndpoint() string
func (*UpdateRepo) GetName ¶
func (x *UpdateRepo) GetName() string
func (*UpdateRepo) GetToken ¶ added in v0.5.0
func (x *UpdateRepo) GetToken() string
func (*UpdateRepo) GetType ¶ added in v0.4.0
func (x *UpdateRepo) GetType() RepoType
func (*UpdateRepo) GetUuid ¶
func (x *UpdateRepo) GetUuid() string
func (*UpdateRepo) ProtoMessage ¶
func (*UpdateRepo) ProtoMessage()
func (*UpdateRepo) ProtoReflect ¶
func (x *UpdateRepo) ProtoReflect() protoreflect.Message
func (*UpdateRepo) Reset ¶
func (x *UpdateRepo) Reset()
func (*UpdateRepo) String ¶
func (x *UpdateRepo) String() string