proto

package
v0.0.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 30, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NPMActions_name = map[int32]string{
		0: "INSTALL",
		1: "PUBLISH",
		2: "UN_PUBLISH",
	}
	NPMActions_value = map[string]int32{
		"INSTALL":    0,
		"PUBLISH":    1,
		"UN_PUBLISH": 2,
	}
)

Enum value maps for NPMActions.

View Source
var (
	ArtAction_name = map[int32]string{
		0: "PULL",
		1: "PUSH",
		2: "DELETE",
	}
	ArtAction_value = map[string]int32{
		"PULL":   0,
		"PUSH":   1,
		"DELETE": 2,
	}
)

Enum value maps for ArtAction.

Functions

func RegisterArtAuthServer

func RegisterArtAuthServer(s *grpc.Server, srv ArtAuthServer)

Types

type ArtAction

type ArtAction int32
const (
	ArtAction_PULL   ArtAction = 0
	ArtAction_PUSH   ArtAction = 1
	ArtAction_DELETE ArtAction = 2
)

func (ArtAction) Descriptor

func (ArtAction) Descriptor() protoreflect.EnumDescriptor

func (ArtAction) Enum

func (x ArtAction) Enum() *ArtAction

func (ArtAction) EnumDescriptor deprecated

func (ArtAction) EnumDescriptor() ([]byte, []int)

Deprecated: Use ArtAction.Descriptor instead.

func (ArtAction) Number

func (x ArtAction) Number() protoreflect.EnumNumber

func (ArtAction) String

func (x ArtAction) String() string

func (ArtAction) Type

type ArtAuthClient

type ArtAuthClient interface {
	DockerCreateJWT(ctx context.Context, in *DockerCreateJWTRequest, opts ...grpc.CallOption) (*DockerCreateJWTResponse, error)
	CheckAuth(ctx context.Context, in *CheckAuthRequest, opts ...grpc.CallOption) (*ArtAuthResponse, error)
	CreateJWT(ctx context.Context, in *CreateJWTRequest, opts ...grpc.CallOption) (*CreateJWTResponse, error)
	DockerCheckTag(ctx context.Context, in *DockerCheckTagRequest, opts ...grpc.CallOption) (*DockerCheckTagResponse, error)
	// 判断指定的 Docker 镜像版本是否已被禁止拉取
	IsDockerImageForbidden(ctx context.Context, in *IsDockerImageForbiddenRequest, opts ...grpc.CallOption) (*IsDockerImageForbiddenResponse, error)
}

ArtAuthClient is the client API for ArtAuth service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewArtAuthClient

func NewArtAuthClient(cc grpc.ClientConnInterface) ArtAuthClient

type ArtAuthResponse

type ArtAuthResponse struct {
	Result     bool   `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"`
	ResultCode int32  `protobuf:"varint,2,opt,name=result_code,json=resultCode,proto3" json:"result_code,omitempty"`
	ErrorMsg   string `protobuf:"bytes,3,opt,name=error_msg,json=errorMsg,proto3" json:"error_msg,omitempty"`
	UserId     uint32 `protobuf:"varint,4,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	UserName   string `protobuf:"bytes,5,opt,name=user_name,json=userName,proto3" json:"user_name,omitempty"`
	// contains filtered or unexported fields
}

func (*ArtAuthResponse) Descriptor deprecated

func (*ArtAuthResponse) Descriptor() ([]byte, []int)

Deprecated: Use ArtAuthResponse.ProtoReflect.Descriptor instead.

func (*ArtAuthResponse) GetErrorMsg

func (x *ArtAuthResponse) GetErrorMsg() string

func (*ArtAuthResponse) GetResult

func (x *ArtAuthResponse) GetResult() bool

func (*ArtAuthResponse) GetResultCode

func (x *ArtAuthResponse) GetResultCode() int32

func (*ArtAuthResponse) GetUserId

func (x *ArtAuthResponse) GetUserId() uint32

func (*ArtAuthResponse) GetUserName

func (x *ArtAuthResponse) GetUserName() string

func (*ArtAuthResponse) ProtoMessage

func (*ArtAuthResponse) ProtoMessage()

func (*ArtAuthResponse) ProtoReflect

func (x *ArtAuthResponse) ProtoReflect() protoreflect.Message

func (*ArtAuthResponse) Reset

func (x *ArtAuthResponse) Reset()

func (*ArtAuthResponse) String

func (x *ArtAuthResponse) String() string

type ArtAuthServer

type ArtAuthServer interface {
	DockerCreateJWT(context.Context, *DockerCreateJWTRequest) (*DockerCreateJWTResponse, error)
	CheckAuth(context.Context, *CheckAuthRequest) (*ArtAuthResponse, error)
	CreateJWT(context.Context, *CreateJWTRequest) (*CreateJWTResponse, error)
	DockerCheckTag(context.Context, *DockerCheckTagRequest) (*DockerCheckTagResponse, error)
	// 判断指定的 Docker 镜像版本是否已被禁止拉取
	IsDockerImageForbidden(context.Context, *IsDockerImageForbiddenRequest) (*IsDockerImageForbiddenResponse, error)
}

ArtAuthServer is the server API for ArtAuth service.

type CheckAuthRequest

type CheckAuthRequest struct {
	ArtifactType        int32     `protobuf:"varint,1,opt,name=artifact_type,json=artifactType,proto3" json:"artifact_type,omitempty"`
	Action              ArtAction `protobuf:"varint,2,opt,name=action,proto3,enum=proto.ArtAction" json:"action,omitempty"`
	AuthorizationHeader string    `protobuf:"bytes,3,opt,name=authorization_header,json=authorizationHeader,proto3" json:"authorization_header,omitempty"`
	Host                string    `protobuf:"bytes,4,opt,name=host,proto3" json:"host,omitempty"`
	Path                string    `protobuf:"bytes,5,opt,name=path,proto3" json:"path,omitempty"`
	Addr                string    `protobuf:"bytes,6,opt,name=addr,proto3" json:"addr,omitempty"`
	UserAgent           string    `protobuf:"bytes,7,opt,name=userAgent,proto3" json:"userAgent,omitempty"`
	Pkg                 string    `protobuf:"bytes,8,opt,name=pkg,proto3" json:"pkg,omitempty"`
	Version             string    `protobuf:"bytes,9,opt,name=version,proto3" json:"version,omitempty"`
	// contains filtered or unexported fields
}

func (*CheckAuthRequest) Descriptor deprecated

func (*CheckAuthRequest) Descriptor() ([]byte, []int)

Deprecated: Use CheckAuthRequest.ProtoReflect.Descriptor instead.

func (*CheckAuthRequest) GetAction

func (x *CheckAuthRequest) GetAction() ArtAction

func (*CheckAuthRequest) GetAddr

func (x *CheckAuthRequest) GetAddr() string

func (*CheckAuthRequest) GetArtifactType

func (x *CheckAuthRequest) GetArtifactType() int32

func (*CheckAuthRequest) GetAuthorizationHeader

func (x *CheckAuthRequest) GetAuthorizationHeader() string

func (*CheckAuthRequest) GetHost

func (x *CheckAuthRequest) GetHost() string

func (*CheckAuthRequest) GetPath

func (x *CheckAuthRequest) GetPath() string

func (*CheckAuthRequest) GetPkg

func (x *CheckAuthRequest) GetPkg() string

func (*CheckAuthRequest) GetUserAgent

func (x *CheckAuthRequest) GetUserAgent() string

func (*CheckAuthRequest) GetVersion

func (x *CheckAuthRequest) GetVersion() string

func (*CheckAuthRequest) ProtoMessage

func (*CheckAuthRequest) ProtoMessage()

func (*CheckAuthRequest) ProtoReflect

func (x *CheckAuthRequest) ProtoReflect() protoreflect.Message

func (*CheckAuthRequest) Reset

func (x *CheckAuthRequest) Reset()

func (*CheckAuthRequest) String

func (x *CheckAuthRequest) String() string

type CreateJWTRequest

type CreateJWTRequest struct {
	ArtifactType  int32  `protobuf:"varint,1,opt,name=artifact_type,json=artifactType,proto3" json:"artifact_type,omitempty"`
	UserId        uint32 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	PkgPath       string `protobuf:"bytes,3,opt,name=pkg_path,json=pkgPath,proto3" json:"pkg_path,omitempty"`
	Authorization string `protobuf:"bytes,4,opt,name=authorization,proto3" json:"authorization,omitempty"`
	Host          string `protobuf:"bytes,5,opt,name=host,proto3" json:"host,omitempty"`
	// 有效期 单位:秒 大于 0 有效
	Expiration int64 `protobuf:"varint,6,opt,name=expiration,proto3" json:"expiration,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateJWTRequest) Descriptor deprecated

func (*CreateJWTRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreateJWTRequest.ProtoReflect.Descriptor instead.

func (*CreateJWTRequest) GetArtifactType

func (x *CreateJWTRequest) GetArtifactType() int32

func (*CreateJWTRequest) GetAuthorization

func (x *CreateJWTRequest) GetAuthorization() string

func (*CreateJWTRequest) GetExpiration

func (x *CreateJWTRequest) GetExpiration() int64

func (*CreateJWTRequest) GetHost

func (x *CreateJWTRequest) GetHost() string

func (*CreateJWTRequest) GetPkgPath

func (x *CreateJWTRequest) GetPkgPath() string

func (*CreateJWTRequest) GetUserId

func (x *CreateJWTRequest) GetUserId() uint32

func (*CreateJWTRequest) ProtoMessage

func (*CreateJWTRequest) ProtoMessage()

func (*CreateJWTRequest) ProtoReflect

func (x *CreateJWTRequest) ProtoReflect() protoreflect.Message

func (*CreateJWTRequest) Reset

func (x *CreateJWTRequest) Reset()

func (*CreateJWTRequest) String

func (x *CreateJWTRequest) String() string

type CreateJWTResponse

type CreateJWTResponse struct {
	Result     bool   `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"`
	ResultCode int32  `protobuf:"varint,2,opt,name=result_code,json=resultCode,proto3" json:"result_code,omitempty"`
	Token      string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"`
	Message    string `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateJWTResponse) Descriptor deprecated

func (*CreateJWTResponse) Descriptor() ([]byte, []int)

Deprecated: Use CreateJWTResponse.ProtoReflect.Descriptor instead.

func (*CreateJWTResponse) GetMessage

func (x *CreateJWTResponse) GetMessage() string

func (*CreateJWTResponse) GetResult

func (x *CreateJWTResponse) GetResult() bool

func (*CreateJWTResponse) GetResultCode

func (x *CreateJWTResponse) GetResultCode() int32

func (*CreateJWTResponse) GetToken

func (x *CreateJWTResponse) GetToken() string

func (*CreateJWTResponse) ProtoMessage

func (*CreateJWTResponse) ProtoMessage()

func (*CreateJWTResponse) ProtoReflect

func (x *CreateJWTResponse) ProtoReflect() protoreflect.Message

func (*CreateJWTResponse) Reset

func (x *CreateJWTResponse) Reset()

func (*CreateJWTResponse) String

func (x *CreateJWTResponse) String() string

type DockerCheckTagRequest

type DockerCheckTagRequest struct {
	Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`
	Repo string `protobuf:"bytes,2,opt,name=repo,proto3" json:"repo,omitempty"`
	Tag  string `protobuf:"bytes,3,opt,name=tag,proto3" json:"tag,omitempty"`
	// contains filtered or unexported fields
}

func (*DockerCheckTagRequest) Descriptor deprecated

func (*DockerCheckTagRequest) Descriptor() ([]byte, []int)

Deprecated: Use DockerCheckTagRequest.ProtoReflect.Descriptor instead.

func (*DockerCheckTagRequest) GetHost

func (x *DockerCheckTagRequest) GetHost() string

func (*DockerCheckTagRequest) GetRepo

func (x *DockerCheckTagRequest) GetRepo() string

func (*DockerCheckTagRequest) GetTag

func (x *DockerCheckTagRequest) GetTag() string

func (*DockerCheckTagRequest) ProtoMessage

func (*DockerCheckTagRequest) ProtoMessage()

func (*DockerCheckTagRequest) ProtoReflect

func (x *DockerCheckTagRequest) ProtoReflect() protoreflect.Message

func (*DockerCheckTagRequest) Reset

func (x *DockerCheckTagRequest) Reset()

func (*DockerCheckTagRequest) String

func (x *DockerCheckTagRequest) String() string

type DockerCheckTagResponse

type DockerCheckTagResponse struct {
	Ok       bool   `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
	ErrorMsg string `protobuf:"bytes,2,opt,name=error_msg,json=errorMsg,proto3" json:"error_msg,omitempty"`
	// contains filtered or unexported fields
}

func (*DockerCheckTagResponse) Descriptor deprecated

func (*DockerCheckTagResponse) Descriptor() ([]byte, []int)

Deprecated: Use DockerCheckTagResponse.ProtoReflect.Descriptor instead.

func (*DockerCheckTagResponse) GetErrorMsg

func (x *DockerCheckTagResponse) GetErrorMsg() string

func (*DockerCheckTagResponse) GetOk

func (x *DockerCheckTagResponse) GetOk() bool

func (*DockerCheckTagResponse) ProtoMessage

func (*DockerCheckTagResponse) ProtoMessage()

func (*DockerCheckTagResponse) ProtoReflect

func (x *DockerCheckTagResponse) ProtoReflect() protoreflect.Message

func (*DockerCheckTagResponse) Reset

func (x *DockerCheckTagResponse) Reset()

func (*DockerCheckTagResponse) String

func (x *DockerCheckTagResponse) String() string

type DockerCreateJWTRequest

type DockerCreateJWTRequest struct {
	UserId      uint32 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	PackagePath string `protobuf:"bytes,2,opt,name=package_path,json=packagePath,proto3" json:"package_path,omitempty"`
	Actions     string `protobuf:"bytes,3,opt,name=actions,proto3" json:"actions,omitempty"`
	// contains filtered or unexported fields
}

func (*DockerCreateJWTRequest) Descriptor deprecated

func (*DockerCreateJWTRequest) Descriptor() ([]byte, []int)

Deprecated: Use DockerCreateJWTRequest.ProtoReflect.Descriptor instead.

func (*DockerCreateJWTRequest) GetActions

func (x *DockerCreateJWTRequest) GetActions() string

func (*DockerCreateJWTRequest) GetPackagePath

func (x *DockerCreateJWTRequest) GetPackagePath() string

func (*DockerCreateJWTRequest) GetUserId

func (x *DockerCreateJWTRequest) GetUserId() uint32

func (*DockerCreateJWTRequest) ProtoMessage

func (*DockerCreateJWTRequest) ProtoMessage()

func (*DockerCreateJWTRequest) ProtoReflect

func (x *DockerCreateJWTRequest) ProtoReflect() protoreflect.Message

func (*DockerCreateJWTRequest) Reset

func (x *DockerCreateJWTRequest) Reset()

func (*DockerCreateJWTRequest) String

func (x *DockerCreateJWTRequest) String() string

type DockerCreateJWTResponse

type DockerCreateJWTResponse struct {
	Result  bool   `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"`
	Token   string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
	Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*DockerCreateJWTResponse) Descriptor deprecated

func (*DockerCreateJWTResponse) Descriptor() ([]byte, []int)

Deprecated: Use DockerCreateJWTResponse.ProtoReflect.Descriptor instead.

func (*DockerCreateJWTResponse) GetMessage

func (x *DockerCreateJWTResponse) GetMessage() string

func (*DockerCreateJWTResponse) GetResult

func (x *DockerCreateJWTResponse) GetResult() bool

func (*DockerCreateJWTResponse) GetToken

func (x *DockerCreateJWTResponse) GetToken() string

func (*DockerCreateJWTResponse) ProtoMessage

func (*DockerCreateJWTResponse) ProtoMessage()

func (*DockerCreateJWTResponse) ProtoReflect

func (x *DockerCreateJWTResponse) ProtoReflect() protoreflect.Message

func (*DockerCreateJWTResponse) Reset

func (x *DockerCreateJWTResponse) Reset()

func (*DockerCreateJWTResponse) String

func (x *DockerCreateJWTResponse) String() string

type IsDockerImageForbiddenRequest

type IsDockerImageForbiddenRequest struct {

	// docker registry host
	Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`
	// docker repository name. e.g., project/repo/hello-world
	Repo string `protobuf:"bytes,2,opt,name=repo,proto3" json:"repo,omitempty"`
	// docker image tag
	Tag string `protobuf:"bytes,3,opt,name=tag,proto3" json:"tag,omitempty"`
	// contains filtered or unexported fields
}

func (*IsDockerImageForbiddenRequest) Descriptor deprecated

func (*IsDockerImageForbiddenRequest) Descriptor() ([]byte, []int)

Deprecated: Use IsDockerImageForbiddenRequest.ProtoReflect.Descriptor instead.

func (*IsDockerImageForbiddenRequest) GetHost

func (*IsDockerImageForbiddenRequest) GetRepo

func (*IsDockerImageForbiddenRequest) GetTag

func (*IsDockerImageForbiddenRequest) ProtoMessage

func (*IsDockerImageForbiddenRequest) ProtoMessage()

func (*IsDockerImageForbiddenRequest) ProtoReflect

func (*IsDockerImageForbiddenRequest) Reset

func (x *IsDockerImageForbiddenRequest) Reset()

func (*IsDockerImageForbiddenRequest) String

type IsDockerImageForbiddenResponse

type IsDockerImageForbiddenResponse struct {

	// 接口调用是否成功,是则返回 true,否则返回 false
	Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
	// ok 为 false 时带上的异常信息
	Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	// ok 为成功时有意义,表明当前 TAG 的 Docker 镜像是否已被禁止下载
	Forbidden bool `protobuf:"varint,3,opt,name=forbidden,proto3" json:"forbidden,omitempty"`
	// 禁止下载的备注信息
	ForbiddenNote string `protobuf:"bytes,4,opt,name=forbidden_note,json=forbiddenNote,proto3" json:"forbidden_note,omitempty"`
	// contains filtered or unexported fields
}

func (*IsDockerImageForbiddenResponse) Descriptor deprecated

func (*IsDockerImageForbiddenResponse) Descriptor() ([]byte, []int)

Deprecated: Use IsDockerImageForbiddenResponse.ProtoReflect.Descriptor instead.

func (*IsDockerImageForbiddenResponse) GetForbidden

func (x *IsDockerImageForbiddenResponse) GetForbidden() bool

func (*IsDockerImageForbiddenResponse) GetForbiddenNote

func (x *IsDockerImageForbiddenResponse) GetForbiddenNote() string

func (*IsDockerImageForbiddenResponse) GetMsg

func (*IsDockerImageForbiddenResponse) GetOk

func (*IsDockerImageForbiddenResponse) ProtoMessage

func (*IsDockerImageForbiddenResponse) ProtoMessage()

func (*IsDockerImageForbiddenResponse) ProtoReflect

func (*IsDockerImageForbiddenResponse) Reset

func (x *IsDockerImageForbiddenResponse) Reset()

func (*IsDockerImageForbiddenResponse) String

type NPMActions

type NPMActions int32
const (
	NPMActions_INSTALL    NPMActions = 0
	NPMActions_PUBLISH    NPMActions = 1
	NPMActions_UN_PUBLISH NPMActions = 2
)

func (NPMActions) Descriptor

func (NPMActions) Descriptor() protoreflect.EnumDescriptor

func (NPMActions) Enum

func (x NPMActions) Enum() *NPMActions

func (NPMActions) EnumDescriptor deprecated

func (NPMActions) EnumDescriptor() ([]byte, []int)

Deprecated: Use NPMActions.Descriptor instead.

func (NPMActions) Number

func (x NPMActions) Number() protoreflect.EnumNumber

func (NPMActions) String

func (x NPMActions) String() string

func (NPMActions) Type

type UnimplementedArtAuthServer

type UnimplementedArtAuthServer struct {
}

UnimplementedArtAuthServer can be embedded to have forward compatible implementations.

func (*UnimplementedArtAuthServer) CheckAuth

func (*UnimplementedArtAuthServer) CreateJWT

func (*UnimplementedArtAuthServer) DockerCheckTag

func (*UnimplementedArtAuthServer) DockerCreateJWT

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL