当前位置: 首页>>代码示例>>Golang>>正文


Golang proto.RegisterType函数代码示例

本文整理汇总了Golang中github.com/gogo/protobuf/proto.RegisterType函数的典型用法代码示例。如果您正苦于以下问题:Golang RegisterType函数的具体用法?Golang RegisterType怎么用?Golang RegisterType使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了RegisterType函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。

示例1: init

func init() {
	proto.RegisterType((*Job)(nil), "k8s.io.kubernetes.pkg.apis.batch.v1.Job")
	proto.RegisterType((*JobCondition)(nil), "k8s.io.kubernetes.pkg.apis.batch.v1.JobCondition")
	proto.RegisterType((*JobList)(nil), "k8s.io.kubernetes.pkg.apis.batch.v1.JobList")
	proto.RegisterType((*JobSpec)(nil), "k8s.io.kubernetes.pkg.apis.batch.v1.JobSpec")
	proto.RegisterType((*JobStatus)(nil), "k8s.io.kubernetes.pkg.apis.batch.v1.JobStatus")
}
开发者ID:kubernetes,项目名称:kubernetes,代码行数:7,代码来源:generated.pb.go

示例2: init

func init() {
	proto.RegisterType((*CertificateSigningRequest)(nil), "k8s.io.kubernetes.pkg.apis.certificates.v1alpha1.CertificateSigningRequest")
	proto.RegisterType((*CertificateSigningRequestCondition)(nil), "k8s.io.kubernetes.pkg.apis.certificates.v1alpha1.CertificateSigningRequestCondition")
	proto.RegisterType((*CertificateSigningRequestList)(nil), "k8s.io.kubernetes.pkg.apis.certificates.v1alpha1.CertificateSigningRequestList")
	proto.RegisterType((*CertificateSigningRequestSpec)(nil), "k8s.io.kubernetes.pkg.apis.certificates.v1alpha1.CertificateSigningRequestSpec")
	proto.RegisterType((*CertificateSigningRequestStatus)(nil), "k8s.io.kubernetes.pkg.apis.certificates.v1alpha1.CertificateSigningRequestStatus")
}
开发者ID:RyanBinfeng,项目名称:kubernetes,代码行数:7,代码来源:generated.pb.go

示例3: init

func init() {
	proto.RegisterType((*ProviderGetRequest)(nil), "otsimo.ProviderGetRequest")
	proto.RegisterType((*ProviderItem)(nil), "otsimo.ProviderItem")
	proto.RegisterType((*ProviderItems)(nil), "otsimo.ProviderItems")
	proto.RegisterType((*ProviderInfoRequest)(nil), "otsimo.ProviderInfoRequest")
	proto.RegisterType((*ProviderInfo)(nil), "otsimo.ProviderInfo")
}
开发者ID:otsimo,项目名称:catalog,代码行数:7,代码来源:dashprovider.pb.go

示例4: init

func init() {
	proto.RegisterType((*RaftCommand)(nil), "cockroach.roachpb.RaftCommand")
	proto.RegisterType((*RaftTruncatedState)(nil), "cockroach.roachpb.RaftTruncatedState")
	proto.RegisterType((*RaftTombstone)(nil), "cockroach.roachpb.RaftTombstone")
	proto.RegisterType((*RaftSnapshotData)(nil), "cockroach.roachpb.RaftSnapshotData")
	proto.RegisterType((*RaftSnapshotData_KeyValue)(nil), "cockroach.roachpb.RaftSnapshotData.KeyValue")
}
开发者ID:cuongdo,项目名称:cockroach,代码行数:7,代码来源:internal_raft.pb.go

示例5: init

func init() {
	proto.RegisterType((*Country)(nil), "pb.geo.Country")
	proto.RegisterType((*LatLng)(nil), "pb.geo.LatLng")
	proto.RegisterType((*PostalAddress)(nil), "pb.geo.PostalAddress")
	proto.RegisterType((*SimplePostalAddress)(nil), "pb.geo.SimplePostalAddress")
	proto.RegisterEnum("pb.geo.StreetDirection", StreetDirection_name, StreetDirection_value)
}
开发者ID:peter-edge,项目名称:pb,代码行数:7,代码来源:geo.pb.go

示例6: init

func init() {
	proto.RegisterType((*BootstrapInfo)(nil), "cockroach.gossip.BootstrapInfo")
	proto.RegisterType((*Node)(nil), "cockroach.gossip.Node")
	proto.RegisterType((*Request)(nil), "cockroach.gossip.Request")
	proto.RegisterType((*Response)(nil), "cockroach.gossip.Response")
	proto.RegisterType((*Info)(nil), "cockroach.gossip.Info")
}
开发者ID:billhongs,项目名称:cockroach,代码行数:7,代码来源:gossip.pb.go

示例7: init

func init() {
	proto.RegisterType((*ExtraValue)(nil), "k8s.io.kubernetes.pkg.apis.authentication.v1beta1.ExtraValue")
	proto.RegisterType((*TokenReview)(nil), "k8s.io.kubernetes.pkg.apis.authentication.v1beta1.TokenReview")
	proto.RegisterType((*TokenReviewSpec)(nil), "k8s.io.kubernetes.pkg.apis.authentication.v1beta1.TokenReviewSpec")
	proto.RegisterType((*TokenReviewStatus)(nil), "k8s.io.kubernetes.pkg.apis.authentication.v1beta1.TokenReviewStatus")
	proto.RegisterType((*UserInfo)(nil), "k8s.io.kubernetes.pkg.apis.authentication.v1beta1.UserInfo")
}
开发者ID:juanluisvaladas,项目名称:origin,代码行数:7,代码来源:generated.pb.go

示例8: init

func init() {
	proto.RegisterType((*StoreRequestHeader)(nil), "cockroach.storage.StoreRequestHeader")
	proto.RegisterType((*PollFrozenRequest)(nil), "cockroach.storage.PollFrozenRequest")
	proto.RegisterType((*PollFrozenResponse)(nil), "cockroach.storage.PollFrozenResponse")
	proto.RegisterType((*CollectChecksumRequest)(nil), "cockroach.storage.CollectChecksumRequest")
	proto.RegisterType((*CollectChecksumResponse)(nil), "cockroach.storage.CollectChecksumResponse")
}
开发者ID:BramGruneir,项目名称:cockroach,代码行数:7,代码来源:api.pb.go

示例9: init

func init() {
	proto.RegisterType((*StoreRequestHeader)(nil), "cockroach.storage.StoreRequestHeader")
	proto.RegisterType((*PollFrozenRequest)(nil), "cockroach.storage.PollFrozenRequest")
	proto.RegisterType((*PollFrozenResponse)(nil), "cockroach.storage.PollFrozenResponse")
	proto.RegisterType((*ReservationRequest)(nil), "cockroach.storage.ReservationRequest")
	proto.RegisterType((*ReservationResponse)(nil), "cockroach.storage.ReservationResponse")
}
开发者ID:yaojingguo,项目名称:cockroach,代码行数:7,代码来源:api.pb.go

示例10: init

func init() {
	proto.RegisterType((*Authentication)(nil), "google.api.Authentication")
	proto.RegisterType((*AuthenticationRule)(nil), "google.api.AuthenticationRule")
	proto.RegisterType((*AuthProvider)(nil), "google.api.AuthProvider")
	proto.RegisterType((*OAuthRequirements)(nil), "google.api.OAuthRequirements")
	proto.RegisterType((*AuthRequirement)(nil), "google.api.AuthRequirement")
}
开发者ID:peter-edge,项目名称:protoeasy-go,代码行数:7,代码来源:auth.pb.go

示例11: init

func init() {
	proto.RegisterType((*Project)(nil), "github.com.openshift.origin.pkg.project.api.v1.Project")
	proto.RegisterType((*ProjectList)(nil), "github.com.openshift.origin.pkg.project.api.v1.ProjectList")
	proto.RegisterType((*ProjectRequest)(nil), "github.com.openshift.origin.pkg.project.api.v1.ProjectRequest")
	proto.RegisterType((*ProjectSpec)(nil), "github.com.openshift.origin.pkg.project.api.v1.ProjectSpec")
	proto.RegisterType((*ProjectStatus)(nil), "github.com.openshift.origin.pkg.project.api.v1.ProjectStatus")
}
开发者ID:Xmagicer,项目名称:origin,代码行数:7,代码来源:generated.pb.go

示例12: init

func init() {
	proto.RegisterType((*Eviction)(nil), "k8s.io.kubernetes.pkg.apis.policy.v1alpha1.Eviction")
	proto.RegisterType((*PodDisruptionBudget)(nil), "k8s.io.kubernetes.pkg.apis.policy.v1alpha1.PodDisruptionBudget")
	proto.RegisterType((*PodDisruptionBudgetList)(nil), "k8s.io.kubernetes.pkg.apis.policy.v1alpha1.PodDisruptionBudgetList")
	proto.RegisterType((*PodDisruptionBudgetSpec)(nil), "k8s.io.kubernetes.pkg.apis.policy.v1alpha1.PodDisruptionBudgetSpec")
	proto.RegisterType((*PodDisruptionBudgetStatus)(nil), "k8s.io.kubernetes.pkg.apis.policy.v1alpha1.PodDisruptionBudgetStatus")
}
开发者ID:juanluisvaladas,项目名称:origin,代码行数:7,代码来源:generated.pb.go

示例13: init

func init() {
	proto.RegisterType((*NidOptEnum)(nil), "enumstringer.NidOptEnum")
	proto.RegisterType((*NinOptEnum)(nil), "enumstringer.NinOptEnum")
	proto.RegisterType((*NidRepEnum)(nil), "enumstringer.NidRepEnum")
	proto.RegisterType((*NinRepEnum)(nil), "enumstringer.NinRepEnum")
	proto.RegisterEnum("enumstringer.TheTestEnum", TheTestEnum_name, TheTestEnum_value)
}
开发者ID:stevvooe,项目名称:protobuf,代码行数:7,代码来源:enumstringer.pb.go

示例14: init

func init() {
	proto.RegisterType((*Artist)(nil), "proto2.Artist")
	proto.RegisterType((*Song)(nil), "proto2.Song")
	proto.RegisterType((*Album)(nil), "proto2.Album")
	proto.RegisterEnum("proto2.Instrument", Instrument_name, Instrument_value)
	proto.RegisterEnum("proto2.Genre", Genre_name, Genre_value)
}
开发者ID:bookerzzz,项目名称:letmegrpc,代码行数:7,代码来源:proto2.pb.go

示例15: init

func init() {
	proto.RegisterType((*EmitRequest)(nil), "apipb.EmitRequest")
	proto.RegisterType((*EmitResponse)(nil), "apipb.EmitResponse")
	proto.RegisterType((*WatchRequest)(nil), "apipb.WatchRequest")
	proto.RegisterType((*WatchEvent)(nil), "apipb.WatchEvent")
	proto.RegisterType((*WatchResponse)(nil), "apipb.WatchResponse")
	proto.RegisterEnum("apipb.WatchEvent_EventType", WatchEvent_EventType_name, WatchEvent_EventType_value)
}
开发者ID:otsimo,项目名称:watch,代码行数:8,代码来源:watch.pb.go


注:本文中的github.com/gogo/protobuf/proto.RegisterType函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。